i965: Don't allocate curbe buffers on Gen6+.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 2 Aug 2013 07:11:10 +0000 (00:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 6 Aug 2013 07:21:10 +0000 (00:21 -0700)
These are only used on Gen4-5.  Why waste the 8kB of space?

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.c

index 1669a23..a201eed 100644 (file)
@@ -440,8 +440,10 @@ brwCreateContext(int api,
 
    brw_init_state( brw );
 
-   brw->curbe.last_buf = calloc(1, 4096);
-   brw->curbe.next_buf = calloc(1, 4096);
+   if (brw->gen < 6) {
+      brw->curbe.last_buf = calloc(1, 4096);
+      brw->curbe.next_buf = calloc(1, 4096);
+   }
 
    brw->state.dirty.mesa = ~0;
    brw->state.dirty.brw = ~0;