[Mesa-dev] [PATCH 3/4] st/dri2: Propagate stapi make_current failure
George Barrett
bob at bob131.so
Tue Nov 21 11:15:44 UTC 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171121/205fd768/attachment.sig>
More information about the mesa-dev
mailing list