Fix image type for uniform texel buffers
authorJames Price <j.price@bristol.ac.uk>
Mon, 25 Feb 2019 16:11:44 +0000 (16:11 +0000)
committerJames Price <j.price@bristol.ac.uk>
Tue, 26 Feb 2019 16:34:33 +0000 (16:34 +0000)
This fixes issues described in #139 but in additional test categories,
in the same manner as in commit 69278de.

Affects:
dEQP-VK.binding_model.descriptorset_random.sets4.*
dEQP-VK.api.buffer_view.access.*
dEQP-VK.memory.pipeline_barrier.*uniform_texel_buffer.*
dEQP-VK.robustness.buffer_access.*.texel_copy.*

external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.cpp
external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp
external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp
external/vulkancts/modules/vulkan/robustness/vktRobustnessBufferAccessTests.cpp

index 062c9b7..e681824 100644 (file)
@@ -516,7 +516,7 @@ void BufferViewTestCase::initPrograms                                                                       (SourceCollections&                     programColle
        programCollection.glslSources.add("frag") << glu::FragmentSource(
                "#version 310 es\n"
                "#extension GL_EXT_texture_buffer : enable\n"
-               "layout (set=0, binding=0) uniform highp usamplerBuffer u_buffer;\n"
+               "layout (set=0, binding=0) uniform highp utextureBuffer u_buffer;\n"
                "layout (location = 0) out highp uint o_color;\n"
                "void main()\n"
                "{\n"
index 0689313..2cc3840 100644 (file)
@@ -531,7 +531,7 @@ void DescriptorSetRandomTestCase::initPrograms (SourceCollections& programCollec
                                        decls << "layout(set = " << s << ", binding = " << b << ") buffer sbodef" << s << "_" << b << " { int val; } ssbo" << s << "_" << b << array.str()  << ";\n";
                                        break;
                                case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:
-                                       decls << "layout(set = " << s << ", binding = " << b << ") uniform isamplerBuffer texbo" << s << "_" << b << array.str()  << ";\n";
+                                       decls << "layout(set = " << s << ", binding = " << b << ") uniform itextureBuffer texbo" << s << "_" << b << array.str()  << ";\n";
                                        break;
                                case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
                                        decls << "layout(r32i, set = " << s << ", binding = " << b << ") uniform iimageBuffer image" << s << "_" << b << array.str()  << ";\n";
index 413ee45..9ae0fcd 100644 (file)
@@ -9683,7 +9683,7 @@ struct AddPrograms
                                        "#version 310 es\n"
                                        "#extension GL_EXT_texture_buffer : require\n"
                                        "precision highp float;\n"
-                                       "layout(set=0, binding=0) uniform highp usamplerBuffer u_sampler;\n"
+                                       "layout(set=0, binding=0) uniform highp utextureBuffer u_sampler;\n"
                                        "void main (void) {\n"
                                        "\tgl_PointSize = 1.0;\n"
                                        "\thighp uint val = texelFetch(u_sampler, gl_VertexIndex).x;\n"
@@ -9700,9 +9700,10 @@ struct AddPrograms
                                const char* const fragmentShader =
                                        "#version 310 es\n"
                                        "#extension GL_EXT_texture_buffer : require\n"
+                                       "#extension GL_EXT_samplerless_texture_functions : require\n"
                                        "precision highp float;\n"
                                        "precision highp int;\n"
-                                       "layout(set=0, binding=0) uniform highp usamplerBuffer u_sampler;\n"
+                                       "layout(set=0, binding=0) uniform highp utextureBuffer u_sampler;\n"
                                        "layout(location = 0) out highp vec4 o_color;\n"
                                        "layout(push_constant) uniform PushC\n"
                                        "{\n"
index 9e38cd7..6247310 100644 (file)
@@ -431,25 +431,25 @@ void RobustBufferAccessTest::genTexelBufferShaderAccess (VkFormat                         bufferForma
        if (isFloatFormat(bufferFormat))
        {
                layoutTypeStr                   = "rgba32f";
-               inTexelBufferTypeStr    = readFromStorage ? "imageBuffer" : "samplerBuffer";
+               inTexelBufferTypeStr    = readFromStorage ? "imageBuffer" : "textureBuffer";
                outTexelBufferTypeStr   = "imageBuffer";
        }
        else if (isUintFormat(bufferFormat))
        {
                layoutTypeStr                   = "rgba32ui";
-               inTexelBufferTypeStr    = readFromStorage ? "uimageBuffer" : "usamplerBuffer";
+               inTexelBufferTypeStr    = readFromStorage ? "uimageBuffer" : "utextureBuffer";
                outTexelBufferTypeStr   = "uimageBuffer";
        }
        else if (isIntFormat(bufferFormat))
        {
                layoutTypeStr                   = "rgba32i";
-               inTexelBufferTypeStr    = readFromStorage ? "iimageBuffer" : "isamplerBuffer";
+               inTexelBufferTypeStr    = readFromStorage ? "iimageBuffer" : "itextureBuffer";
                outTexelBufferTypeStr   = "iimageBuffer";
        }
        else if (bufferFormat == VK_FORMAT_A2B10G10R10_UNORM_PACK32)
        {
                layoutTypeStr                   = "rgb10_a2";
-               inTexelBufferTypeStr    = readFromStorage ? "imageBuffer" : "samplerBuffer"; outTexelBufferTypeStr      = "imageBuffer";
+               inTexelBufferTypeStr    = readFromStorage ? "imageBuffer" : "textureBuffer"; outTexelBufferTypeStr      = "imageBuffer";
        }
        else
        {