Remove VK_AMD_shader_fragment from default device's extension list
authorCharlie Turner <cturner@igalia.com>
Wed, 21 Dec 2022 19:59:23 +0000 (19:59 +0000)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Mon, 16 Jan 2023 12:25:51 +0000 (12:25 +0000)
commit5477afea1f91760beb45bc9cf25efbada797edc7
treec34e89327bf0e0bf32eb3fc3107eac5a436a3f1b
parente9ce2f1458586acf5593778f4994079ffeb1a7c8
Remove VK_AMD_shader_fragment from default device's extension list

It conflicts with VK_EXT_buffer_descriptor, which is a sensible
feature to keep as default, rather than vice versa.

The single testsuite that uses this extension has been refactored to
create a custom device for it instead.

This fixes the following validation error,

Validation Error: [ VUID-VkDeviceCreateInfo-None-08095 ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xe6a1c10a | vkCreateDevice(): If the descriptorBuffer feature is enabled, ppEnabledExtensionNames must not contain VK_AMD_shader_fragment_mask. The Vulkan spec states: If descriptorBuffer is enabled, ppEnabledExtensionNames must not contain VK_AMD_shader_fragment_mask (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-None-08095)

The next validation error noticed was,

Validation Error: [UNASSIGNED-CoreValidation-Shader-MissingInputAttachment ] Object 0:handle = 0x9fde6b0000000014, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x980f360000000011, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0xbd90d7b7 | Shader consumes input attachment

This was fixed by hard-coding the input attachment to zero, rather
than numLayers (1) which was not being provided by the static subpass
layout.

There is a remaining validation error,

Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-renderPass-06061 ] Object 0: handle = 0x1426c490, type = VK_OBJECT_TYPE_DEVICE; | Me
ssageID = 0x399b0a5e | vkCreateGraphicsPipelines(): pCreateInfos[0] is being created with fragment shader state and renderPass = VK_NULL_HANDLE, but fragme
nt shader includes InputAttachment capability. The Vulkan spec states: If the pipeline is being created with fragment shader state and renderPass is VK_NUL
L_HANDLE, fragment shaders in pStages must not include the InputAttachment capability (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vk
spec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-06061)

However, this one is a bug in layers, not taking into account the fact
pipeline libraries are enabled when validation stages with input
attachment capabilities. Reported
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/4989

VK-GL-CTS issue: 4187

Components: Framework, Vulkan

Affects: dEQP-VK.pipeline.*.multisample.shader_fragment_mask.*

Change-Id: I01fc1ca4f5e1872a7fabda945d24faad7c9bf622
external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp
external/vulkancts/modules/vulkan/vktTestCase.cpp