Allow geometry shader to reorder vertices in dEQP-VK.ray_query.acceleration_structure...
authorSlawomir Cygan <slawomir.cygan@intel.com>
Thu, 28 Jan 2021 15:06:30 +0000 (16:06 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 12 Feb 2021 12:13:48 +0000 (12:13 +0000)
commit2b9f1d1aadb596b6af65d0b8bb3cb3368ab83b0c
tree9f2db53d1e29f92b862f3f68245d6f3410ae6f27
parent6e4287094a7e7f4c79f74cc50575b3f1fff6d494
Allow geometry shader to reorder vertices in dEQP-VK.ray_query.acceleration_structures test

This fixes the geometry shader used in the test to allow gl_in[] to start from
arbitrary vertex from the triangle primitive.

According to spec:

"""
24.1. Geometry Shader Input Primitives
...
Vertices may be in a different absolute order to that specified by the topology,
but must adhere to the specified winding order.
"""

The test does some ray query computation in geometry shader, using elements
of gl_in[] as inputs, and storing the outputs in consecutive pixels of storage image.
The test than verifies the image contents using some predefined vertex order.
As gl_in is not queranteed to follow this order, vertex index from vertex shader is now
used to calculate starting index, from which gl_in is iterated.

Components: Vulkan

VK-GL-CTS Issue: 2764

Change-Id: I1b6b8df3166d40132747a7315366c427e32b0007
Affects: dEQP-VK.ray_query.acceleration_structures.*.geometry_shader.*
external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp