[Mesa-dev] [PATCH] glx/dri: Initialize reset to __DRI_CTX_RESET_NO_NOTIFICATION.

Jordan Justen jljusten at gmail.com
Mon Aug 6 16:08:29 PDT 2012


Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On Mon, Aug 6, 2012 at 3:12 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> If the application has requested reset notification, then
> dri2_convert_glx_attribs will initialize this to the correct value.
>
> Otherwise, it's supposed to initialize this to NO_NOTIFICATION, but
> doesn't when num_attribs == 0.
>
> Fixes a regression since a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473
> where trying to apitrace Unigine Heaven would result in:
>
> dri_util.c:221: dri2CreateContextAttribs: Assertion `!"Should not get
> here."' failed.
>
> Cc: Ian Romanick <idr at freedesktop.org>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/glx/dri2_glx.c  | 2 +-
>  src/glx/drisw_glx.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
> index 79237c3..4e8b351 100644
> --- a/src/glx/dri2_glx.c
> +++ b/src/glx/dri2_glx.c
> @@ -241,7 +241,7 @@ dri2_create_context_attribs(struct glx_screen *base,
>     uint32_t major_ver = 2;
>     uint32_t flags = 0;
>     unsigned api;
> -   int reset;
> +   int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
>     uint32_t ctx_attribs[2 * 5];
>     unsigned num_ctx_attribs = 0;
>
> diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
> index 519786e..462be7d 100644
> --- a/src/glx/drisw_glx.c
> +++ b/src/glx/drisw_glx.c
> @@ -433,7 +433,7 @@ drisw_create_context_attribs(struct glx_screen *base,
>     uint32_t major_ver = 0;
>     uint32_t flags = 0;
>     unsigned api;
> -   int reset;
> +   int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
>     uint32_t ctx_attribs[2 * 4];
>     unsigned num_ctx_attribs = 0;
>
> --
> 1.7.11.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list