st/dri: Fix tests for no draw/read buffers in dri_make_current()
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 30 Jan 2014 07:47:28 +0000 (16:47 +0900)
committerMichel Dänzer <michel@daenzer.net>
Fri, 31 Jan 2014 02:06:26 +0000 (11:06 +0900)
Fixes piglit glx/GLX_ARB_create_context/current with no framebuffer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/common/dri_context.c

index 988e28ea244a0b861f5b8a0d6cd2c55ca8f653fe..f6979a7c2d05494c303db1854a85a135a3cd0a98 100644 (file)
@@ -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) {