summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorJakob Bornecrantz <wallbraker@gmail.com>2010-07-03 12:47:49 +0100
committerJakob Bornecrantz <wallbraker@gmail.com>2010-07-04 13:32:01 +0100
commit7174038e29c91c6c32865150eb30616a4d15bc3e (patch)
tree2652cd105e0625f875543fd2415effffb8184244 /src/gallium/drivers/i915
parent22d4d5fc3fe4017732043be9eb08128688f9ee66 (diff)
i915g: Don't dirty dynamic state if it hasn't changed
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r--src/gallium/drivers/i915/i915_state_dynamic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_state_dynamic.c b/src/gallium/drivers/i915/i915_state_dynamic.c
index d964483ac7..d61a8c3407 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];