Mesa (master): i965: Correctly set MAP_WRITE when creating the LLC program cache map.
Kenneth Graunke
kwg at kemper.freedesktop.org
Sun Jul 23 02:35:24 UTC 2017
Module: Mesa
Branch: master
Commit: 2e3d825982ab7ee42671325a1c093f8635af1743
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e3d825982ab7ee42671325a1c093f8635af1743
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Jul 21 13:07:22 2017 -0700
i965: Correctly set MAP_WRITE when creating the LLC program cache map.
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 at gmail.com>
---
src/mesa/drivers/dri/i965/brw_program_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 2fd989a41c..8a3a9f67fa 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -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) {
More information about the mesa-commit
mailing list