summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-09-16 00:23:51 -0700
committerKenneth Graunke <kenneth@whitecape.org>2017-09-18 09:48:55 -0700
commita2ef69a21d4089ee57272f789b809c771e1937df (patch)
treee50cb48e42ffc32e3ff4ca372d8d4d89a188f406 /src
parenta5b764cfeaa22172b314c9652c7f05ebfd4c74c8 (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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.c17
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.h3
3 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index f67c30f3aa4..ee1badd94b3 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -934,7 +934,7 @@ brwCreateContext(gl_api api,
intel_fbo_init(brw);
- intel_batchbuffer_init(screen, &brw->batch);
+ intel_batchbuffer_init(brw);
if (devinfo->gen >= 6) {
/* Create a new hardware context. Using a hardware context means that
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);
}
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h
index c02cafed521..5a2649f06f3 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h
@@ -12,8 +12,7 @@ extern "C" {
struct intel_batchbuffer;
-void intel_batchbuffer_init(struct intel_screen *screen,
- struct intel_batchbuffer *batch);
+void intel_batchbuffer_init(struct brw_context *brw);
void intel_batchbuffer_free(struct intel_batchbuffer *batch);
void intel_batchbuffer_save_state(struct brw_context *brw);
void intel_batchbuffer_reset_to_saved(struct brw_context *brw);