Skip implicit PrimitiveID checks on devices without geometry shader support
authorCharlie Turner <cturner@igalia.com>
Wed, 7 Dec 2022 01:22:50 +0000 (01:22 +0000)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Mon, 19 Dec 2022 10:59:08 +0000 (10:59 +0000)
Since the fragment shader unconditionally uses gl_PrimitiveID, these
tests must be run on a device with geometry shader support, since a
variable decorated with PrimitiveId in SPIR-V requires one of of the
Geometry or Tessellation features according to the SPIR-V spec.

Reported by Alexis Hetu.

Affects:
dEQP-VK.pipeline.fast_linked_library.misc.implicit_primitive_id
dEQP-VK.pipeline.monolithic.misc.implicit_primitive_id
dEQP-VK.pipeline.pipeline_library.misc.implicit_primitive_id

VK-GL-CTS issue: 3932
Components: Vulkan

Change-Id: Ic9df03d6c4d4f509d8ef93ed0ec7080d99248c68

external/vulkancts/modules/vulkan/pipeline/vktPipelineMiscTests.cpp

index 771a696..32b73e7 100644 (file)
@@ -173,6 +173,8 @@ void ImplicitPrimitiveIDPassthroughCase::checkSupport (Context &context) const
        if (m_withTessellationPassthrough)
                context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_TESSELLATION_SHADER);
 
+       context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_GEOMETRY_SHADER);
+
        checkPipelineLibraryRequirements(context.getInstanceInterface(), context.getPhysicalDevice(), m_pipelineConstructionType);
 }