[Mesa-dev] [PATCH] i965: Don't allocate curbe buffers on Gen6+.
Kenneth Graunke
kenneth at whitecape.org
Fri Aug 2 01:44:54 PDT 2013
These are only used on Gen4-5. Why waste the 8kB of space?
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_context.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 1669a23..a201eed 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -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;
--
1.8.3.4
More information about the mesa-dev
mailing list