textureClamp texcoord with shadow 1d uses vec3
authorJeannot Breton <jbreton@nvidia.com>
Thu, 25 May 2017 18:08:39 +0000 (13:08 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 26 May 2017 15:54:51 +0000 (11:54 -0400)
This change modifies the current shader generation for textureClamp
subtests.
s.coordType and s.sizeDef will now use vec3 for sampler1DArrayShadow
and sampler1DShadow

Affects:

KHR-GL45.sparse_texture_clamp_tests.*

Components: OpenGL

VK-GL-CTS issue: 443

Change-Id: I025061981877a62b6eed6bcc6c783f6fdc68c7d3

external/openglcts/modules/gl/gl4cSparseTexture2Tests.cpp

index 907151c38f7b44bc9b82924434e184ed991fc4ae..4b7944e6431c3c475d313666dee880a04436871f 100644 (file)
@@ -2482,7 +2482,9 @@ SparseTexture2LookupTestCase::TokenStringsExt SparseTexture2LookupTestCase::crea
        {
                if (target != GL_TEXTURE_CUBE_MAP_ARRAY)
                {
-                       if (s.coordType == "vec2")
+                       if (s.coordType == "float")
+                               s.coordType = "vec3";
+                       else if (s.coordType == "vec2")
                                s.coordType = "vec3";
                        else if (s.coordType == "vec3")
                                s.coordType = "vec4";
@@ -2528,7 +2530,9 @@ SparseTexture2LookupTestCase::TokenStringsExt SparseTexture2LookupTestCase::crea
        // Set size vector for shadow samplers and non-gether functions selected
        else
        {
-               if (s.coordType == "vec3" && target == GL_TEXTURE_1D_ARRAY)
+               if (s.coordType == "vec3" && target == GL_TEXTURE_1D)
+                       s.sizeDef = "<TEX_WIDTH>, 1 , 1";
+               else if (s.coordType == "vec3" && target == GL_TEXTURE_1D_ARRAY)
                        s.sizeDef = "<TEX_WIDTH>, <TEX_DEPTH>, 1";
                else if (s.coordType == "vec3")
                        s.sizeDef = "<TEX_WIDTH>, <TEX_HEIGHT>, 1";