i965: Correctly set MAP_WRITE when creating the LLC program cache map.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 21 Jul 2017 20:07:22 +0000 (13:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 23 Jul 2017 02:34:42 +0000 (19:34 -0700)
Using a read-only mapping is completely bogus - we use this mapping to
write all new shaders to the cache.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_program_cache.c

index 2fd989a41c9f15488815cae9bf499fc22c7a81d2..8a3a9f67fa6a670e7fef144e4e1da2ac85039b83 100644 (file)
@@ -220,7 +220,7 @@ brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
    if (can_do_exec_capture(brw->screen))
       new_bo->kflags = EXEC_OBJECT_CAPTURE;
    if (brw->has_llc)
-      llc_map = brw_bo_map(brw, new_bo, MAP_READ | MAP_ASYNC);
+      llc_map = brw_bo_map(brw, new_bo, MAP_READ | MAP_WRITE | MAP_ASYNC);
 
    /* Copy any existing data that needs to be saved. */
    if (cache->next_offset != 0) {