[Mesa-dev] [PATCH] glx: use correct table offset for glAreTexturesResidentEXT

Nicolai Hähnle nhaehnle at gmail.com
Tue Jul 25 08:12:18 UTC 2017


On 21.07.2017 16:57, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> The correct offset is 322 as opposed to 332.
> Broken since the rework of GET_DISPATCH back in ~2012.

This is kind of amazing. How did you run into this?

Maybe add a simple touch test to piglit?

Maybe use _gloffset_AreTexturesResident (from dispatch.h) instead of 
using a magic number?

Cheers,
Nicolai


> 
> Cc: mesa-stable at lists.freedesktop.org
> Cc: Ian Romanick <ian.d.romanick at intel.com>
> Fixes 99fee476a102 ("glx: Don't use glapitable.h at all")
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> I'm looking if we can purge most of this code in favour of the generated
> one ... in indirect.c (yes, that file has both direct and indirect bits)
> 
>   src/glx/single2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/glx/single2.c b/src/glx/single2.c
> index 2a1bf06bc0a..42ff8bccc45 100644
> --- a/src/glx/single2.c
> +++ b/src/glx/single2.c
> @@ -917,7 +917,7 @@ glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
>      if (gc->isDirect) {
>         const _glapi_proc *const table = (_glapi_proc *) GET_DISPATCH();
>         PFNGLARETEXTURESRESIDENTEXTPROC p =
> -         (PFNGLARETEXTURESRESIDENTEXTPROC) table[332];
> +         (PFNGLARETEXTURESRESIDENTEXTPROC) table[322];
>   
>         return p(n, textures, residences);
>      }
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list