summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2011-02-25 18:03:16 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2011-02-26 14:58:42 +0100
commit463c8c672898a428d493b3ca98f43181426cfbe5 (patch)
tree8225e869c55f95ae8065ec6c4387b908c094ae3c
parentcb86ef541d9b2ed4b03d15383c2af21c7c1b50fd (diff)
i915g: simplify math in constants emission
The old code even falls apart for nr == 0 (which is caught earlier, but)! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--src/gallium/drivers/i915/i915_state_emit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index 509d487b49..510fb1ccc6 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -362,7 +362,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
uint i;
OUT_BATCH( _3DSTATE_PIXEL_SHADER_CONSTANTS | (nr * 4) );
- OUT_BATCH( (1 << (nr - 1)) | ((1 << (nr - 1)) - 1) );
+ OUT_BATCH((1 << nr) - 1);
for (i = 0; i < nr; i++) {
const uint *c;