mesa: Add GL_RGBA + GL_UNSIGNED_INT_2_10_10_10_REV for OES read type.
authorMario Kleiner <mario.kleiner.de@gmail.com>
Fri, 15 Dec 2017 22:04:56 +0000 (23:04 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jan 2018 21:57:56 +0000 (22:57 +0100)
This format + type combo is good for BGRA1010102 framebuffers
for use with glReadPixels() under GLES, so add it for the
GL_IMPLEMENTATION_COLOR_READ_TYPE_OES query.

Allows successful testing of 10 bpc / depth 30 rendering with dEQP test
case dEQP-EGL.functional.wide_color.window_1010102_colorspace_default.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/framebuffer.c

index b17d7cbc94cb89c755720c1caefb3991efe0ada6..a0de6694d1050db1ab7de37b78a5d584ae78f2d4 100644 (file)
@@ -889,6 +889,9 @@ _mesa_get_color_read_type(struct gl_context *ctx,
       if (format == MESA_FORMAT_B5G6R5_UNORM)
          return GL_UNSIGNED_SHORT_5_6_5;
 
+      if (format == MESA_FORMAT_B10G10R10A2_UNORM)
+         return GL_UNSIGNED_INT_2_10_10_10_REV;
+
       switch (data_type) {
       case GL_SIGNED_NORMALIZED:
          return GL_BYTE;