[Mesa-dev] [PATCH 07/17] i965: Remove map fallback in INTEL_DEBUG=bat code.
Kenneth Graunke
kenneth at whitecape.org
Wed Sep 6 00:09:40 UTC 2017
This only made sense for the shadow copy of the batch.
---
src/mesa/drivers/dri/i965/intel_batchbuffer.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index df094bb6047..7703db92d83 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -281,16 +281,14 @@ do_batch_dump(struct brw_context *brw)
if (batch->ring != RENDER_RING)
return;
- void *map = brw_bo_map(brw, batch->bo, MAP_READ);
- if (map == NULL) {
- fprintf(stderr,
- "WARNING: failed to map batchbuffer, "
- "dumping uploaded data instead.\n");
+ uint32_t *data = brw_bo_map(brw, batch->bo, MAP_READ);
+ if (data == NULL) {
+ fprintf(stderr, "WARNING: failed to map batchbuffer\n");
+ return;
}
- uint32_t *data = map ? map : batch->map;
uint32_t *end = data + USED_BATCH(*batch);
- uint32_t gtt_offset = map ? batch->bo->gtt_offset : 0;
+ uint32_t gtt_offset = batch->bo->gtt_offset;
int length;
bool color = INTEL_DEBUG & DEBUG_COLOR;
@@ -411,9 +409,7 @@ do_batch_dump(struct brw_context *brw)
}
}
- if (map != NULL) {
- brw_bo_unmap(batch->bo);
- }
+ brw_bo_unmap(batch->bo);
}
#else
static void do_batch_dump(struct brw_context *brw) { }
--
2.14.1
More information about the mesa-dev
mailing list