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>
This commit is contained in:
Daniel Vetter 2011-02-25 18:03:16 +01:00 committed by Jakob Bornecrantz
parent acc290aff0
commit 1df1e0841d
1 changed files with 1 additions and 1 deletions

View File

@ -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;