summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2008-07-03 22:47:15 +0200
committerPatrice Mandin <[email protected]>2008-07-03 22:47:15 +0200
commit6f56b527d866506a323feb19f9d8529d40034af2 (patch)
tree376e210903e7e1de592062359bebfe412d10c0b1 /src/gallium
parent568b477b9c118e5ace831b8ecf1811da1c0961cd (diff)
nv30: Reemit state when changing context
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index cb7f1a7c310..eca1f0652cc 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -46,9 +46,19 @@ void
nv30_emit_hw_state(struct nv30_context *nv30)
{
struct nv30_state *state = &nv30->state;
+ struct nv30_screen *screen = nv30->screen;
unsigned i;
uint64 states;
+ if (nv30->pctx_id != screen->cur_pctx) {
+ for (i = 0; i < NV30_STATE_MAX; i++) {
+ if (state->hw[i] && screen->state[i] != state->hw[i])
+ state->dirty |= (1ULL << i);
+ }
+
+ screen->cur_pctx = nv30->pctx_id;
+ }
+
for (i = 0, states = state->dirty; states; i++) {
if (!(states & (1ULL << i)))
continue;