From: Topi Pohjolainen Date: Fri, 15 Apr 2016 21:10:40 +0000 (+0300) Subject: i965/blorp: Reconfigure base state address only if needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84db9ca3f7c587168e548189596bd1362b1f3b23;p=mesa.git i965/blorp: Reconfigure base state address only if needed Signed-off-by: Topi Pohjolainen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp index cc7cbd5b46c..5c0fa0c144a 100644 --- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp @@ -989,7 +989,8 @@ gen6_blorp_exec(struct brw_context *brw, /* Emit workaround flushes when we switch from drawing to blorping. */ brw_emit_post_sync_nonzero_flush(brw); - brw_state_base_address.emit(brw); + if (brw_state_base_address.dirty.brw & brw->ctx.NewDriverState) + brw_state_base_address.emit(brw); gen6_emit_3dstate_multisample(brw, params->dst.num_samples); gen6_emit_3dstate_sample_mask(brw, diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp index a44c186f5c3..1520469e131 100644 --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp @@ -814,7 +814,8 @@ gen7_blorp_exec(struct brw_context *brw, uint32_t prog_offset = params->get_wm_prog(brw, &prog_data); - brw_state_base_address.emit(brw); + if (brw_state_base_address.dirty.brw & brw->ctx.NewDriverState) + brw_state_base_address.emit(brw); gen6_emit_3dstate_multisample(brw, params->dst.num_samples); gen6_emit_3dstate_sample_mask(brw, diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.cpp b/src/mesa/drivers/dri/i965/gen8_blorp.cpp index 1bd9b97bb8f..d8ad5ea1b5f 100644 --- a/src/mesa/drivers/dri/i965/gen8_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen8_blorp.cpp @@ -635,7 +635,9 @@ gen8_blorp_exec(struct brw_context *brw, const brw_blorp_params *params) uint32_t prog_offset = params->get_wm_prog(brw, &prog_data); - gen8_upload_state_base_address(brw); + if (gen8_state_base_address.dirty.brw & brw->ctx.NewDriverState) + gen8_upload_state_base_address(brw); + gen7_blorp_emit_cc_viewport(brw); gen7_l3_state.emit(brw);