summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
diff options
context:
space:
mode:
authorBruce Cherniak <[email protected]>2016-06-17 12:14:54 -0500
committerTim Rowley <[email protected]>2016-06-17 13:56:03 -0500
commit6b0ac95c2862b4d464079b2edd9b59b5ef906da3 (patch)
treece7822d32888051c4418d1198f1ca3400381e792 /src/gallium/drivers/swr/swr_state.cpp
parentace3124f2293616aa09f66a4cb0b38830df8683a (diff)
swr: Update screen->context pointer with multiple contexts.
A pipe pointer in the screen allows for access to current device context in flush_frontbuffer and resource_destroy. This wasn't tracking current context in multi-context situations. v2: More caffeine. Corrected compare, removed unnecessary set of screen-pipe in create_context, and added a few comments.
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 3eeb98d0261..1f34365d30e 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -776,6 +776,10 @@ swr_update_derived(struct pipe_context *pipe,
struct swr_context *ctx = swr_context(pipe);
struct swr_screen *screen = swr_screen(ctx->pipe.screen);
+ /* Update screen->pipe to current pipe context. */
+ if (screen->pipe != pipe)
+ screen->pipe = pipe;
+
/* Any state that requires dirty flags to be re-triggered sets this mask */
/* For example, user_buffer vertex and index buffers. */
unsigned post_update_dirty_flags = 0;