diff options
author | José Fonseca <[email protected]> | 2007-11-06 19:16:40 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-11-07 13:40:35 +0000 |
commit | f39a520892259bc3ff13b47423fb86cd7714c70a (patch) | |
tree | 70f9e0f2bd337b231bfb804f17ece3dbb280a1db /src/mesa/pipe/i915simple/i915_state_emit.c | |
parent | 85c7683f1f5f1d0d9e95eb59270705a2975fa437 (diff) |
Track hardware vertex buffer state changes.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state_emit.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_state_emit.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c index 29fe9d97183..ee44e526cac 100644 --- a/src/mesa/pipe/i915simple/i915_state_emit.c +++ b/src/mesa/pipe/i915simple/i915_state_emit.c @@ -62,7 +62,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) { /* XXX: there must be an easier way */ const unsigned dwords = ( 14 + - 5 + + 7 + I915_MAX_DYNAMIC + 8 + 2 + I915_TEX_UNITS*3 + @@ -72,7 +72,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) 6 ) * 3/2; /* plus 50% margin */ const unsigned relocs = ( I915_TEX_UNITS + - 2 + 3 ) * 3/2; /* plus 50% margin */ #if 0 @@ -134,16 +134,26 @@ i915_emit_hardware_state(struct i915_context *i915 ) OUT_BATCH(0); } - /* 5 dwords, 0 relocs */ + /* 7 dwords, 1 relocs */ if (i915->hardware_dirty & I915_HW_IMMEDIATE) { OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | + I1_LOAD_S(0) | + I1_LOAD_S(1) | I1_LOAD_S(2) | I1_LOAD_S(4) | I1_LOAD_S(5) | I1_LOAD_S(6) | - (3)); + (5)); + if(i915->vbo) + OUT_RELOC(i915->vbo, + I915_BUFFER_ACCESS_READ, + i915->current.immediate[I915_IMMEDIATE_S0]); + else + /* FIXME: we should not do this */ + OUT_BATCH(0); + OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S1]); OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S2]); OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S4]); OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S5]); |