summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-27 09:51:46 -0600
committerBrian Paul <brianp@vmware.com>2009-04-27 09:51:46 -0600
commitdc9705d12d162ba6d087eb762e315de9f97bc456 (patch)
tree0e81e37c6c2e21456e16e892c877a448545e0ac6 /src/mesa/drivers/dri/i965/brw_context.h
parent5250eec652af46d20261624fd043992355a0b4ba (diff)
i965: only upload constant buffer data when we actually need the const buffer
Make the use_const_buffer field per-program and only call the code which updates the constant buffer's data if the flag is set. This should undo the perf regression from 20f3497e4b6756e330f7b3f54e8acaa1d6c92052
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index a0b3b06309..aef2ff5f86 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -161,6 +161,7 @@ struct brw_vertex_program {
struct gl_vertex_program program;
GLuint id;
dri_bo *const_buffer; /** Program constant buffer/surface */
+ GLboolean use_const_buffer;
};
@@ -171,6 +172,7 @@ struct brw_fragment_program {
GLboolean isGLSL; /**< really, any IF/LOOP/CONT/BREAK instructions */
dri_bo *const_buffer; /** Program constant buffer/surface */
+ GLboolean use_const_buffer;
};