Mesa (master): st/dri: Fix tests for no draw/ read buffers in dri_make_current()

Michel Dänzer daenzer at kemper.freedesktop.org
Fri Jan 31 09:53:15 UTC 2014


Module: Mesa
Branch: master
Commit: db8b6fb2dfcbbb7ae53371f2835aa08553b6f37d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=db8b6fb2dfcbbb7ae53371f2835aa08553b6f37d

Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Thu Jan 30 16:47:28 2014 +0900

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 <marek.olsak 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) {




More information about the mesa-commit mailing list