Re: [Mesa-dev] [PATCH 22/22] mesa: Add GL_UNSIGNED_INT_2_10_10_10_REV OES read type for BGRX1010102.

2017-12-18 Thread Tapani Pälli

Reviewed-by: Tapani Pälli 

On 12/16/2017 12:05 AM, Mario Kleiner wrote:

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 
Signed-off-by: Mario Kleiner 
---
  src/mesa/main/framebuffer.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index a0de669..e103f31 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) {



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 22/22] mesa: Add GL_UNSIGNED_INT_2_10_10_10_REV OES read type for BGRX1010102.

2017-12-15 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Fri, Dec 15, 2017 at 11:05 PM, Mario Kleiner
 wrote:
> 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 
> Signed-off-by: Mario Kleiner 
> ---
>  src/mesa/main/framebuffer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
> index a0de669..e103f31 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) {
> --
> 2.7.4
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 22/22] mesa: Add GL_UNSIGNED_INT_2_10_10_10_REV OES read type for BGRX1010102.

2017-12-15 Thread Mario Kleiner
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 
Signed-off-by: Mario Kleiner 
---
 src/mesa/main/framebuffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index a0de669..e103f31 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) {
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev