From: Francisco Jerez Date: Sat, 23 Nov 2013 03:21:13 +0000 (-0800) Subject: i965/vec4: Fix off-by-one register class overallocation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af25addcd0aaf373bd91c6a0b6c97d4c73092f91;p=mesa.git i965/vec4: Fix off-by-one register class overallocation. Reviewed-by: Paul Berry --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp index 4ecc4a288e2..e7aab9d0393 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp @@ -121,7 +121,7 @@ brw_vec4_alloc_reg_set(struct brw_context *brw) if (brw->gen >= 6) ra_set_allocate_round_robin(brw->vec4.regs); ralloc_free(brw->vec4.classes); - brw->vec4.classes = ralloc_array(brw, int, class_count + 1); + brw->vec4.classes = ralloc_array(brw, int, class_count); /* Now, add the registers to their classes, and add the conflicts * between them and the base GRF registers (and also each other).