Fix use of invalid HALF_FLOAT enum
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Wed, 11 Sep 2019 15:01:22 +0000 (09:01 -0600)
committerCourtney Goeltzenleuchter <courtneygo@google.com>
Wed, 13 May 2020 19:39:39 +0000 (13:39 -0600)
GLES 2.0 supports GL_HALF_FLOAT_OES via the OES_texture_half_float
extension. When the enum GL_HALF_FLOAT was added in GLES 3.0,
unfortunately it did not use the same enum value as GL_HALF_FLOAT_OES.
Technically, GL_HALF_FLOAT is not supported on a GLES 2.0 implementation
even with OES_texture_half_float. Fix GLES 2.0 tests to always use
GL_HALF_FLOAT_OES to avoid the issue.

Affects:

KHR-GLES2.core.internalformat.texture2d.*_half_float_*
KHR-GLES3*.core.internalformat.texture2d.*_half_float_*

Components: OpenGL

VK-GL-CTS issue: 1923

Change-Id: I9b43091382341798a0d62b9a4ec09153e915dc5c
(cherry picked from commit f7ede20a9805615a3c371b786fa7407708cf612c)

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 b797c0c..080903c 100644 (file)
@@ -422,10 +422,10 @@ 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_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
-KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES2.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES2.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES2.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES2.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES2.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES2.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES2.core.internalformat.texture2d.rgb_float_rgb32f_linear
index 4e4989c..e5afda8 100644 (file)
@@ -3244,10 +3244,10 @@ 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_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
-KHR-GLES3.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES3.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES3.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES3.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES3.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES3.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES3.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES3.core.internalformat.texture2d.rgb_float_rgb32f_linear
@@ -3262,6 +3262,8 @@ 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.rgb_half_float_rgb16f
+KHR-GLES3.core.internalformat.texture2d.rgba_half_float_rgba16f
 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
index 828baad..7e83216 100644 (file)
@@ -2275,10 +2275,10 @@ 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_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
-KHR-GLES31.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES31.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES31.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES31.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES31.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES31.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES31.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES31.core.internalformat.texture2d.rgb_float_rgb32f_linear
@@ -2293,6 +2293,8 @@ 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.rgb_half_float_rgb16f
+KHR-GLES31.core.internalformat.texture2d.rgba_half_float_rgba16f
 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
index 0e615a8..2adec91 100644 (file)
@@ -1040,10 +1040,10 @@ 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_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
-KHR-GLES32.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES32.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES32.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES32.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES32.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES32.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES32.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES32.core.internalformat.texture2d.rgb_float_rgb32f_linear
@@ -1058,6 +1058,8 @@ 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.rgb_half_float_rgb16f
+KHR-GLES32.core.internalformat.texture2d.rgba_half_float_rgba16f
 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
index b797c0c..080903c 100644 (file)
@@ -422,10 +422,10 @@ 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_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
-KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES2.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES2.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES2.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES2.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES2.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES2.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES2.core.internalformat.texture2d.rgb_float_rgb32f_linear
index 4e4989c..e5afda8 100644 (file)
@@ -3244,10 +3244,10 @@ 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_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
-KHR-GLES3.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES3.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES3.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES3.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES3.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES3.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES3.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES3.core.internalformat.texture2d.rgb_float_rgb32f_linear
@@ -3262,6 +3262,8 @@ 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.rgb_half_float_rgb16f
+KHR-GLES3.core.internalformat.texture2d.rgba_half_float_rgba16f
 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
index 828baad..7e83216 100644 (file)
@@ -2275,10 +2275,10 @@ 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_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
-KHR-GLES31.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES31.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES31.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES31.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES31.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES31.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES31.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES31.core.internalformat.texture2d.rgb_float_rgb32f_linear
@@ -2293,6 +2293,8 @@ 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.rgb_half_float_rgb16f
+KHR-GLES31.core.internalformat.texture2d.rgba_half_float_rgba16f
 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
index 0e615a8..2adec91 100644 (file)
@@ -1040,10 +1040,10 @@ 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_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
-KHR-GLES32.core.internalformat.texture2d.rgba_half_float_rgba16f_linear
+KHR-GLES32.core.internalformat.texture2d.rgb_half_float_oes_rgb
+KHR-GLES32.core.internalformat.texture2d.rgba_half_float_oes_rgba
+KHR-GLES32.core.internalformat.texture2d.rgb_half_float_oes_rgb_linear
+KHR-GLES32.core.internalformat.texture2d.rgba_half_float_oes_rgba_linear
 KHR-GLES32.core.internalformat.texture2d.rgb_float_rgb32f
 KHR-GLES32.core.internalformat.texture2d.rgba_float_rgba32f
 KHR-GLES32.core.internalformat.texture2d.rgb_float_rgb32f_linear
@@ -1058,6 +1058,8 @@ 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.rgb_half_float_rgb16f
+KHR-GLES32.core.internalformat.texture2d.rgba_half_float_rgba16f
 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
index 6442929..85862c1 100644 (file)
@@ -460,6 +460,7 @@ void InternalformatCaseBase::generateTextureData(GLuint width, GLuint height, GL
                colorConversionMap[GL_BYTE]                                                = &convertByte;
                colorConversionMap[GL_UNSIGNED_BYTE]                       = &convertUByte;
                colorConversionMap[GL_HALF_FLOAT]                                  = &convertHFloat;
+               colorConversionMap[GL_HALF_FLOAT_OES]                      = &convertHFloat;
                colorConversionMap[GL_FLOAT]                                       = &convertFloat;
                colorConversionMap[GL_SHORT]                                       = &convertShort;
                colorConversionMap[GL_UNSIGNED_SHORT]                      = &convertUShort;
@@ -1422,10 +1423,10 @@ void InternalformatTests::getESTestData(TestData& testData, glu::ContextType& co
                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_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),
-               TF(GL_RGBA, GL_HALF_FLOAT, GL_RGBA16F, OES_texture_half_float_linear, DE_NULL, GL_LINEAR, GL_LINEAR),
+               TF(GL_RGB, GL_HALF_FLOAT_OES, GL_RGB, OES_texture_half_float),
+               TF(GL_RGBA, GL_HALF_FLOAT_OES, GL_RGBA, OES_texture_half_float),
+               TF(GL_RGB, GL_HALF_FLOAT_OES, GL_RGB, OES_texture_half_float_linear, DE_NULL, GL_LINEAR, GL_LINEAR),
+               TF(GL_RGBA, GL_HALF_FLOAT_OES, GL_RGBA, OES_texture_half_float_linear, DE_NULL, GL_LINEAR, GL_LINEAR),
                TF(GL_RGB, GL_FLOAT, GL_RGB32F, OES_texture_float),
                TF(GL_RGBA, GL_FLOAT, GL_RGBA32F, OES_texture_float),
                TF(GL_RGB, GL_FLOAT, GL_RGB32F, OES_texture_float_linear, DE_NULL, GL_LINEAR, GL_LINEAR),
@@ -1462,6 +1463,8 @@ 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_RGB, GL_HALF_FLOAT, GL_RGB16F),
+                       TF(GL_RGBA, GL_HALF_FLOAT, GL_RGBA16F),
                        TF(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8),
                };