[Mesa-dev] [PATCH 2/6] i965/fs: Remove extra allocation for classes[].

Eric Anholt eric at anholt.net
Tue Oct 2 19:52:01 PDT 2012


This was to slot in the magic aligned pairs class, but it got moved to a
descriptive name later.
---
 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index d1d9949..98d3488 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -107,7 +107,7 @@ brw_alloc_reg_set(struct brw_context *brw, int reg_width, int base_reg_count)
    ralloc_free(brw->wm.regs);
    brw->wm.regs = ra_alloc_reg_set(brw, ra_reg_count);
    ralloc_free(brw->wm.classes);
-   brw->wm.classes = ralloc_array(brw, int, class_count + 1);
+   brw->wm.classes = ralloc_array(brw, int, class_count);
 
    brw->wm.aligned_pairs_class = -1;
 
-- 
1.7.10.4



More information about the mesa-dev mailing list