From db8b6fb2dfcbbb7ae53371f2835aa08553b6f37d Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 30 Jan 2014 16:47:28 +0900 Subject: st/dri: Fix tests for no draw/read buffers in dri_make_current() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes piglit glx/GLX_ARB_create_context/current with no framebuffer. Reviewed-by: Marek Olšák --- src/gallium/state_trackers/dri/common/dri_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3