diff options
author | Mario Kleiner <[email protected]> | 2017-12-15 23:05:09 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-01-03 22:57:57 +0100 |
commit | 190ac52827da3b6e094102df54c7cbc04c77e3e3 (patch) | |
tree | 8a0b40b3e90193daade44c787597a2656c175575 /src/mesa/main | |
parent | 2d8e1a6a277cb1684d76210351147f5e7858c8b2 (diff) |
mesa: Add GL_UNSIGNED_INT_2_10_10_10_REV OES read type for BGRX1010102.
As Marek noted, the GL_RGBA + GL_UNSIGNED_INT_2_10_10_10_REV type
combo is also good for readback of BGRX1010102 framebuffers, not
only for BGRA1010102 framebuffers for use with glReadPixels()
under GLES, so add it for the GL_IMPLEMENTATION_COLOR_READ_TYPE_OES
query.
Successfully tested on gallium r600 driver with a (quickly hacked
for RGBA 10 10 10 0) dEQP testcase
dEQP-EGL.functional.wide_color.window_1010102_colorspace_default.
Suggested-by: Marek Olšák <[email protected]>
Signed-off-by: Mario Kleiner <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/framebuffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index a0de6694d10..e103f313e45 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -889,7 +889,8 @@ _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) + if (format == MESA_FORMAT_B10G10R10A2_UNORM || + format == MESA_FORMAT_B10G10R10X2_UNORM) return GL_UNSIGNED_INT_2_10_10_10_REV; switch (data_type) { |