[Mesa-dev] [PATCH] i965: Don't waste space for MAX_CLIP_PLANES in pull constant buffer.

Kenneth Graunke kenneth at whitecape.org
Tue Dec 18 15:36:38 PST 2012


The new VS uploads clip planes like any other parameters; this extra
allocation was for the old VS which uploaded them specially.  With the
old VS gone, this just wastes space and bandwidth.
---
 src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index d293482..579fffb 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -58,8 +58,7 @@ gen6_upload_vs_push_constants(struct brw_context *brw)
       int i;
 
       param = brw_state_batch(brw, AUB_TRACE_VS_CONSTANTS,
-			      (MAX_CLIP_PLANES + nr_params) *
-			      4 * sizeof(float),
+			      nr_params * 4 * sizeof(float),
 			      32, &brw->vs.push_const_offset);
 
       for (i = 0; i < brw->vs.prog_data->nr_params; i++) {
-- 
1.8.0.2



More information about the mesa-dev mailing list