diff options
author | Matt Turner <[email protected]> | 2017-05-05 11:20:05 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-06-06 11:47:46 -0700 |
commit | 5dc35e1664f7858679424f2c8ab606e6c0d8b768 (patch) | |
tree | 605ea19e0df294ca0471e6105ef12c58b8292eff /src/mesa/drivers/dri/i965/intel_batchbuffer.c | |
parent | d7024a6b3cd16836597902593e25cb43989c0130 (diff) |
i965: Remove brw_bo's virtual member
Just return the map from brw_map_bo_*
Reviewed-by: Kenneth Graunke <[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, 8 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 36faa7ae6f5..01511b17391 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -100,8 +100,7 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch, batch->bo = brw_bo_alloc(bufmgr, "batchbuffer", BATCH_SZ, 4096); if (has_llc) { - brw_bo_map(NULL, batch->bo, true); - batch->map = batch->bo->virtual; + batch->map = brw_bo_map(NULL, batch->bo, true); } batch->map_next = batch->map; @@ -240,16 +239,16 @@ do_batch_dump(struct brw_context *brw) if (batch->ring != RENDER_RING) return; - int ret = brw_bo_map(brw, batch->bo, false); - if (ret != 0) { + void *map = brw_bo_map(brw, batch->bo, false); + if (map == NULL) { fprintf(stderr, - "WARNING: failed to map batchbuffer (%s), " - "dumping uploaded data instead.\n", strerror(ret)); + "WARNING: failed to map batchbuffer, " + "dumping uploaded data instead.\n"); } - uint32_t *data = batch->bo->virtual ? batch->bo->virtual : batch->map; + uint32_t *data = map ? map : batch->map; uint32_t *end = data + USED_BATCH(*batch); - uint32_t gtt_offset = batch->bo->virtual ? batch->bo->offset64 : 0; + uint32_t gtt_offset = map ? batch->bo->offset64 : 0; int length; bool color = INTEL_DEBUG & DEBUG_COLOR; @@ -370,7 +369,7 @@ do_batch_dump(struct brw_context *brw) } } - if (ret == 0) { + if (map != NULL) { brw_bo_unmap(batch->bo); } } |