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

2017-12-15 Thread Mario Kleiner
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 
Reviewed-by: Tapani Pälli 
Reviewed-by: Marek Olšák 
---
 src/mesa/main/framebuffer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index b17d7cb..a0de669 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -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;
-- 
2.7.4

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


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

2017-12-04 Thread Tapani Pälli


On 04.12.2017 20:45, Marek Olšák wrote:

Do we need to handle B10G10R10X2 as well?


Good catch, that is missing indeed. Also noticed that dEQP wide color 
test does not test BGRX.



Marek

On Wed, Nov 29, 2017 at 5:20 AM, Mario Kleiner
 wrote:

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 
---
  src/mesa/main/framebuffer.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index b17d7cb..a0de669 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -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;
--
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 mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-12-04 Thread Marek Olšák
Do we need to handle B10G10R10X2 as well?

Marek

On Wed, Nov 29, 2017 at 5:20 AM, Mario Kleiner
 wrote:
> 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 
> ---
>  src/mesa/main/framebuffer.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
> index b17d7cb..a0de669 100644
> --- a/src/mesa/main/framebuffer.c
> +++ b/src/mesa/main/framebuffer.c
> @@ -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;
> --
> 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 09/22] mesa: Add GL_RGBA + GL_UNSIGNED_INT_2_10_10_10_REV for OES read type.

2017-11-28 Thread Mario Kleiner
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 
---
 src/mesa/main/framebuffer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index b17d7cb..a0de669 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -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;
-- 
2.7.4

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