mesa/main: R10G10B10_(A2) formats are not color renderable in ES
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 27 Sep 2017 13:25:10 +0000 (15:25 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 2 Oct 2017 13:07:43 +0000 (15:07 +0200)
The EXT_texture_type_2_10_10_10_REV (ES only) states the following issue:

   "1. Should textures specified with this type be renderable?

    UNRESOLVED: No.  A separate extension could provide this functionality."

This partially fixes
dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.{rgb,rgba}_unsigned_int_2_10_10_10_rev

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/fbobject.c

index 4d6fdfcd6bd90be08c9dbb5b16b65d21c1febe6e..0867ff70fa7fd6640bc7e691b481a6f97c888b72 100644 (file)
@@ -737,8 +737,11 @@ is_format_color_renderable(const struct gl_context *ctx, mesa_format format,
       break;
    }
 
-   if (format == MESA_FORMAT_B10G10R10A2_UNORM &&
-       internalFormat != GL_RGB10_A2) {
+   if (internalFormat != GL_RGB10_A2 &&
+       (format == MESA_FORMAT_B10G10R10A2_UNORM ||
+        format == MESA_FORMAT_B10G10R10X2_UNORM ||
+        format == MESA_FORMAT_R10G10B10A2_UNORM ||
+        format == MESA_FORMAT_R10G10B10X2_UNORM)) {
       return GL_FALSE;
    }