summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30/nv30_state_emit.c
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-07-04 18:53:44 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-07-04 18:53:44 +0200
commitf99643ca6ea3aa05a0b16dc5d99e11fa00185684 (patch)
tree19ee2315f35c4569c1999f438ef89969ffac1531 /src/gallium/drivers/nv30/nv30_state_emit.c
parent77f8167d75d0016c76812fc147c06072e5729965 (diff)
nv30: Emit sampler state using state objects
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_state_emit.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index eca1f0652c..0ea7857197 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -47,7 +47,7 @@ nv30_emit_hw_state(struct nv30_context *nv30)
{
struct nv30_state *state = &nv30->state;
struct nv30_screen *screen = nv30->screen;
- unsigned i;
+ unsigned i, samplers;
uint64 states;
if (nv30->pctx_id != screen->cur_pctx) {
@@ -91,6 +91,13 @@ nv30_emit_hw_state(struct nv30_context *nv30)
nv30->dirty_samplers = 0;
so_emit_reloc_markers(nv30->nvws, state->hw[NV30_STATE_FB]);
+ for (i = 0, samplers = state->fp_samplers; i < 16 && samplers; i++) {
+ if (!(samplers & (1 << i)))
+ continue;
+ so_emit_reloc_markers(nv30->nvws,
+ state->hw[NV30_STATE_FRAGTEX0+i]);
+ samplers &= ~(1ULL << i);
+ }
/* Texture images, emitted in nv30_fragtex_build */
#if 0