diff options
author | Jakob Bornecrantz <wallbraker@gmail.com> | 2010-12-01 05:45:42 +0100 |
---|---|---|
committer | Jakob Bornecrantz <wallbraker@gmail.com> | 2011-01-21 20:53:29 +0100 |
commit | 0c3352b6df7972fd530a901396b392d0293d27ae (patch) | |
tree | 951a343ab506c1f3c99e2f42dbae5d5be840e2b9 /src/gallium/drivers/i915/i915_state_emit.c | |
parent | 2e60aa511dd232f88697d1cc2091442caaef79b2 (diff) |
i915g: Don't do unnecessary copies of constants
Even tho st/mesa use user buffers for constants align buffers
other state trackers doesn't use user buffers.
Diffstat (limited to 'src/gallium/drivers/i915/i915_state_emit.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state_emit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c index 86c0297649..5a89977c26 100644 --- a/src/gallium/drivers/i915/i915_state_emit.c +++ b/src/gallium/drivers/i915/i915_state_emit.c @@ -367,7 +367,8 @@ i915_emit_hardware_state(struct i915_context *i915 ) const uint *c; if (i915->fs->constant_flags[i] == I915_CONSTFLAG_USER) { /* grab user-defined constant */ - c = (uint *) i915->current.constants[PIPE_SHADER_FRAGMENT][i]; + c = (uint *) i915_buffer(i915->constants[PIPE_SHADER_FRAGMENT])->data; + c += 4 * i; } else { /* emit program constant */ |