i965: Correct the size of the state batch space allocated for binding tables.
authorEric Anholt <eric@anholt.net>
Tue, 21 Feb 2012 21:05:57 +0000 (13:05 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 21 Feb 2012 21:30:48 +0000 (13:30 -0800)
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 <kenneth@whitecape.org>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vs_surface_state.c
src/mesa/drivers/dri/i965/gen6_sol.c

index b29e414a54eea6dbebdfec2215b7658ec2a3f567..534621ce0b6be8b0263a88eded71752aa3401672 100644 (file)
@@ -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 */
index 187ddfd4697241893735207ad5ce62cf4508f57d..191ed5bd30f18f43f7924c723f293ab4c04e70dd 100644 (file)
@@ -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 */