From 7c5b76dcad1df38646313cdaa8b6137e67db9238 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 11 Sep 2025 14:09:53 +0100 Subject: [PATCH] Change subgroup zoo to use a triangle list instead of strip * This produces more consistent subgroup thread assignments in the vertex shader. --- util/test/demos/vk/vk_subgroup_zoo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/test/demos/vk/vk_subgroup_zoo.cpp b/util/test/demos/vk/vk_subgroup_zoo.cpp index bf98c888d..b8080f35c 100644 --- a/util/test/demos/vk/vk_subgroup_zoo.cpp +++ b/util/test/demos/vk/vk_subgroup_zoo.cpp @@ -75,6 +75,9 @@ void main() { vec2 positions[] = { vec2(-1.0f, 1.0f), + vec2( 1.0f, 1.0f), + vec2(-1.0f, -1.0f), + vec2( 1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2( 1.0f, -1.0f), @@ -341,7 +344,7 @@ void main() pipeCreateInfo.renderPass = renderPass; pipeCreateInfo.layout = layout; - pipeCreateInfo.inputAssemblyState.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; + pipeCreateInfo.inputAssemblyState.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; std::map macros; @@ -514,7 +517,7 @@ void main() VK_SUBPASS_CONTENTS_INLINE); vkh::cmdPushConstants(cmd, layout, i); - vkCmdDraw(cmd, 4, 1, 0, 0); + vkCmdDraw(cmd, 6, 1, 0, 0); vkCmdEndRenderPass(cmd); }