From 7c3180a4ade0ccb37f51d59032c37f0f4b4cb144 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 3 Jul 2013 14:29:56 -0700 Subject: [PATCH] i965: Move intel_context::no_batch_wrap to brw_context. Signed-off-by: Kenneth Graunke Acked-by: Chris Forbes Acked-by: Paul Berry Acked-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_draw.c | 4 ++-- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 3 +-- src/mesa/drivers/dri/i965/intel_context.h | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index f278c53..a6d7abd 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -807,6 +807,7 @@ struct brw_context drm_intel_context *hw_ctx; struct intel_batchbuffer batch; + bool no_batch_wrap; /** * Set if rendering has occured to the drawable's front buffer. diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index b338fe0..3514082 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -443,7 +443,7 @@ retry: * brw->state.dirty.brw. */ if (brw->state.dirty.brw) { - intel->no_batch_wrap = true; + brw->no_batch_wrap = true; brw_upload_state(brw); } @@ -452,7 +452,7 @@ retry: else brw_emit_prim(brw, &prim[i], brw->primitive); - intel->no_batch_wrap = false; + brw->no_batch_wrap = false; if (dri_bufmgr_check_aperture_space(&brw->batch.bo, 1)) { if (!fail_next) { diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 0905237a..df83e3d 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -235,7 +235,6 @@ int _intel_batchbuffer_flush(struct brw_context *brw, const char *file, int line) { - struct intel_context *intel = &brw->intel; int ret; if (brw->batch.used == 0) @@ -265,7 +264,7 @@ _intel_batchbuffer_flush(struct brw_context *brw, intel_upload_finish(brw); /* Check that we didn't just wrap our batchbuffer at a bad time. */ - assert(!intel->no_batch_wrap); + assert(!brw->no_batch_wrap); ret = do_flush_locked(brw); diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index f95b1db..d2eb746 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -129,8 +129,6 @@ struct intel_context bool has_llc; bool has_swizzling; - bool no_batch_wrap; - /** * Set if we're either a debug context or the INTEL_DEBUG=perf environment * variable is set, this is the flag indicating to do expensive work that -- 2.7.4