[Mesa-dev] [PATCH 34/51] i965: Move no_batch_wrap from brw_context to brw_batch
Chris Wilson
chris at chris-wilson.co.uk
Tue Jan 10 21:23:57 UTC 2017
To ease intermediate patches.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
src/mesa/drivers/dri/i965/brw_batch.h | 2 ++
src/mesa/drivers/dri/i965/brw_compute.c | 4 ++--
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 | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_batch.h b/src/mesa/drivers/dri/i965/brw_batch.h
index 6ed956829c..89d8a88124 100644
--- a/src/mesa/drivers/dri/i965/brw_batch.h
+++ b/src/mesa/drivers/dri/i965/brw_batch.h
@@ -63,6 +63,8 @@ typedef struct brw_batch {
bool needs_sol_reset;
bool state_base_address_emitted;
+ bool no_batch_wrap;
+
struct {
uint32_t *map_next;
int reloc_count;
diff --git a/src/mesa/drivers/dri/i965/brw_compute.c b/src/mesa/drivers/dri/i965/brw_compute.c
index cde63522d5..1feb4a0401 100644
--- a/src/mesa/drivers/dri/i965/brw_compute.c
+++ b/src/mesa/drivers/dri/i965/brw_compute.c
@@ -205,12 +205,12 @@ brw_dispatch_compute_common(struct gl_context *ctx)
intel_batchbuffer_save_state(brw);
retry:
- brw->no_batch_wrap = true;
+ brw->batch.no_batch_wrap = true;
brw_upload_compute_state(brw);
brw_emit_gpgpu_walker(brw);
- brw->no_batch_wrap = false;
+ brw->batch.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/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 952dcddce4..26645ac812 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -693,7 +693,6 @@ struct brw_context
} vtbl;
brw_batch batch;
- bool no_batch_wrap;
/** BO for post-sync nonzero writes for gen6 workaround. */
brw_bo *workaround_bo;
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index cd2e9e05a6..928138ccaa 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -588,13 +588,13 @@ retry:
* brw->ctx.NewDriverState.
*/
if (brw->ctx.NewDriverState) {
- brw->no_batch_wrap = true;
+ brw->batch.no_batch_wrap = true;
brw_upload_render_state(brw);
}
brw_emit_prim(brw, &prims[i], brw->primitive, xfb_obj, stream);
- brw->no_batch_wrap = false;
+ brw->batch.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 c454cbce5e..fb0ec73c15 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -360,7 +360,7 @@ brw_batch_flush(struct brw_batch *batch, struct perf_debug *info)
intel_upload_finish(brw);
/* Check that we didn't just wrap our batchbuffer at a bad time. */
- assert(!brw->no_batch_wrap);
+ assert(!brw->batch.no_batch_wrap);
ret = do_flush_locked(brw);
--
2.11.0
More information about the mesa-dev
mailing list