diff options
author | Kenneth Graunke <[email protected]> | 2017-09-16 00:23:51 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-09-18 09:48:55 -0700 |
commit | a2ef69a21d4089ee57272f789b809c771e1937df (patch) | |
tree | e50cb48e42ffc32e3ff4ca372d8d4d89a188f406 /src/mesa/drivers/dri/i965/intel_batchbuffer.c | |
parent | a5b764cfeaa22172b314c9652c7f05ebfd4c74c8 (diff) |
i965: Plumb brw through to intel_batchbuffer_reset().
We'll want to pass this to brw_bo_map in a moment.
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index da4a4d5f250..ae9351499aa 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -62,8 +62,7 @@ #define MAX_STATE_SIZE (64 * 1024) static void -intel_batchbuffer_reset(struct intel_batchbuffer *batch, - struct intel_screen *screen); +intel_batchbuffer_reset(struct brw_context *brw); static bool uint_key_compare(const void *a, const void *b) @@ -87,9 +86,10 @@ init_reloc_list(struct brw_reloc_list *rlist, int count) } void -intel_batchbuffer_init(struct intel_screen *screen, - struct intel_batchbuffer *batch) +intel_batchbuffer_init(struct brw_context *brw) { + struct intel_screen *screen = brw->screen; + struct intel_batchbuffer *batch = &brw->batch; const struct gen_device_info *devinfo = &screen->devinfo; if (!devinfo->has_llc) { @@ -123,7 +123,7 @@ intel_batchbuffer_init(struct intel_screen *screen, if (devinfo->gen == 6) batch->valid_reloc_flags |= EXEC_OBJECT_NEEDS_GTT; - intel_batchbuffer_reset(batch, screen); + intel_batchbuffer_reset(brw); } #define READ_ONCE(x) (*(volatile __typeof__(x) *)&(x)) @@ -170,9 +170,10 @@ add_exec_bo(struct intel_batchbuffer *batch, struct brw_bo *bo) } static void -intel_batchbuffer_reset(struct intel_batchbuffer *batch, - struct intel_screen *screen) +intel_batchbuffer_reset(struct brw_context *brw) { + struct intel_screen *screen = brw->screen; + struct intel_batchbuffer *batch = &brw->batch; struct brw_bufmgr *bufmgr = screen->bufmgr; if (batch->last_bo != NULL) { @@ -218,7 +219,7 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch, static void intel_batchbuffer_reset_and_clear_render_cache(struct brw_context *brw) { - intel_batchbuffer_reset(&brw->batch, brw->screen); + intel_batchbuffer_reset(brw); brw_render_cache_set_clear(brw); } |