From 452640af595ca4ccae1808dc8a2e27257912a753 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Sat, 26 Feb 2011 11:44:31 +0100 Subject: i915g: switch dynamic state to hw_atom Signed-off-by: Daniel Vetter --- src/gallium/drivers/i915/i915_state_emit.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c index a99b636029..fe1dab05d2 100644 --- a/src/gallium/drivers/i915/i915_state_emit.c +++ b/src/gallium/drivers/i915/i915_state_emit.c @@ -139,6 +139,16 @@ emit_immediate(struct i915_context *i915) } } +static void +emit_dynamic(struct i915_context *i915) +{ + int i; + for (i = 0; i < I915_MAX_DYNAMIC; i++) { + if (i915->dynamic_dirty & (1 << i)) + OUT_BATCH(i915->current.dynamic[i]); + } +} + static void update_static(struct i915_context *i915) { @@ -179,6 +189,7 @@ const static struct i915_tracked_hw_state hw_atoms[] = { I915_HW_INVARIANT, Elements(invariant_state) }, { "immediate", update_immediate, emit_immediate, I915_HW_IMMEDIATE, I915_MAX_IMMEDIATE }, + { "dynamic", NULL, emit_dynamic, I915_HW_DYNAMIC, I915_MAX_DYNAMIC }, { "static", update_static, NULL, I915_HW_STATIC }, { "map", update_map, NULL, I915_HW_MAP } }; @@ -264,18 +275,6 @@ i915_emit_hardware_state(struct i915_context *i915 ) emit_state(i915); -#if 01 - /* I915_MAX_DYNAMIC dwords, 0 relocs */ - if (i915->hardware_dirty & I915_HW_DYNAMIC) - { - int i; - for (i = 0; i < I915_MAX_DYNAMIC; i++) { - if (i915->dynamic_dirty & (1 << i)) - OUT_BATCH(i915->current.dynamic[i]); - } - } -#endif - #if 01 /* 8 dwords, 2 relocs */ if (i915->hardware_dirty & I915_HW_STATIC) -- cgit v1.2.3