Fix invalid combinations for texture/copy on ES2 driver
authorJim Hauxwell <james.hauxwell@broadcom.com>
Tue, 28 Aug 2018 16:33:48 +0000 (17:33 +0100)
committerCourtney Goeltzenleuchter <courtneygo@google.com>
Wed, 13 May 2020 19:38:09 +0000 (13:38 -0600)
OES_packed_depth_stencil describes the valid combinations available.
Texturing is only valid from it when OES_depth_texture is also present.
ES3 added depth texturing, but used different tokens than the initial
extension.

Affects:

KHR-GLES2.core.internalformat.texture2d.
  depth_stencil_unsigned_int_24_8_depth24_stencil8
KHR-GLES*.core.internalformat.texture2d.
  depth_stencil_unsigned_int_24_8_depth_stencil

Components: OpenGL
VK-GL-CTS issue: 1261

Change-Id: I91262c2c7eb71c9d3ff1eb59931227132b1828f9
(cherry picked from commit 33af336e530859e099df76b4c7d4acc5add3c2f7)

external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.5.x/gles2-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.5.x/gles3-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.5.x/gles31-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.5.x/gles32-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles2-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles3-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles31-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles32-khr-master.txt
external/openglcts/modules/common/glcInternalformatTests.cpp

index 24dac2b..b797c0c 100644 (file)
@@ -421,7 +421,7 @@ KHR-GLES2.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a1
 KHR-GLES2.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES2.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES2.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES2.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES2.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
index d19b81d..4e4989c 100644 (file)
@@ -3243,7 +3243,7 @@ KHR-GLES3.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a1
 KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES3.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES3.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES3.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES3.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES3.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
@@ -3262,6 +3262,7 @@ KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb
 KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb565
 KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
 KHR-GLES3.core.internalformat.texture2d.rgba_unsigned_byte_rgba8
+KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
 KHR-GLES3.core.internalformat.copy_tex_image.rgb
 KHR-GLES3.core.internalformat.copy_tex_image.rgba
 KHR-GLES3.core.internalformat.copy_tex_image.alpha
index e87e56a..828baad 100644 (file)
@@ -2274,7 +2274,7 @@ KHR-GLES31.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a
 KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES31.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES31.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES31.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES31.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES31.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES31.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES31.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
@@ -2293,6 +2293,7 @@ KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb
 KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb565
 KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
 KHR-GLES31.core.internalformat.texture2d.rgba_unsigned_byte_rgba8
+KHR-GLES31.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
 KHR-GLES31.core.internalformat.copy_tex_image.rgb
 KHR-GLES31.core.internalformat.copy_tex_image.rgba
 KHR-GLES31.core.internalformat.copy_tex_image.alpha
index 319460d..0e615a8 100644 (file)
@@ -1039,7 +1039,7 @@ KHR-GLES32.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a
 KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES32.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES32.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES32.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES32.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES32.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES32.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES32.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
@@ -1058,6 +1058,7 @@ KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb
 KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb565
 KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
 KHR-GLES32.core.internalformat.texture2d.rgba_unsigned_byte_rgba8
+KHR-GLES32.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
 KHR-GLES32.core.internalformat.copy_tex_image.rgb
 KHR-GLES32.core.internalformat.copy_tex_image.rgba
 KHR-GLES32.core.internalformat.copy_tex_image.alpha
index 24dac2b..b797c0c 100644 (file)
@@ -421,7 +421,7 @@ KHR-GLES2.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a1
 KHR-GLES2.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES2.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES2.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES2.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES2.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
index d19b81d..4e4989c 100644 (file)
@@ -3243,7 +3243,7 @@ KHR-GLES3.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a1
 KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES3.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES3.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES3.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES3.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES3.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
@@ -3262,6 +3262,7 @@ KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb
 KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb565
 KHR-GLES3.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
 KHR-GLES3.core.internalformat.texture2d.rgba_unsigned_byte_rgba8
+KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
 KHR-GLES3.core.internalformat.copy_tex_image.rgb
 KHR-GLES3.core.internalformat.copy_tex_image.rgba
 KHR-GLES3.core.internalformat.copy_tex_image.alpha
index e87e56a..828baad 100644 (file)
@@ -2274,7 +2274,7 @@ KHR-GLES31.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a
 KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES31.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES31.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES31.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES31.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES31.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES31.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES31.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
