summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30/nv30_state_emit.c
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-07-12 00:48:26 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-07-12 00:48:26 +0200
commit58737dc87575625438d288fe2f816b6a9d2086f1 (patch)
treee4b89db836a2712be232dac764e9e4a0b1f50b0f /src/gallium/drivers/nv30/nv30_state_emit.c
parent2419a5fe3601851989506a11b0bd4e3cfb071035 (diff)
nv30: Emit fragment program using state objects
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_state_emit.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index 4ab62ddc01..c4ccc9422b 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -6,6 +6,7 @@ static struct nv30_state_entry *render_states[] = {
&nv30_state_rasterizer,
&nv30_state_scissor,
&nv30_state_stipple,
+ &nv30_state_fragprog,
&nv30_state_fragtex,
&nv30_state_vertprog,
&nv30_state_blend,
@@ -61,11 +62,6 @@ nv30_emit_hw_state(struct nv30_context *nv30)
screen->cur_pctx = nv30->pctx_id;
}
- if (nv30->dirty & NV30_NEW_FRAGPROG) {
- nv30_fragprog_bind(nv30, nv30->fragprog.current);
- /*XXX: clear NV30_NEW_FRAGPROG if no new program uploaded */
- }
-
for (i = 0, states = state->dirty; states; i++) {
if (!(states & (1ULL << i)))
continue;
@@ -83,13 +79,7 @@ nv30_emit_hw_state(struct nv30_context *nv30)
state->hw[NV30_STATE_FRAGTEX0+i]);
samplers &= ~(1ULL << i);
}
-
- /* Fragment program */
- BEGIN_RING(rankine, NV34TCL_FP_ACTIVE_PROGRAM, 1);
- OUT_RELOC (nv30->fragprog.active->buffer, 0, NOUVEAU_BO_VRAM |
- NOUVEAU_BO_GART | NOUVEAU_BO_RD | NOUVEAU_BO_LOW |
- NOUVEAU_BO_OR, NV34TCL_FP_ACTIVE_PROGRAM_DMA0,
- NV34TCL_FP_ACTIVE_PROGRAM_DMA1);
+ so_emit_reloc_markers(nv30->nvws, state->hw[NV30_STATE_FRAGPROG]);
}
boolean