diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-29 02:59:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-29 02:59:23 +0100 |
commit | 9fdacb5e3a03928a5671670d0db1e0058daf344e (patch) | |
tree | 286cf97c02dc915ba828da1f6a0fa4dc5440e795 /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | Merge pull request #9504 from liamwhite/pg2 (diff) | |
parent | video_core: Implement other missing vulkan topology (diff) | |
download | yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.tar yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.tar.gz yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.tar.bz2 yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.tar.lz yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.tar.xz yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.tar.zst yuzu-9fdacb5e3a03928a5671670d0db1e0058daf344e.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 4b7126c30..ac1eb9895 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -138,12 +138,16 @@ DrawParams MakeDrawParams(const MaxwellDrawState& draw_state, u32 num_instances, .first_index = is_indexed ? draw_state.index_buffer.first : 0, .is_indexed = is_indexed, }; + // 6 triangle vertices per quad, base vertex is part of the index + // See BindQuadIndexBuffer for more details if (draw_state.topology == Maxwell::PrimitiveTopology::Quads) { - // 6 triangle vertices per quad, base vertex is part of the index - // See BindQuadArrayIndexBuffer for more details params.num_vertices = (params.num_vertices / 4) * 6; params.base_vertex = 0; params.is_indexed = true; + } else if (draw_state.topology == Maxwell::PrimitiveTopology::QuadStrip) { + params.num_vertices = (params.num_vertices - 2) / 2 * 6; + params.base_vertex = 0; + params.is_indexed = true; } return params; } |