i965: Drop MAP_READ from some write-only mappings
authorMatt Turner <mattst88@gmail.com>
Thu, 18 May 2017 18:29:00 +0000 (11:29 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 6 Jun 2017 18:47:46 +0000 (11:47 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_performance_query.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index 4cbd60ef9715705a8e68f3036228d2f7f728a5f4..2ec070bd6f5ea70d89cb43d60393aa1e8a5a8c14 100644 (file)
@@ -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
index a60fac5250616a899f5dd0295df9e9ff6ef4ae1a..f81e087ec71f0007913d422a62e914384a80ec09 100644 (file)
@@ -1386,7 +1386,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);
index 44600f215175369f8de919fd6753c2445236f44e..90832ae6a7b003bfab07033a3b466e2f87caa9d8 100644 (file)
@@ -1420,7 +1420,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;
 
index 0f75bdfb72f29b65268d6bc39f71d0ec487e03f7..b0b1a0ff68e03939bb5dcbb48ae01d3df23f5325 100644 (file)
@@ -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;