Mesa (master): gallium dri st: Propagate the drawable info when we bind to new drawables.
Thomas Hellstrom
thomash at kemper.freedesktop.org
Tue Apr 28 12:45:55 UTC 2009
Module: Mesa
Branch: master
Commit: 2c994ad3cb91288966bdc028b0afa9935a51a971
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c994ad3cb91288966bdc028b0afa9935a51a971
Author: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Date: Tue Apr 28 14:43:41 2009 +0200
gallium dri st: Propagate the drawable info when we bind to new drawables.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
---
src/gallium/state_trackers/dri/dri_context.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
index 54d2a56..45eaec4 100644
--- a/src/gallium/state_trackers/dri/dri_context.c
+++ b/src/gallium/state_trackers/dri/dri_context.c
@@ -158,9 +158,14 @@ dri_make_current(__DRIcontextPrivate * cPriv,
*/
screen->dummyContext = ctx;
- /* used in dri_flush_frontbuffer */
- ctx->dPriv = driDrawPriv;
- ctx->rPriv = driReadPriv;
+ if (ctx->dPriv != driDrawPriv) {
+ ctx->dPriv = driDrawPriv;
+ ctx->d_stamp = driDrawPriv->lastStamp - 1;
+ }
+ if (ctx->rPriv != driReadPriv) {
+ ctx->rPriv = driReadPriv;
+ ctx->r_stamp = driReadPriv->lastStamp - 1;
+ }
st_make_current(ctx->st, draw->stfb, read->stfb);
More information about the mesa-commit
mailing list