diff options
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_state_validate.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_state_validate.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c index 956da9b304..ee28fa63c1 100644 --- a/src/gallium/drivers/nv50/nv50_state_validate.c +++ b/src/gallium/drivers/nv50/nv50_state_validate.c @@ -185,10 +185,10 @@ nv50_state_emit(struct nv50_context *nv50) struct nv50_screen *screen = nv50->screen; struct nouveau_channel *chan = screen->base.channel; - /* I don't want to copy headers from the winsys. */ - screen->cur_ctx = nv50; - - if (nv50->pctx_id != screen->cur_pctx) { + /* XXX: this is racy for multiple contexts active on separate + * threads. + */ + if (screen->cur_ctx != nv50) { if (nv50->state.fb) nv50->state.dirty |= NV50_NEW_FRAMEBUFFER; if (nv50->state.blend) @@ -217,7 +217,7 @@ nv50_state_emit(struct nv50_context *nv50) nv50->state.dirty |= NV50_NEW_TEXTURE; if (nv50->state.vtxfmt && nv50->state.vtxbuf) nv50->state.dirty |= NV50_NEW_ARRAYS; - screen->cur_pctx = nv50->pctx_id; + screen->cur_ctx = nv50; } if (nv50->state.dirty & NV50_NEW_FRAMEBUFFER) |