diff options
| author | 2022-12-17 10:22:50 +0800 | |
|---|---|---|
| committer | 2022-12-26 12:20:49 +0800 | |
| commit | 6a397bc8eda2f239dd8823f342f164cc0fec9c41 (patch) | |
| tree | e499d53c87a52cb1b1c9666a62e44a07c2e58f19 /src | |
| parent | video_core: Implement vulkan QuadStrip topology (diff) | |
| download | yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.gz yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.xz yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.zip | |
video_core: Implement other missing vulkan topology
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 347cfc133..ca52e2389 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -301,6 +301,8 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const Device& device, | |||
| 301 | return VK_PRIMITIVE_TOPOLOGY_POINT_LIST; | 301 | return VK_PRIMITIVE_TOPOLOGY_POINT_LIST; |
| 302 | case Maxwell::PrimitiveTopology::Lines: | 302 | case Maxwell::PrimitiveTopology::Lines: |
| 303 | return VK_PRIMITIVE_TOPOLOGY_LINE_LIST; | 303 | return VK_PRIMITIVE_TOPOLOGY_LINE_LIST; |
| 304 | case Maxwell::PrimitiveTopology::LineLoop: | ||
| 305 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; | ||
| 304 | case Maxwell::PrimitiveTopology::LineStrip: | 306 | case Maxwell::PrimitiveTopology::LineStrip: |
| 305 | return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; | 307 | return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; |
| 306 | case Maxwell::PrimitiveTopology::Triangles: | 308 | case Maxwell::PrimitiveTopology::Triangles: |
| @@ -309,6 +311,14 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const Device& device, | |||
| 309 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; | 311 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; |
| 310 | case Maxwell::PrimitiveTopology::TriangleFan: | 312 | case Maxwell::PrimitiveTopology::TriangleFan: |
| 311 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN; | 313 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN; |
| 314 | case Maxwell::PrimitiveTopology::LinesAdjacency: | ||
| 315 | return VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY; | ||
| 316 | case Maxwell::PrimitiveTopology::LineStripAdjacency: | ||
| 317 | return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY; | ||
| 318 | case Maxwell::PrimitiveTopology::TrianglesAdjacency: | ||
| 319 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY; | ||
| 320 | case Maxwell::PrimitiveTopology::TriangleStripAdjacency: | ||
| 321 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY; | ||
| 312 | case Maxwell::PrimitiveTopology::Quads: | 322 | case Maxwell::PrimitiveTopology::Quads: |
| 313 | case Maxwell::PrimitiveTopology::QuadStrip: | 323 | case Maxwell::PrimitiveTopology::QuadStrip: |
| 314 | // TODO: Use VK_PRIMITIVE_TOPOLOGY_QUAD_LIST_EXT/VK_PRIMITIVE_TOPOLOGY_QUAD_STRIP_EXT | 324 | // TODO: Use VK_PRIMITIVE_TOPOLOGY_QUAD_LIST_EXT/VK_PRIMITIVE_TOPOLOGY_QUAD_STRIP_EXT |
| @@ -316,10 +326,13 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const Device& device, | |||
| 316 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; | 326 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; |
| 317 | case Maxwell::PrimitiveTopology::Patches: | 327 | case Maxwell::PrimitiveTopology::Patches: |
| 318 | return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; | 328 | return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; |
| 319 | default: | 329 | case Maxwell::PrimitiveTopology::Polygon: |
| 320 | UNIMPLEMENTED_MSG("Unimplemented topology={}", topology); | 330 | LOG_WARNING(Render_Vulkan, "Draw mode is Polygon with a polygon mode of lines should be a " |
| 321 | return {}; | 331 | "single body and not a bunch of triangles."); |
| 332 | return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN; | ||
| 322 | } | 333 | } |
| 334 | UNIMPLEMENTED_MSG("Unimplemented topology={}", topology); | ||
| 335 | return {}; | ||
| 323 | } | 336 | } |
| 324 | 337 | ||
| 325 | VkFormat VertexFormat(const Device& device, Maxwell::VertexAttribute::Type type, | 338 | VkFormat VertexFormat(const Device& device, Maxwell::VertexAttribute::Type type, |