Adds coverage for gl_PrimitiveID implicit passthrough with GPL.
authorCharlie Turner <cturner@igalia.com>
Tue, 15 Nov 2022 18:01:21 +0000 (18:01 +0000)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 1 Dec 2022 23:40:56 +0000 (23:40 +0000)
commit97cfe0d059d5b58af9c81c2441df3955a30c9165
tree6e9fc2f0b722fd250857cd37b3f7a129d77885d6
parent203224c9a22e62f9ad9e4f13109160f0c7ee8a7d
Adds coverage for gl_PrimitiveID implicit passthrough with GPL.

Add new pipeline tests which use gl_PrimtiveID in the fragment shader,
when access to that built-in is allowed implicitly.

From the spec,

"In a fragment shader, it will contain the primitive index written by
the mesh shader if a mesh shader is present, or the primitive index
written by the geometry shader if a geometry shader is present, or
with the value that would have been presented as input to the geometry
shader had it been present."

The new tests cover the cases without mesh or geometry shaders, where
the builtin is implicit.

These tests have been validated to cover the issue fixed by,

https://gitlab.freedesktop.org/mesa/mesa/-/commit/0c6f52a999f34e936aa61eb3527a19979da1ff8c

in the Mesa radv driver.

New Tests:

dEQP-VK.pipeline.monolithic.misc.implicit_primitive_id
dEQP-VK.pipeline.monolithic.misc.implicit_primitive_id_with_tessellation
dEQP-VK.pipeline.pipeline_library.misc.implicit_primitive_id
dEQP-VK.pipeline.pipeline_library.misc.implicit_primitive_id_with_tessellation
dEQP-VK.pipeline.fast_linked_library.misc.implicit_primitive_id
dEQP-VK.pipeline.fast_linked_library.misc.implicit_primitive_id_with_tessellation

VK-GL-CTS issue: 3932

Change-Id: I25f10a98e27019618b1caaa61f0a4e5e75f36564
12 files changed:
android/cts/main/vk-master-2022-03-01/pipeline.txt
android/cts/main/vk-master/pipeline/fast-linked-library.txt
android/cts/main/vk-master/pipeline/monolithic.txt
android/cts/main/vk-master/pipeline/pipeline-library.txt
android/cts/main/vksc-main/pipeline.txt
external/vulkancts/modules/vulkan/pipeline/vktPipelineMiscTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMiscTests.hpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp
external/vulkancts/mustpass/main/vk-default/pipeline/fast-linked-library.txt
external/vulkancts/mustpass/main/vk-default/pipeline/monolithic.txt
external/vulkancts/mustpass/main/vk-default/pipeline/pipeline-library.txt
external/vulkancts/mustpass/main/vksc-default/pipeline.txt