summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-07-21 13:09:17 -0700
committerKenneth Graunke <kenneth@whitecape.org>2017-07-22 19:34:42 -0700
commit8bdbc0c5b93ff97f08d302d7b634397d52620219 (patch)
tree2eff71a7a713f5df3928ea5be15675734a5864cd
parent2e3d825982ab7ee42671325a1c093f8635af1743 (diff)
i965: Set MAP_PERSISTENT on program cache buffers.
Chris Wilson pointed out that this mapping really is persistant. Shouldn't actually have any effect today, but best to set it anyway. Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_program_cache.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 8a3a9f67fa6..04682bef34c 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -219,8 +219,10 @@ brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
new_bo = brw_bo_alloc(brw->bufmgr, "program cache", new_size, 64);
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_WRITE | MAP_ASYNC);
+ if (brw->has_llc) {
+ llc_map = brw_bo_map(brw, new_bo, MAP_READ | MAP_WRITE |
+ MAP_ASYNC | MAP_PERSISTENT);
+ }
/* Copy any existing data that needs to be saved. */
if (cache->next_offset != 0) {
@@ -416,8 +418,10 @@ brw_init_caches(struct brw_context *brw)
cache->bo = brw_bo_alloc(brw->bufmgr, "program cache", 4096, 64);
if (can_do_exec_capture(brw->screen))
cache->bo->kflags = EXEC_OBJECT_CAPTURE;
- if (brw->has_llc)
- cache->map = brw_bo_map(brw, cache->bo, MAP_READ | MAP_WRITE | MAP_ASYNC);
+ if (brw->has_llc) {
+ cache->map = brw_bo_map(brw, cache->bo, MAP_READ | MAP_WRITE |
+ MAP_ASYNC | MAP_PERSISTENT);
+ }
}
static void