[Mesa-dev] [PATCH 3/4] st/dri2: Propagate stapi make_current failure

Marek Olšák maraeo at gmail.com
Tue Nov 21 21:23:31 UTC 2017


For patches 1-3:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Nov 21, 2017 at 12:15 PM, George Barrett <bob at bob131.so> wrote:
> dri_make_current discards the return value of st_api_make_current,
> preventing callers up the stack being made aware of any failures.
> ---
>  src/gallium/state_trackers/dri/dri_context.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
> index 18bbfa046c..6d11939ddf 100644
> --- a/src/gallium/state_trackers/dri/dri_context.c
> +++ b/src/gallium/state_trackers/dri/dri_context.c
> @@ -281,7 +281,9 @@ dri_make_current(__DRIcontext * cPriv,
>        read->texture_stamp = driReadPriv->lastStamp - 1;
>     }
>
> -   ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base, &read->base);
> +   if (!ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base,
> +                                 &read->base))
> +      return GL_FALSE;
>
>     /* This is ok to call here. If they are already init, it's a no-op. */
>     if (ctx->pp && draw->textures[ST_ATTACHMENT_BACK_LEFT])
> --
> 2.14.3
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


More information about the mesa-dev mailing list