[Mesa-dev] [PATCH] glx: Don't use current context in __glXSendError

Tapani Pälli tapani.palli at intel.com
Tue Aug 16 07:11:51 UTC 2016


Hi;

On 08/16/2016 09:49 AM, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> There's no guarantee that there is one, and we don't need one anyway.
>
> Fixes piglit tests:
>
> glx at glx-fbconfig-bad

this one passes for me with and without the patch

> glx at glx_ext_import_context@import context, multi process
> glx at glx_ext_import_context@import context, single process

these 2 fail for me with and without the patch (and have been failing 
already before 2e3f067458e4) ... do these all pass for you before that 
change?

> Fixes: 2e3f067458e4 ("glx: fix error code when there is no context bound")
> Cc: "11.2" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  src/glx/glx_error.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/glx/glx_error.c b/src/glx/glx_error.c
> index e098682..653cbeb 100644
> --- a/src/glx/glx_error.c
> +++ b/src/glx/glx_error.c
> @@ -39,11 +39,9 @@ __glXSendError(Display * dpy, int_fast8_t errorCode, uint_fast32_t resourceID,
>                 uint_fast16_t minorCode, bool coreX11error)
>  {
>     struct glx_display *glx_dpy = __glXInitialize(dpy);
> -   struct glx_context *gc = __glXGetCurrentContext();
>     xError error;
>
>     assert(glx_dpy);
> -   assert(gc != &dummyContext);
>
>     LockDisplay(dpy);
>
> @@ -59,7 +57,7 @@ __glXSendError(Display * dpy, int_fast8_t errorCode, uint_fast32_t resourceID,
>     error.sequenceNumber = dpy->request;
>     error.resourceID = resourceID;
>     error.minorCode = minorCode;
> -   error.majorCode = gc ? gc->majorOpcode : 0;
> +   error.majorCode = glx_dpy->majorOpcode;
>
>     _XError(dpy, &error);
>
>


More information about the mesa-dev mailing list