X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fnv40%2Fnv40_state_emit.c;h=8990f303ce4e300d7465d5da6fe38571d2768270;hb=2657325c4a73a2bfa94888a936d06466000e7fbf;hp=13fe854915b3722c092e355e342c8bee6a3631db;hpb=43867acb6afc7fad26cdc2f22b2a3bb6eeefb2da;p=mesa.git diff --git a/src/gallium/drivers/nv40/nv40_state_emit.c b/src/gallium/drivers/nv40/nv40_state_emit.c index 13fe854915b..8990f303ce4 100644 --- a/src/gallium/drivers/nv40/nv40_state_emit.c +++ b/src/gallium/drivers/nv40/nv40_state_emit.c @@ -13,6 +13,7 @@ static struct nv40_state_entry *render_states[] = { &nv40_state_blend, &nv40_state_blend_colour, &nv40_state_zsa, + &nv40_state_sr, &nv40_state_viewport, &nv40_state_vbo, NULL @@ -29,6 +30,7 @@ static struct nv40_state_entry *swtnl_states[] = { &nv40_state_blend, &nv40_state_blend_colour, &nv40_state_zsa, + &nv40_state_sr, &nv40_state_viewport, &nv40_state_vtxfmt, NULL @@ -61,13 +63,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++) {