i915g: Don't hardcode array size for phase count
authorStéphane Marchesin <marcheu@chromium.org>
Sat, 22 Nov 2014 08:07:52 +0000 (00:07 -0800)
committerStéphane Marchesin <marcheu@chromium.org>
Sat, 22 Nov 2014 08:13:39 +0000 (00:13 -0800)
This is an array of temp registers, so use I915_MAX_TEMPORARY for the size.

Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
src/gallium/drivers/i915/i915_fpc.h

index 8711630be16de6e806d65ffddc5b23c61e3058e1..a4dbcb4d271aa5a6c1dd2c1425675b1770f2ec2e 100644 (file)
@@ -72,7 +72,7 @@ struct i915_fp_compile {
    uint temp_flag;       /**< Tracks temporary regs which are in use */
    uint utemp_flag;      /**< Tracks TYPE_U temporary regs which are in use */
 
-   uint register_phases[16];
+   uint register_phases[I915_MAX_TEMPORARY];
    uint nr_tex_indirect;
    uint nr_tex_insn;
    uint nr_alu_insn;