Re: [Mesa-dev] [PATCH] mesa/extensions: Fix NVX_gpu_memory_info lexicographical order.

2016-02-08 Thread Nanley Chery
On Sat, Feb 06, 2016 at 01:20:30PM +0100, Kai Wasserbäch wrote:
> Hey Vinson,
> I would say the test is wrong. If I sort as a human, "NV_" comes before 
> "NVX_".
> 
> And running this through sort (the tool), it agrees:
> 
> $ echo -e "NVX_gpu_memory_info\nNV_blend_square" | sort -d
> NV_blend_square
> NVX_gpu_memory_info
> 
> From src/mesa/main/tests/mesa_extensions.cpp I'm seeing that you don't 
> actually
> check the dictionary order but rather the character value. So it depends 
> whether
> you want to make humans or a simple test happy. ;-) But that's to decide for
> people more involved in Mesa.
> 

The test implements the same character sorting method used to create
the extensions string in Mesa.
See extension_compare() in src/mesa/main/extensions.c.

If we want to change the test behaviour, I think it'd be good to change
Mesa's as well for consistency.

Regards,
Nanley

> Cheers,
> Kai
> 
> 
> Vinson Lee wrote on 06.02.2016 08:30:
> > Fixes MesaExtensionsTest.AlphabeticallySorted.
> > 
> > Fixes: 1d79b9958090 ("mesa: implement GL_NVX_gpu_memory_info (v2)")
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94016
> > Signed-off-by: Vinson Lee 
> > ---
> >  src/mesa/main/extensions_table.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/mesa/main/extensions_table.h 
> > b/src/mesa/main/extensions_table.h
> > index ded6f2c..d1e3a99 100644
> > --- a/src/mesa/main/extensions_table.h
> > +++ b/src/mesa/main/extensions_table.h
> > @@ -273,6 +273,8 @@ EXT(MESA_texture_signed_rgba, 
> > EXT_texture_snorm
> >  EXT(MESA_window_pos , dummy_true   
> >   , GLL,  x ,  x ,  x , 2000)
> >  EXT(MESA_ycbcr_texture  , MESA_ycbcr_texture   
> >   , GLL, GLC,  x ,  x , 2002)
> >  
> > +EXT(NVX_gpu_memory_info , NVX_gpu_memory_info  
> >   , GLL, GLC,  x ,  x , 2013)
> > +
> >  EXT(NV_blend_square , dummy_true   
> >   , GLL,  x ,  x ,  x , 1999)
> >  EXT(NV_conditional_render   , NV_conditional_render
> >   , GLL, GLC,  x ,  x , 2008)
> >  EXT(NV_depth_clamp  , ARB_depth_clamp  
> >   , GLL, GLC,  x ,  x , 2001)
> > @@ -293,7 +295,6 @@ EXT(NV_texture_barrier  , 
> > NV_texture_barrier
> >  EXT(NV_texture_env_combine4 , NV_texture_env_combine4  
> >   , GLL,  x ,  x ,  x , 1999)
> >  EXT(NV_texture_rectangle, NV_texture_rectangle 
> >   , GLL,  x ,  x ,  x , 2000)
> >  EXT(NV_vdpau_interop, NV_vdpau_interop 
> >   , GLL, GLC,  x ,  x , 2010)
> > -EXT(NVX_gpu_memory_info , NVX_gpu_memory_info  
> >   , GLL, GLC,  x ,  x , 2013)
> >  
> >  EXT(OES_EGL_image   , OES_EGL_image
> >   , GLL, GLC, ES1, ES2, 2006) /* FIXME: Mesa expects 
> > GL_OES_EGL_image to be available in OpenGL contexts. */
> >  EXT(OES_EGL_image_external  , OES_EGL_image_external   
> >   ,  x ,  x , ES1, ES2, 2010)
> > 
> 



> ___
> 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] mesa/extensions: Fix NVX_gpu_memory_info lexicographical order.

2016-02-07 Thread Marek Olšák
Reviewed-by: Marek Olšák 

On Sat, Feb 6, 2016 at 8:30 AM, Vinson Lee  wrote:
> Fixes MesaExtensionsTest.AlphabeticallySorted.
>
> Fixes: 1d79b9958090 ("mesa: implement GL_NVX_gpu_memory_info (v2)")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94016
> Signed-off-by: Vinson Lee 
> ---
>  src/mesa/main/extensions_table.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/extensions_table.h 
> b/src/mesa/main/extensions_table.h
> index ded6f2c..d1e3a99 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -273,6 +273,8 @@ EXT(MESA_texture_signed_rgba, 
> EXT_texture_snorm
>  EXT(MESA_window_pos , dummy_true 
> , GLL,  x ,  x ,  x , 2000)
>  EXT(MESA_ycbcr_texture  , MESA_ycbcr_texture 
> , GLL, GLC,  x ,  x , 2002)
>
> +EXT(NVX_gpu_memory_info , NVX_gpu_memory_info
> , GLL, GLC,  x ,  x , 2013)
> +
>  EXT(NV_blend_square , dummy_true 
> , GLL,  x ,  x ,  x , 1999)
>  EXT(NV_conditional_render   , NV_conditional_render  
> , GLL, GLC,  x ,  x , 2008)
>  EXT(NV_depth_clamp  , ARB_depth_clamp
> , GLL, GLC,  x ,  x , 2001)
> @@ -293,7 +295,6 @@ EXT(NV_texture_barrier  , 
> NV_texture_barrier
>  EXT(NV_texture_env_combine4 , NV_texture_env_combine4
> , GLL,  x ,  x ,  x , 1999)
>  EXT(NV_texture_rectangle, NV_texture_rectangle   
> , GLL,  x ,  x ,  x , 2000)
>  EXT(NV_vdpau_interop, NV_vdpau_interop   
> , GLL, GLC,  x ,  x , 2010)
> -EXT(NVX_gpu_memory_info , NVX_gpu_memory_info
> , GLL, GLC,  x ,  x , 2013)
>
>  EXT(OES_EGL_image   , OES_EGL_image  
> , GLL, GLC, ES1, ES2, 2006) /* FIXME: Mesa expects GL_OES_EGL_image 
> to be available in OpenGL contexts. */
>  EXT(OES_EGL_image_external  , OES_EGL_image_external 
> ,  x ,  x , ES1, ES2, 2010)
> --
> 2.7.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://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] mesa/extensions: Fix NVX_gpu_memory_info lexicographical order.

2016-02-06 Thread Kai Wasserbäch
Hey Vinson,
I would say the test is wrong. If I sort as a human, "NV_" comes before "NVX_".

And running this through sort (the tool), it agrees:

$ echo -e "NVX_gpu_memory_info\nNV_blend_square" | sort -d
NV_blend_square
NVX_gpu_memory_info

From src/mesa/main/tests/mesa_extensions.cpp I'm seeing that you don't actually
check the dictionary order but rather the character value. So it depends whether
you want to make humans or a simple test happy. ;-) But that's to decide for
people more involved in Mesa.

Cheers,
Kai


Vinson Lee wrote on 06.02.2016 08:30:
> Fixes MesaExtensionsTest.AlphabeticallySorted.
> 
> Fixes: 1d79b9958090 ("mesa: implement GL_NVX_gpu_memory_info (v2)")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94016
> Signed-off-by: Vinson Lee 
> ---
>  src/mesa/main/extensions_table.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/extensions_table.h 
> b/src/mesa/main/extensions_table.h
> index ded6f2c..d1e3a99 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -273,6 +273,8 @@ EXT(MESA_texture_signed_rgba, 
> EXT_texture_snorm
>  EXT(MESA_window_pos , dummy_true 
> , GLL,  x ,  x ,  x , 2000)
>  EXT(MESA_ycbcr_texture  , MESA_ycbcr_texture 
> , GLL, GLC,  x ,  x , 2002)
>  
> +EXT(NVX_gpu_memory_info , NVX_gpu_memory_info
> , GLL, GLC,  x ,  x , 2013)
> +
>  EXT(NV_blend_square , dummy_true 
> , GLL,  x ,  x ,  x , 1999)
>  EXT(NV_conditional_render   , NV_conditional_render  
> , GLL, GLC,  x ,  x , 2008)
>  EXT(NV_depth_clamp  , ARB_depth_clamp
> , GLL, GLC,  x ,  x , 2001)
> @@ -293,7 +295,6 @@ EXT(NV_texture_barrier  , 
> NV_texture_barrier
>  EXT(NV_texture_env_combine4 , NV_texture_env_combine4
> , GLL,  x ,  x ,  x , 1999)
>  EXT(NV_texture_rectangle, NV_texture_rectangle   
> , GLL,  x ,  x ,  x , 2000)
>  EXT(NV_vdpau_interop, NV_vdpau_interop   
> , GLL, GLC,  x ,  x , 2010)
> -EXT(NVX_gpu_memory_info , NVX_gpu_memory_info
> , GLL, GLC,  x ,  x , 2013)
>  
>  EXT(OES_EGL_image   , OES_EGL_image  
> , GLL, GLC, ES1, ES2, 2006) /* FIXME: Mesa expects GL_OES_EGL_image 
> to be available in OpenGL contexts. */
>  EXT(OES_EGL_image_external  , OES_EGL_image_external 
> ,  x ,  x , ES1, ES2, 2010)
> 



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


[Mesa-dev] [PATCH] mesa/extensions: Fix NVX_gpu_memory_info lexicographical order.

2016-02-05 Thread Vinson Lee
Fixes MesaExtensionsTest.AlphabeticallySorted.

Fixes: 1d79b9958090 ("mesa: implement GL_NVX_gpu_memory_info (v2)")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94016
Signed-off-by: Vinson Lee 
---
 src/mesa/main/extensions_table.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index ded6f2c..d1e3a99 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -273,6 +273,8 @@ EXT(MESA_texture_signed_rgba, 
EXT_texture_snorm
 EXT(MESA_window_pos , dummy_true   
  , GLL,  x ,  x ,  x , 2000)
 EXT(MESA_ycbcr_texture  , MESA_ycbcr_texture   
  , GLL, GLC,  x ,  x , 2002)
 
+EXT(NVX_gpu_memory_info , NVX_gpu_memory_info  
  , GLL, GLC,  x ,  x , 2013)
+
 EXT(NV_blend_square , dummy_true   
  , GLL,  x ,  x ,  x , 1999)
 EXT(NV_conditional_render   , NV_conditional_render
  , GLL, GLC,  x ,  x , 2008)
 EXT(NV_depth_clamp  , ARB_depth_clamp  
  , GLL, GLC,  x ,  x , 2001)
@@ -293,7 +295,6 @@ EXT(NV_texture_barrier  , 
NV_texture_barrier
 EXT(NV_texture_env_combine4 , NV_texture_env_combine4  
  , GLL,  x ,  x ,  x , 1999)
 EXT(NV_texture_rectangle, NV_texture_rectangle 
  , GLL,  x ,  x ,  x , 2000)
 EXT(NV_vdpau_interop, NV_vdpau_interop 
  , GLL, GLC,  x ,  x , 2010)
-EXT(NVX_gpu_memory_info , NVX_gpu_memory_info  
  , GLL, GLC,  x ,  x , 2013)
 
 EXT(OES_EGL_image   , OES_EGL_image
  , GLL, GLC, ES1, ES2, 2006) /* FIXME: Mesa expects GL_OES_EGL_image to be 
available in OpenGL contexts. */
 EXT(OES_EGL_image_external  , OES_EGL_image_external   
  ,  x ,  x , ES1, ES2, 2010)
-- 
2.7.0

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