From 7174038e29c91c6c32865150eb30616a4d15bc3e Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 3 Jul 2010 12:47:49 +0100 Subject: i915g: Don't dirty dynamic state if it hasn't changed --- src/gallium/drivers/i915/i915_state_dynamic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/i915/i915_state_dynamic.c b/src/gallium/drivers/i915/i915_state_dynamic.c index d964483ac7e..d61a8c3407f 100644 --- a/src/gallium/drivers/i915/i915_state_dynamic.c +++ b/src/gallium/drivers/i915/i915_state_dynamic.c @@ -30,7 +30,7 @@ #include "i915_context.h" #include "i915_reg.h" #include "i915_state.h" -#include "util/u_math.h" + #include "util/u_memory.h" #include "util/u_pack_color.h" @@ -53,6 +53,9 @@ static INLINE void set_dynamic_indirect(struct i915_context *i915, { unsigned i; + if (!memcmp(src, &i915->current.dynamic[offset], dwords * 4)) + return; + for (i = 0; i < dwords; i++) i915->current.dynamic[offset + i] = src[i]; -- cgit v1.2.3