diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-03-02 14:56:42 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-03-02 15:02:25 +1100 |
commit | b560ed2444383b9634786fe742b8cb6f5cdfc781 (patch) | |
tree | ecaec1297027c749bc212870ffca9b6525063e52 /src/gallium/drivers/nv40/nv40_state_emit.c | |
parent | 0a12e4587ccf2c4fa71e93bb00b4582deb99a82c (diff) | |
download | external_mesa3d-b560ed2444383b9634786fe742b8cb6f5cdfc781.zip external_mesa3d-b560ed2444383b9634786fe742b8cb6f5cdfc781.tar.gz external_mesa3d-b560ed2444383b9634786fe742b8cb6f5cdfc781.tar.bz2 |
nouveau: enable multi-context/single-channel support for nv40
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_state_emit.c')
-rw-r--r-- | src/gallium/drivers/nv40/nv40_state_emit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv40/nv40_state_emit.c b/src/gallium/drivers/nv40/nv40_state_emit.c index 2215036..a95e247 100644 --- a/src/gallium/drivers/nv40/nv40_state_emit.c +++ b/src/gallium/drivers/nv40/nv40_state_emit.c @@ -62,8 +62,18 @@ static void nv40_state_emit(struct nv40_context *nv40) { struct nv40_state *state = &nv40->state; + struct nv40_screen *screen = nv40->screen; unsigned i, samplers; + if (nv40->pctx_id != screen->cur_pctx) { + for (i = 0; i < NV40_STATE_MAX; i++) { + if (screen->state[i] != state->hw[i] && state->hw[i]) + state->dirty |= (1ULL << i); + } + + screen->cur_pctx = nv40->pctx_id; + } + while (state->dirty) { unsigned idx = ffsll(state->dirty) - 1; |