diff options
author | Daniel Vetter <[email protected]> | 2011-02-25 18:03:16 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2011-02-26 15:35:24 +0100 |
commit | 1df1e0841de7da9587e8b1f5d43304627305d22d (patch) | |
tree | 42fc6e55fd6fd0c104851ae9e1cb76ad0c1188b6 | |
parent | acc290aff0944c3b5d1a5f40b67ddade6d2a6894 (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 <[email protected]>
-rw-r--r-- | src/gallium/drivers/i915/i915_state_emit.c | 2 |
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 509d487b498..510fb1ccc63 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; |