Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

2018-08-30 Thread Dylan Baker
Quoting Tapani Pälli (2018-08-29 21:26:08)
> 
> 
> On 08/29/2018 06:22 PM, Dylan Baker wrote:
> > Quoting Tapani Pälli (2018-08-27 04:46:37)
> >> OpenGL ES spec states:
> >> "For normalized fixed-point rendering surfaces, the combination format
> >>  RGBA and type UNSIGNED_BYTE is accepted."
> >>
> >> This fixes following failing VK-GL-CTS tests:
> >>
> >> KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
> >> KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
> >> KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm
> >>
> >> Signed-off-by: Tapani Pälli 
> >> https://bugs.freedesktop.org/show_bug.cgi?id=107658
> >> Cc: mesa-sta...@lists.freedesktop.org
> >> ---
> >>
> >> This is a partial fix to the bug. I believe there are 2 separate
> >> issues within reported bug and this fixes the first one.
> >>
> >>   src/mesa/main/readpix.c | 9 +
> >>   1 file changed, 9 insertions(+)
> >>
> >> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> >> index 2cbb578a37f..556c860d393 100644
> >> --- a/src/mesa/main/readpix.c
> >> +++ b/src/mesa/main/readpix.c
> >> @@ -958,6 +958,15 @@ read_pixels_es3_error_check(struct gl_context *ctx, 
> >> GLenum format, GLenum type,
> >>  return GL_NO_ERROR;
> >>}
> >> }
> >> +  if (type == GL_UNSIGNED_BYTE) {
> >> + switch (internalFormat) {
> >> + case GL_R8_SNORM:
> >> + case GL_RG8_SNORM:
> >> + case GL_RGBA8_SNORM:
> >> +if (_mesa_has_EXT_render_snorm(ctx))
> >> +   return GL_NO_ERROR;
> >> + }
> >> +  }
> >> break;
> >>  case GL_BGRA:
> >> /* GL_EXT_read_format_bgra */
> >> -- 
> >> 2.14.4
> >>
> > 
> > Hi Tapani,
> > 
> > This doesn't apply cleanly to 18.1 because "mesa: enable EXT_render_snorm
> > extension" isn't present on the branch. Does it still make sense to pull 
> > this
> > into 18.1?
> > 
> 
> Ah nope, patch makes sense only with EXT_render_snorm.
> 
> // Tapani

Cool. Thanks for following up, I've added this to the ignore list for 18.1.

Dylan


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


Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

2018-08-29 Thread Tapani Pälli



On 08/30/2018 01:04 AM, Andres Gomez wrote:

On Wed, 2018-08-29 at 08:22 -0700, Dylan Baker wrote:

Quoting Tapani Pälli (2018-08-27 04:46:37)

OpenGL ES spec states:
"For normalized fixed-point rendering surfaces, the combination format
 RGBA and type UNSIGNED_BYTE is accepted."

This fixes following failing VK-GL-CTS tests:

KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm

Signed-off-by: Tapani Pälli 
https://bugs.freedesktop.org/show_bug.cgi?id=107658
Cc: mesa-sta...@lists.freedesktop.org
---

This is a partial fix to the bug. I believe there are 2 separate
issues within reported bug and this fixes the first one.

  src/mesa/main/readpix.c | 9 +
  1 file changed, 9 insertions(+)

diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 2cbb578a37f..556c860d393 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -958,6 +958,15 @@ read_pixels_es3_error_check(struct gl_context *ctx, GLenum 
format, GLenum type,
 return GL_NO_ERROR;
   }
}
+  if (type == GL_UNSIGNED_BYTE) {
+ switch (internalFormat) {
+ case GL_R8_SNORM:
+ case GL_RG8_SNORM:
+ case GL_RGBA8_SNORM:
+if (_mesa_has_EXT_render_snorm(ctx))
+   return GL_NO_ERROR;
+ }
+  }
break;
 case GL_BGRA:
/* GL_EXT_read_format_bgra */
--
2.14.4



Hi Tapani,

This doesn't apply cleanly to 18.1 because "mesa: enable EXT_render_snorm
extension" isn't present on the branch. Does it still make sense to pull this
into 18.1?


Likewise for 18.2.

The offending commit that caused the regression didn't make it for any
of the current stable queues so I think it is safe just to ignore this
patch. Can you confirm?



Yes, please ignore. I thought it made to some branch but it seems not :)

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


Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

2018-08-29 Thread Tapani Pälli



On 08/29/2018 06:22 PM, Dylan Baker wrote:

Quoting Tapani Pälli (2018-08-27 04:46:37)

OpenGL ES spec states:
"For normalized fixed-point rendering surfaces, the combination format
 RGBA and type UNSIGNED_BYTE is accepted."

This fixes following failing VK-GL-CTS tests:

KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm

Signed-off-by: Tapani Pälli 
https://bugs.freedesktop.org/show_bug.cgi?id=107658
Cc: mesa-sta...@lists.freedesktop.org
---

This is a partial fix to the bug. I believe there are 2 separate
issues within reported bug and this fixes the first one.

  src/mesa/main/readpix.c | 9 +
  1 file changed, 9 insertions(+)

diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 2cbb578a37f..556c860d393 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -958,6 +958,15 @@ read_pixels_es3_error_check(struct gl_context *ctx, GLenum 
format, GLenum type,
 return GL_NO_ERROR;
   }
}
+  if (type == GL_UNSIGNED_BYTE) {
+ switch (internalFormat) {
+ case GL_R8_SNORM:
+ case GL_RG8_SNORM:
+ case GL_RGBA8_SNORM:
+if (_mesa_has_EXT_render_snorm(ctx))
+   return GL_NO_ERROR;
+ }
+  }
break;
 case GL_BGRA:
