From 6ca50f381c9cbc87bbb864d2710f3cfa46a95ead Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 21 Feb 2012 13:05:57 -0800 Subject: i965: Correct the size of the state batch space allocated for binding tables. In the gen6 GS case, we were under-counting and so other state would get smashed. In the VS case, we were over-counting, so everything was fine. Reviewed-by: Kenneth Graunke Tested-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 2 +- src/mesa/drivers/dri/i965/gen6_sol.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index b29e414a54e..534621ce0b6 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -136,7 +136,7 @@ brw_vs_upload_binding_table(struct brw_context *brw) * space for the binding table. */ bind = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE, - sizeof(uint32_t) * BRW_MAX_SURFACES, + sizeof(uint32_t) * BRW_MAX_VS_SURFACES, 32, &brw->vs.bind_bo_offset); /* BRW_NEW_SURFACES and BRW_NEW_VS_CONSTBUF */ diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c index 187ddfd4697..191ed5bd30f 100644 --- a/src/mesa/drivers/dri/i965/gen6_sol.c +++ b/src/mesa/drivers/dri/i965/gen6_sol.c @@ -107,7 +107,7 @@ brw_gs_upload_binding_table(struct brw_context *brw) * space for the binding table. */ bind = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE, - sizeof(uint32_t) * BRW_MAX_SURFACES, + sizeof(uint32_t) * BRW_MAX_GS_SURFACES, 32, &brw->gs.bind_bo_offset); /* BRW_NEW_SURFACES */ -- cgit v1.2.3