[Mesa-dev] [PATCH] st/dri: Fix tests for no draw/read buffers in dri_make_current()

Michel Dänzer michel at daenzer.net
Thu Jan 30 19:15:57 PST 2014


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes piglit glx/GLX_ARB_create_context/current with no framebuffer.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/gallium/state_trackers/dri/common/dri_context.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 988e28e..f6979a7 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) {
-- 
1.8.5.3



More information about the mesa-dev mailing list