gallium: squash-merge of gallium screen context
[mesa.git] / src / gallium / drivers / nv40 / nv40_state_emit.c
index 13fe854915b3722c092e355e342c8bee6a3631db..1c4007a129eaac45144e286ae10c673a61f8a3ed 100644 (file)
@@ -61,13 +61,15 @@ nv40_state_emit(struct nv40_context *nv40)
        unsigned i;
        uint64_t states;
 
-       if (nv40->pctx_id != screen->cur_pctx) {
+       /* XXX: race conditions
+        */
+       if (nv40 != screen->cur_ctx) {
                for (i = 0; i < NV40_STATE_MAX; i++) {
                        if (state->hw[i] && screen->state[i] != state->hw[i])
                                state->dirty |= (1ULL << i);
                }
 
-               screen->cur_pctx = nv40->pctx_id;
+               screen->cur_ctx = nv40;
        }
 
        for (i = 0, states = state->dirty; states; i++) {