@@ -2293,6 +2293,7 @@ KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb
 KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb565
 KHR-GLES31.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
 KHR-GLES31.core.internalformat.texture2d.rgba_unsigned_byte_rgba8
+KHR-GLES31.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
 KHR-GLES31.core.internalformat.copy_tex_image.rgb
 KHR-GLES31.core.internalformat.copy_tex_image.rgba
 KHR-GLES31.core.internalformat.copy_tex_image.alpha
index 319460d..0e615a8 100644 (file)
@@ -1039,7 +1039,7 @@ KHR-GLES32.core.internalformat.texture2d.rgba_unsigned_int_2_10_10_10_rev_rgb5_a
 KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_int_2_10_10_10_rev_rgb
 KHR-GLES32.core.internalformat.texture2d.depth_component_unsigned_short_depth_component
 KHR-GLES32.core.internalformat.texture2d.depth_component_unsigned_int_depth_component
-KHR-GLES32.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
+KHR-GLES32.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil
 KHR-GLES32.core.internalformat.texture2d.rgb_half_float_rgb16f
 KHR-GLES32.core.internalformat.texture2d.rgba_half_float_rgba16f
 KHR-GLES32.core.internalformat.texture2d.rgb_half_float_rgb16f_linear
@@ -1058,6 +1058,7 @@ KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb
 KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_short_5_6_5_rgb565
 KHR-GLES32.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
 KHR-GLES32.core.internalformat.texture2d.rgba_unsigned_byte_rgba8
+KHR-GLES32.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8
 KHR-GLES32.core.internalformat.copy_tex_image.rgb
 KHR-GLES32.core.internalformat.copy_tex_image.rgba
 KHR-GLES32.core.internalformat.copy_tex_image.alpha
index c649a8b..6442929 100644 (file)
@@ -334,7 +334,10 @@ glu::ProgramSources InternalformatCaseBase::prepareTexturingProgramSources(GLint
                {
                        specializationMap["SAMPLED_TYPE"]       = "vec4";
                        specializationMap["SAMPLER"]             = "sampler2D";
-                       specializationMap["CALCULATE_COLOR"] = "v";
+                       if (format == GL_DEPTH_STENCIL)
+                               specializationMap["CALCULATE_COLOR"] = "vec4(v.r, 0.0, 0.0, 1.0)";
+                       else
+                               specializationMap["CALCULATE_COLOR"] = "v";
                }
        }
        else
@@ -357,7 +360,7 @@ glu::ProgramSources InternalformatCaseBase::prepareTexturingProgramSources(GLint
                         "  gl_FragColor = ${CALCULATE_COLOR};\n"
                         "}\n";
 
-               if (internalFormat == GL_DEPTH_COMPONENT)
+               if ((internalFormat == GL_DEPTH_COMPONENT) || (internalFormat == GL_DEPTH_STENCIL))
                        specializationMap["CALCULATE_COLOR"] = "vec4(color.r, 0.0, 0.0, 1.0)";
                else
                        specializationMap["CALCULATE_COLOR"] = "color";
@@ -1418,7 +1421,7 @@ void InternalformatTests::getESTestData(TestData& testData, glu::ContextType& co
                TF(GL_RGB, GL_UNSIGNED_INT_2_10_10_10_REV, GL_RGB, EXT_texture_type_2_10_10_10_REV),
                TF(GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_DEPTH_COMPONENT, OES_depth_texture),
                TF(GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_DEPTH_COMPONENT, OES_depth_texture),
-               TF(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8, OES_packed_depth_stencil),
+               TF(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH_STENCIL, OES_packed_depth_stencil, OES_depth_texture),
                TF(GL_RGB, GL_HALF_FLOAT, GL_RGB16F, OES_texture_half_float),
                TF(GL_RGBA, GL_HALF_FLOAT, GL_RGBA16F, OES_texture_half_float),
                TF(GL_RGB, GL_HALF_FLOAT, GL_RGB16F, OES_texture_half_float_linear, DE_NULL, GL_LINEAR, GL_LINEAR),
@@ -1459,6 +1462,7 @@ void InternalformatTests::getESTestData(TestData& testData, glu::ContextType& co
                        TF(GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_RGB565),
                        TF(GL_RGB, GL_UNSIGNED_BYTE, GL_RGB8),
                        TF(GL_RGBA, GL_UNSIGNED_BYTE, GL_RGBA8),
+                       TF(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8),
                };
 
                CopyTexImageFormat es3CopyTexImageFormats[] = {