[Mesa-dev] [PATCH 09/16] i965: Drop MAP_READ from some write-only mappings
Matt Turner
mattst88 at gmail.com
Wed May 24 20:04:51 UTC 2017
---
src/mesa/drivers/dri/i965/brw_performance_query.c | 2 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
src/mesa/drivers/dri/i965/intel_tex_subimage.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index 4cbd60e..2ec070b 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -992,7 +992,7 @@ brw_begin_perf_query(struct gl_context *ctx,
MI_RPC_BO_SIZE, 64);
#ifdef DEBUG
/* Pre-filling the BO helps debug whether writes landed. */
- void *map = brw_bo_map_cpu(brw, obj->oa.bo, MAP_READ | MAP_WRITE);
+ void *map = brw_bo_map_cpu(brw, obj->oa.bo, MAP_WRITE);
memset(map, 0x80, MI_RPC_BO_SIZE);
brw_bo_unmap(obj->oa.bo);
#endif
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 4803e36..2a37720 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1385,7 +1385,7 @@ intel_miptree_init_mcs(struct brw_context *brw,
*
* Note: the clear value for MCS buffers is all 1's, so we memset to 0xff.
*/
- void *map = brw_bo_map_gtt(brw, mt->mcs_buf->bo, MAP_READ | MAP_WRITE);
+ void *map = brw_bo_map_gtt(brw, mt->mcs_buf->bo, MAP_WRITE);
if (unlikely(map == NULL)) {
fprintf(stderr, "Failed to map mcs buffer into GTT\n");
brw_bo_unreference(mt->mcs_buf->bo);
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 2d50882..477c5c0 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1416,7 +1416,7 @@ intel_detect_pipelined_register(struct intel_screen *screen,
if (bo == NULL)
goto err_results;
- map = brw_bo_map_cpu(NULL, bo, MAP_READ | MAP_WRITE);
+ map = brw_bo_map_cpu(NULL, bo, MAP_WRITE);
if (!map)
goto err_batch;
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index 0f75bdf..b0b1a0f 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -146,7 +146,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
intel_batchbuffer_flush(brw);
}
- void *map = brw_bo_map_cpu(brw, bo, MAP_READ | MAP_WRITE);
+ void *map = brw_bo_map_cpu(brw, bo, MAP_WRITE);
if (map == NULL) {
DBG("%s: failed to map bo\n", __func__);
return false;
--
2.10.2
More information about the mesa-dev
mailing list