Fix framebuffer completeness tests with sRGB targets.
authorJarkko Pöyry <jpoyry@google.com>
Fri, 24 Oct 2014 21:37:41 +0000 (14:37 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Fri, 24 Oct 2014 22:07:58 +0000 (15:07 -0700)
- Don't expect SRGB to become renderable in GL_EXT_sRGB extension
- Support GL_EXT_sRGB_write_control extension
- Support GL_NV_sRGB_formats extension
- Add missing GLES3 texture formats
- Remove modified cases from must-pass list

Bug: 18094134
Change-Id: I7587ff4a0e6106b74780dae193fa16970145a02e

android/cts/com.drawelements.deqp.gles3.xml
android/cts/es30-mustpass-2014.2.9-2014-10-24.txt [moved from android/cts/es30-mustpass-2014.2.9-2014-10-22.txt with 99% similarity]
android/cts/es31-mustpass-2014.2.9-2014-10-24.txt [moved from android/cts/es31-mustpass-2014.2.9-2014-10-22.txt with 100% similarity]
modules/gles2/functional/es2fFboCompletenessTests.cpp
modules/gles3/functional/es3fFboCompletenessTests.cpp
modules/glshared/glsFboCompletenessTests.cpp

index 6af073a..43db172 100644 (file)
 <Test name="rgba16f" />
 <Test name="depth24_stencil8" />
 <Test name="r11f_g11f_b10f" />
-<Test name="srgb_unsigned_byte" />
 <Test name="srgb_alpha_unsigned_byte" />
 <Test name="srgb8_alpha8" />
 <Test name="depth_component32f" />
@@ -25928,7 +25928,6 @@ dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba32f
 dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba16f
 dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.depth24_stencil8
 dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.r11f_g11f_b10f
-dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.srgb_unsigned_byte
 dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.srgb_alpha_unsigned_byte
 dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.srgb8_alpha8
 dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.depth_component32f
index 24882aa..5a67f8d 100644 (file)
@@ -96,6 +96,12 @@ static const FormatKey s_oesTextureHalfFloatFormats[] =
        GLS_UNSIZED_FORMATKEY(GL_RGB,   GL_HALF_FLOAT_OES),
 };
 
+// GL_EXT_sRGB_write_control
+static const FormatKey s_extSrgbWriteControlFormats[] =
+{
+       GL_SRGB8_ALPHA8
+};
+
 static const FormatExtEntry s_es2ExtFormats[] =
 {
        // The extension does not specify these to be color-renderable.
@@ -109,6 +115,13 @@ static const FormatExtEntry s_es2ExtFormats[] =
                TEXTURE_VALID,
                GLS_ARRAY_RANGE(s_oesTextureHalfFloatFormats)
        },
+
+       // GL_EXT_sRGB_write_control makes SRGB8_ALPHA8 color-renderable
+       {
+               "GL_EXT_sRGB_write_control",
+               REQUIRED_RENDERABLE | TEXTURE_VALID | COLOR_RENDERABLE | RENDERBUFFER_VALID,
+               GLS_ARRAY_RANGE(s_extSrgbWriteControlFormats)
+       },
 };
 
 class ES2Checker : public Checker
index c594e4c..b392f51 100644 (file)
@@ -93,6 +93,14 @@ static const FormatKey s_es3TextureFloatFormats[] =
        GL_RGBA16F, GL_RGB16F, GL_RG16F, GL_R16F,
 };
 
+static const FormatKey s_es3NotRenderableTextureFormats[] =
+{
+       GL_R8_SNORM, GL_RG8_SNORM, GL_RGB8_SNORM, GL_RGBA8_SNORM,
+       GL_RGB9_E5, GL_SRGB8,
+       GL_RGB8I, GL_RGB16I, GL_RGB32I,
+       GL_RGB8UI, GL_RGB16UI,GL_RGB32UI,
+};
+
 static const FormatEntry s_es3Formats[] =
 {
        // Renderbuffers don't support unsized formats
@@ -106,6 +114,8 @@ static const FormatEntry s_es3Formats[] =
          GLS_ARRAY_RANGE(s_es3StencilRboRenderables) },
        { REQUIRED_RENDERABLE | STENCIL_RENDERABLE | RENDERBUFFER_VALID | TEXTURE_VALID,
          GLS_ARRAY_RANGE(s_es3StencilRenderables) },
+       { TEXTURE_VALID,
+         GLS_ARRAY_RANGE(s_es3NotRenderableTextureFormats) },
 
        // These are not color-renderable in vanilla ES3, but we need to mark them
        // as valid for textures, since EXT_color_buffer_(half_)float brings in
index 498f1fd..80d5e6c 100644 (file)
@@ -175,12 +175,22 @@ static const FormatKey s_extSrgbRboFormats[] =
        GL_SRGB8_ALPHA8,
 };
 
-static const FormatKey s_extSrgbTexFormats[] =
+static const FormatKey s_extSrgbRenderableTexFormats[] =
 {
-       GLS_UNSIZED_FORMATKEY(GL_SRGB,                  GL_UNSIGNED_BYTE),
        GLS_UNSIZED_FORMATKEY(GL_SRGB_ALPHA,    GL_UNSIGNED_BYTE),
 };
 
+static const FormatKey s_extSrgbNonRenderableTexFormats[] =
+{
+       GLS_UNSIZED_FORMATKEY(GL_SRGB,                  GL_UNSIGNED_BYTE),
+       GL_SRGB8,
+};
+
+static const FormatKey s_nvSrgbFormatsFormats[] =
+{
+       GL_SRGB8,
+};
+
 static const FormatKey s_oesRgb8Rgba8TexFormats[] =
 {
        GLS_UNSIZED_FORMATKEY(GL_RGB,           GL_UNSIGNED_BYTE),
@@ -282,13 +292,23 @@ static const FormatExtEntry s_esExtFormats[] =
        {
                "GL_EXT_sRGB",
                COLOR_RENDERABLE | TEXTURE_VALID,
-               GLS_ARRAY_RANGE(s_extSrgbTexFormats)
+               GLS_ARRAY_RANGE(s_extSrgbRenderableTexFormats)
+       },
+       {
+               "GL_EXT_sRGB",
+               TEXTURE_VALID,
+               GLS_ARRAY_RANGE(s_extSrgbNonRenderableTexFormats)
        },
        {
                "GL_EXT_sRGB",
                REQUIRED_RENDERABLE | COLOR_RENDERABLE | RENDERBUFFER_VALID,
                GLS_ARRAY_RANGE(s_extSrgbRboFormats)
        },
+       {
+               "GL_NV_sRGB_formats",
+               REQUIRED_RENDERABLE | COLOR_RENDERABLE | TEXTURE_VALID | RENDERBUFFER_VALID,
+               GLS_ARRAY_RANGE(s_nvSrgbFormatsFormats)
+       },
 
         // In Khronos bug 7333 discussion, the consensus is that these texture
         // formats, at least, should be color-renderable. Still, that cannot be