Fix reordering vertices in geometry shader in ray_query AS test
authorSÅ‚awomir Cygan <slawomir.cygan@intel.com>
Fri, 26 Feb 2021 12:34:23 +0000 (13:34 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sat, 6 Mar 2021 09:55:45 +0000 (09:55 +0000)
This fixes the shader to write reordered vertice data into sequential
(unordered) store image indices

The change from 48f12336 was incomplete and misses the change to
the image store indices.

Components: Vulkan

VK-GL-CTS Issue: 2764

Affects: dEQP-VK.ray_query.acceleration_structures.*.geometry_shader.*
Change-Id: Ifd51d77e94c607e860e5c9efdefe2cb5a5ee97ff

external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp

index 7dd1f2ea369b46f3a546dc4ee77c303d2f608625..4e5201647d7539b009073ec76ce4163827c9ac3f 100644 (file)
@@ -1794,8 +1794,8 @@ void RayQueryASBasicTestCase::initPrograms (SourceCollections& programCollection
                                "    vec3  origin   = vec3(gl_in[i].gl_Position.x + 0.5, gl_in[i].gl_Position.y + 0.5, 0.5);\n"
                                "    uvec4 hitValue = uvec4(0,0,0,0);\n" <<
                                rayQueryTest[m_data.bottomTestType] <<
-                               "    imageStore(result, ivec3(gl_PrimitiveIDIn, i, 0), uvec4(hitValue.x, 0, 0, 0));\n"
-                               "    imageStore(result, ivec3(gl_PrimitiveIDIn, i, 1), uvec4(hitValue.y, 0, 0, 0));\n"
+                               "    imageStore(result, ivec3(gl_PrimitiveIDIn, j, 0), uvec4(hitValue.x, 0, 0, 0));\n"
+                               "    imageStore(result, ivec3(gl_PrimitiveIDIn, j, 1), uvec4(hitValue.y, 0, 0, 0));\n"
                                "    gl_Position      = gl_in[i].gl_Position;\n"
                                "    EmitVertex();\n"
                                "  }\n"