#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)
}
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) {
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))
}
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) {
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);
}
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);