diff options
author | ziga-lunarg <ziga@lunarg.com> | 2024-04-24 00:43:21 +0200 |
---|---|---|
committer | Lorenzo Dal Col <lorenzo@khronosgroup.org> | 2024-05-09 17:45:16 +0000 |
commit | daebc9e19dc35ec53cbde7a3a4c0774ceca01031 (patch) | |
tree | 8066d6623e4cf95b944e7e1b1378f4acdaa87214 | |
parent | 0000bd5622bd6077a628017fb61beea8ac06d4a9 (diff) | |
download | deqp-upstream-vulkan-cts-1.3.7.tar.gz |
Fix VkDescriptorSetLayout in shader object binary testsupstream-vulkan-cts-1.3.7
A VkDescriptorSetLayout object is used with two different devices,
instead of each device creating their own
Components: Vulkan
VK-GL-CTS issue: 5102
Affected tests:
dEQP-VK.shader_object.binary.*.new_device
dEQP-VK.shader_object.binary.device_features.*
Change-Id: I191d76785dac2ac9a48e323614363b963d08494f
-rw-r--r-- | external/vulkancts/modules/vulkan/shader_object/vktShaderObjectBinaryTests.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/external/vulkancts/modules/vulkan/shader_object/vktShaderObjectBinaryTests.cpp b/external/vulkancts/modules/vulkan/shader_object/vktShaderObjectBinaryTests.cpp index 76018d8a1..582b133df 100644 --- a/external/vulkancts/modules/vulkan/shader_object/vktShaderObjectBinaryTests.cpp +++ b/external/vulkancts/modules/vulkan/shader_object/vktShaderObjectBinaryTests.cpp @@ -354,9 +354,16 @@ tcu::TestStatus ShaderObjectBinaryQueryInstance::iterate (void) DE_NULL, // pEnabledFeatures; }; - vk::Move<vk::VkDevice> otherDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), vkp, instance, instanceDriver, physicalDevice, &deviceCreateInfo); + vk::Move<vk::VkDevice> otherDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), vkp, instance, instanceDriver, physicalDevice, &deviceCreateInfo); - vk::Move<vk::VkShaderEXT> otherShader = createShader(vk, binaries, *otherDevice, features2.features, layout, m_params.linked, m_params.stage); + const vk::Unique<vk::VkDescriptorSetLayout> otherDescriptorSetLayout( + vk::DescriptorSetLayoutBuilder() + .addSingleBinding(vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, vk::VK_SHADER_STAGE_COMPUTE_BIT) + .build(vk, *otherDevice)); + + vk::VkDescriptorSetLayout otherLayout = (m_params.stage == vk::VK_SHADER_STAGE_COMPUTE_BIT) ? *otherDescriptorSetLayout : VK_NULL_HANDLE; + + vk::Move<vk::VkShaderEXT> otherShader = createShader(vk, binaries, *otherDevice, features2.features, otherLayout, m_params.linked, m_params.stage); vk.getShaderBinaryDataEXT(*otherDevice, *otherShader, &otherDataSize, DE_NULL); otherData.resize(otherDataSize); vk.getShaderBinaryDataEXT(*otherDevice, *otherShader, &otherDataSize, otherData.data()); @@ -982,7 +989,14 @@ tcu::TestStatus ShaderObjectDeviceFeaturesBinaryInstance::iterate (void) vk::Move<vk::VkDevice> otherDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), vkp, instance, instanceDriver, physicalDevice, &deviceCreateInfo); - vk::Move<vk::VkShaderEXT> otherShader = createShader(vk, binaries, *otherDevice, features, layout, m_linked, m_stage); + const vk::Unique<vk::VkDescriptorSetLayout> otherDescriptorSetLayout( + vk::DescriptorSetLayoutBuilder() + .addSingleBinding(vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, vk::VK_SHADER_STAGE_COMPUTE_BIT) + .build(vk, *otherDevice)); + + vk::VkDescriptorSetLayout otherLayout = (m_stage == vk::VK_SHADER_STAGE_COMPUTE_BIT) ? *otherDescriptorSetLayout : VK_NULL_HANDLE; + + vk::Move<vk::VkShaderEXT> otherShader = createShader(vk, binaries, *otherDevice, features, otherLayout, m_linked, m_stage); vk.getShaderBinaryDataEXT(*otherDevice, *otherShader, &otherDataSize, DE_NULL); otherData.resize(otherDataSize); vk.getShaderBinaryDataEXT(*otherDevice, *otherShader, &otherDataSize, otherData.data()); |