/* GL_EXT_read_format_bgra */
--
2.14.4



Hi Tapani,

This doesn't apply cleanly to 18.1 because "mesa: enable EXT_render_snorm
extension" isn't present on the branch. Does it still make sense to pull this
into 18.1?



Ah nope, patch makes sense only with EXT_render_snorm.

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


Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

2018-08-29 Thread Andres Gomez
On Wed, 2018-08-29 at 08:22 -0700, Dylan Baker wrote:
> Quoting Tapani Pälli (2018-08-27 04:46:37)
> > OpenGL ES spec states:
> >"For normalized fixed-point rendering surfaces, the combination format
> > RGBA and type UNSIGNED_BYTE is accepted."
> > 
> > This fixes following failing VK-GL-CTS tests:
> > 
> >KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
> >KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
> >KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm
> > 
> > Signed-off-by: Tapani Pälli 
> > https://bugs.freedesktop.org/show_bug.cgi?id=107658
> > Cc: mesa-sta...@lists.freedesktop.org
> > ---
> > 
> > This is a partial fix to the bug. I believe there are 2 separate
> > issues within reported bug and this fixes the first one.
> > 
> >  src/mesa/main/readpix.c | 9 +
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> > index 2cbb578a37f..556c860d393 100644
> > --- a/src/mesa/main/readpix.c
> > +++ b/src/mesa/main/readpix.c
> > @@ -958,6 +958,15 @@ read_pixels_es3_error_check(struct gl_context *ctx, 
> > GLenum format, GLenum type,
> > return GL_NO_ERROR;
> >   }
> >}
> > +  if (type == GL_UNSIGNED_BYTE) {
> > + switch (internalFormat) {
> > + case GL_R8_SNORM:
> > + case GL_RG8_SNORM:
> > + case GL_RGBA8_SNORM:
> > +if (_mesa_has_EXT_render_snorm(ctx))
> > +   return GL_NO_ERROR;
> > + }
> > +  }
> >break;
> > case GL_BGRA:
> >/* GL_EXT_read_format_bgra */
> > -- 
> > 2.14.4
> > 
> 
> Hi Tapani,
> 
> This doesn't apply cleanly to 18.1 because "mesa: enable EXT_render_snorm
> extension" isn't present on the branch. Does it still make sense to pull this
> into 18.1?

Likewise for 18.2.

The offending commit that caused the regression didn't make it for any
of the current stable queues so I think it is safe just to ignore this
patch. Can you confirm?

-- 
Br,

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


Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

2018-08-29 Thread Dylan Baker
Quoting Tapani Pälli (2018-08-27 04:46:37)
> OpenGL ES spec states:
>"For normalized fixed-point rendering surfaces, the combination format
> RGBA and type UNSIGNED_BYTE is accepted."
> 
> This fixes following failing VK-GL-CTS tests:
> 
>KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
>KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
>KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm
> 
> Signed-off-by: Tapani Pälli 
> https://bugs.freedesktop.org/show_bug.cgi?id=107658
> Cc: mesa-sta...@lists.freedesktop.org
> ---
> 
> This is a partial fix to the bug. I believe there are 2 separate
> issues within reported bug and this fixes the first one.
> 
>  src/mesa/main/readpix.c | 9 +
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> index 2cbb578a37f..556c860d393 100644
> --- a/src/mesa/main/readpix.c
> +++ b/src/mesa/main/readpix.c
> @@ -958,6 +958,15 @@ read_pixels_es3_error_check(struct gl_context *ctx, 
> GLenum format, GLenum type,
> return GL_NO_ERROR;
>   }
>}
> +  if (type == GL_UNSIGNED_BYTE) {
> + switch (internalFormat) {
> + case GL_R8_SNORM:
> + case GL_RG8_SNORM:
> + case GL_RGBA8_SNORM:
> +if (_mesa_has_EXT_render_snorm(ctx))
> +   return GL_NO_ERROR;
> + }
> +  }
>break;
> case GL_BGRA:
>/* GL_EXT_read_format_bgra */
> -- 
> 2.14.4
> 

Hi Tapani,

This doesn't apply cleanly to 18.1 because "mesa: enable EXT_render_snorm
extension" isn't present on the branch. Does it still make sense to pull this
into 18.1?

Dylan


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


Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

2018-08-27 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Mon, Aug 27, 2018 at 7:46 AM, Tapani Pälli  wrote:
> OpenGL ES spec states:
>"For normalized fixed-point rendering surfaces, the combination format
> RGBA and type UNSIGNED_BYTE is accepted."
>
> This fixes following failing VK-GL-CTS tests:
>
>KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
>KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
>KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm
>
> Signed-off-by: Tapani Pälli 
> https://bugs.freedesktop.org/show_bug.cgi?id=107658
> Cc: mesa-sta...@lists.freedesktop.org
> ---
>
> This is a partial fix to the bug. I believe there are 2 separate
> issues within reported bug and this fixes the first one.
>
>  src/mesa/main/readpix.c | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> index 2cbb578a37f..556c860d393 100644
> --- a/src/mesa/main/readpix.c
> +++ b/src/mesa/main/readpix.c
> @@ -958,6 +958,15 @@ read_pixels_es3_error_check(struct gl_context *ctx, 
> GLenum format, GLenum type,
> return GL_NO_ERROR;
>   }
>}
> +  if (type == GL_UNSIGNED_BYTE) {
> + switch (internalFormat) {
> + case GL_R8_SNORM:
> + case GL_RG8_SNORM:
> + case GL_RGBA8_SNORM:
> +if (_mesa_has_EXT_render_snorm(ctx))
> +   return GL_NO_ERROR;
> + }
> +  }
>break;
> case GL_BGRA:
>/* GL_EXT_read_format_bgra */
> --
> 2.14.4
>
> ___
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev