summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40/nv40_state_emit.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-02-25 13:29:16 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-02-25 13:30:24 +1100
commit4058a9012764ce3bc7b90d03c4d79d020540f8e4 (patch)
tree0c21cf0a44bad1933e3a853d5354c878aa4fd935 /src/gallium/drivers/nv40/nv40_state_emit.c
parent14de997d5df48512c751c627ab19d486691f591d (diff)
nv40: construct vbo state the same way as the rest
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_state_emit.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_state_emit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv40/nv40_state_emit.c b/src/gallium/drivers/nv40/nv40_state_emit.c
index af09ed47d6..bb2ce0f722 100644
--- a/src/gallium/drivers/nv40/nv40_state_emit.c
+++ b/src/gallium/drivers/nv40/nv40_state_emit.c
@@ -14,6 +14,7 @@ static struct nv40_state_entry *render_states[] = {
&nv40_state_blend_colour,
&nv40_state_zsa,
&nv40_state_viewport,
+ &nv40_state_vbo,
NULL
};
@@ -31,7 +32,7 @@ nv40_state_validate(struct nv40_context *nv40)
if (nv40->dirty & e->dirty.pipe) {
if (e->validate(nv40))
- nv40->state.dirty |= (1 << e->dirty.hw);
+ nv40->state.dirty |= (1ULL << e->dirty.hw);
}
states++;
@@ -64,20 +65,21 @@ nv40_state_emit(struct nv40_context *nv40)
unsigned i, samplers;
while (state->dirty) {
- unsigned idx = ffs(state->dirty) - 1;
+ unsigned idx = ffsll(state->dirty) - 1;
so_ref (state->hw[idx], &nv40->hw->state[idx]);
so_emit(nv40->nvws, nv40->hw->state[idx]);
- state->dirty &= ~(1 << idx);
+ state->dirty &= ~(1ULL << idx);
}
so_emit_reloc_markers(nv40->nvws, state->hw[NV40_STATE_FB]);
for (i = 0, samplers = state->fp_samplers; i < 16 && samplers; i++) {
so_emit_reloc_markers(nv40->nvws,
state->hw[NV40_STATE_FRAGTEX0+i]);
- samplers &= ~(1 << i);
+ samplers &= ~(1ULL << i);
}
so_emit_reloc_markers(nv40->nvws, state->hw[NV40_STATE_FRAGPROG]);
+ so_emit_reloc_markers(nv40->nvws, state->hw[NV40_STATE_VTXBUF]);
}
void