From 078e7b62f69658e40aedea59cf6f005162a29f83 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 23 Feb 2010 17:42:20 -0800 Subject: i965: Emit SNB FF unit state after the unit's push constants. There's a BUN for the WM unit that says WM_STATE must immediately follow PS_CONSTANTS, which this addresses. Presumably other units are roughly the same, too. --- src/mesa/drivers/dri/i965/gen6_gs_state.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/mesa/drivers/dri/i965/gen6_gs_state.c') diff --git a/src/mesa/drivers/dri/i965/gen6_gs_state.c b/src/mesa/drivers/dri/i965/gen6_gs_state.c index 9a4a13810a..4032605a85 100644 --- a/src/mesa/drivers/dri/i965/gen6_gs_state.c +++ b/src/mesa/drivers/dri/i965/gen6_gs_state.c @@ -38,6 +38,17 @@ upload_gs_state(struct brw_context *brw) { struct intel_context *intel = &brw->intel; + /* Disable all the constant buffers. */ + BEGIN_BATCH(5); + OUT_BATCH(CMD_3D_CONSTANT_GS_STATE << 16 | (5 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + intel_batchbuffer_emit_mi_flush(intel->batch); + if (brw->gs.prog_bo) { BEGIN_BATCH(7); OUT_BATCH(CMD_3D_GS_STATE << 16 | (7 - 2)); @@ -69,17 +80,6 @@ upload_gs_state(struct brw_context *brw) OUT_BATCH(0); ADVANCE_BATCH(); } - - /* Disable all the constant buffers. */ - BEGIN_BATCH(5); - OUT_BATCH(CMD_3D_CONSTANT_GS_STATE << 16 | (5 - 2)); - OUT_BATCH(0); - OUT_BATCH(0); - OUT_BATCH(0); - OUT_BATCH(0); - ADVANCE_BATCH(); - - intel_batchbuffer_emit_mi_flush(intel->batch); } const struct brw_tracked_state gen6_gs_state = { -- cgit v1.2.3