Apply nonUniformEXT after constructing a combined image/sampler
authorJeff Bolz <jbolz@nvidia.com>
Mon, 16 Mar 2020 18:46:17 +0000 (13:46 -0500)
committerJeff Bolz <jbolz@nvidia.com>
Fri, 17 Apr 2020 11:37:21 +0000 (06:37 -0500)
nonUniformEXT doesn't propagate through constructors, so apply it
after constructing a combined image sampler. Also, update the glslang
commit to include a fix that allows nonuniform sampler constructors.

Component: Vulkan
Affects: dEQP-VK.descriptor_indexing.*
VK-GL-CTS Issue: 2268

Change-Id: Icd3cc0d47dc39aa3e61c4ebff99e254b9296230c

external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTests.cpp

index bfec8b2..51cfba0 100644 (file)
@@ -1673,13 +1673,13 @@ std::string CommonDescriptorInstance::getColorAccess                            (VkDescriptorType
                break;
        case VK_DESCRIPTOR_TYPE_SAMPLER:
                text = usesMipMaps
-                       ? "textureLod(sampler2D(tex[0], data[nonuniformEXT(${INDEX})]), normalpos, 1)"
-                       : "texture(   sampler2D(tex[0], data[nonuniformEXT(${INDEX})]), normalpos   )";
+                       ? "textureLod(nonuniformEXT(sampler2D(tex[0], data[${INDEX}])), normalpos, 1)"
+                       : "texture(   nonuniformEXT(sampler2D(tex[0], data[${INDEX}])), normalpos   )";
                break;
        case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:
                text = usesMipMaps
-                       ? "textureLod( sampler2D(data[nonuniformEXT(${INDEX})], samp[0]), vec2(0,0), textureQueryLevels(sampler2D(data[nonuniformEXT(${INDEX})], samp[0]))-1)"
-                       : "texture(    sampler2D(data[nonuniformEXT(${INDEX})], samp[0]), vec2(0,0)   )";
+                       ? "textureLod( nonuniformEXT(sampler2D(data[${INDEX}], samp[0])), vec2(0,0), textureQueryLevels(nonuniformEXT(sampler2D(data[${INDEX}], samp[0])))-1)"
+                       : "texture(    nonuniformEXT(sampler2D(data[${INDEX}], samp[0])), vec2(0,0)   )";
                break;
        case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
                text = usesMipMaps