Browse Source

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>
tags/android-x86-2.2-r2
Daniel Vetter 14 years ago
parent
commit
1df1e0841d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/gallium/drivers/i915/i915_state_emit.c

+ 1
- 1
src/gallium/drivers/i915/i915_state_emit.c 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;

Loading…
Cancel
Save