summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_state_emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state_emit.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_state_emit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c
index dcf02abb14..dff9d40a83 100644
--- a/src/mesa/pipe/i915simple/i915_state_emit.c
+++ b/src/mesa/pipe/i915simple/i915_state_emit.c
@@ -216,9 +216,11 @@ i915_emit_hardware_state(struct i915_context *i915 )
/* constants */
if (i915->hardware_dirty & I915_HW_PROGRAM)
{
- const uint nr = i915->current.num_constants;
+ const uint nr = i915->current.num_constants[PIPE_SHADER_FRAGMENT];
+ assert(nr <= I915_MAX_CONSTANT);
if (nr > 0) {
- const uint *c = (const uint *) i915->current.constants;
+ const uint *c
+ = (const uint *) i915->current.constants[PIPE_SHADER_FRAGMENT];
uint i;
OUT_BATCH( _3DSTATE_PIXEL_SHADER_CONSTANTS | (nr * 4) );
OUT_BATCH( (1 << (nr - 1)) | ((1 << (nr - 1)) - 1) );