i965: Warn for GTT fallbacks when mapping the batch/state buffers.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Sep 2017 07:24:41 +0000 (00:24 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Sep 2017 16:49:10 +0000 (09:49 -0700)
This shouldn't really happen in practice, but I hit it a couple of times
when running a driver with a bad memory leak.  We may as well hook up
the warning, because if it ever triggers, we'll know something is wrong.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/i965/intel_batchbuffer.c

index ae9351499aa45f8eeedd382b7bb79cff0335b949..7d5a8947e8f342aaaca53acc97db865d58d3ef14 100644 (file)
@@ -184,7 +184,7 @@ intel_batchbuffer_reset(struct brw_context *brw)
 
    batch->bo = brw_bo_alloc(bufmgr, "batchbuffer", BATCH_SZ, 4096);
    if (!batch->batch_cpu_map) {
-      batch->map = brw_bo_map(NULL, batch->bo, MAP_READ | MAP_WRITE);
+      batch->map = brw_bo_map(brw, batch->bo, MAP_READ | MAP_WRITE);
    }
    batch->map_next = batch->map;
 
@@ -193,7 +193,7 @@ intel_batchbuffer_reset(struct brw_context *brw)
       can_do_exec_capture(screen) ? EXEC_OBJECT_CAPTURE : 0;
    if (!batch->state_cpu_map) {
       batch->state_map =
-         brw_bo_map(NULL, batch->state_bo, MAP_READ | MAP_WRITE);
+         brw_bo_map(brw, batch->state_bo, MAP_READ | MAP_WRITE);
    }
 
    /* Avoid making 0 a valid state offset - otherwise the decoder will try