summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2011-02-26 11:44:31 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2011-02-26 22:23:25 +0100
commit452640af595ca4ccae1808dc8a2e27257912a753 (patch)
treeba5d1ef5b5db0448eea206fa3e33b347fb6705f9
parent44e25f305fe4faa4f985814224cf7a52d10a30d7 (diff)
i915g: switch dynamic state to hw_atom
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--src/gallium/drivers/i915/i915_state_emit.c23
1 files 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
@@ -140,6 +140,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)
{
struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0];
@@ -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 }
};
@@ -265,18 +276,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)
{