From: Michel Dänzer Date: Thu, 30 Jan 2014 07:47:28 +0000 (+0900) Subject: st/dri: Fix tests for no draw/read buffers in dri_make_current() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db8b6fb2dfcbbb7ae53371f2835aa08553b6f37d;p=mesa.git st/dri: Fix tests for no draw/read buffers in dri_make_current() Fixes piglit glx/GLX_ARB_create_context/current with no framebuffer. Reviewed-by: Marek Olšák --- diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c index 988e28ea244..f6979a7c2d0 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -236,9 +236,9 @@ dri_make_current(__DRIcontext * cPriv, ++ctx->bind_count; - if (!driDrawPriv && !driReadPriv) + if (!draw && !read) return ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL); - else if (!driDrawPriv || !driReadPriv) + else if (!draw || !read) return GL_FALSE; if (ctx->dPriv != driDrawPriv) {