Signed-off-by: Jakob Bornecrantz <[email protected]>
NOTE: This is a candidate for the 7.10 branch.
---
.../state_trackers/dri/common/dri_context.c | 6 ++++--
1 files changed, 4 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 e23c1bc..d23655a 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -173,12 +173,14 @@ dri_make_current(__DRIcontext * cPriv,
if (old_st && old_st != ctx->st)
old_st->flush(old_st, ST_FLUSH_FRONT, NULL);
+ /* check if either is not set */
+ if (!driDrawPriv ^ !driReadPriv)
+ return GL_FALSE;
+
++ctx->bind_count;
if (!driDrawPriv && !driReadPriv)
return ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL);
- else if (!driDrawPriv || !driReadPriv)
- return GL_FALSE;
draw->context = ctx;
if (ctx->dPriv != driDrawPriv) {
--
1.7.1
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev