[Mesa-dev] [PATCH 2/2] i965: Create new program cache bo when clearing the program cache
Jordan Justen
jordan.l.justen at intel.com
Sat Feb 3 01:07:01 UTC 2018
When the disk shader cache CI testing was enabled, we started noticing
occasional failures on deqp test runs. (Mainly SNB, rarely HSW)
Before this change, when we cleared the (in memory) program cache we
reused the same bo. Since the disk shader cache quickly restores
programs, it appears that this would lead to overwrites of the older
program binaries in the in memory program cache that apparently were
still executing in some cases. If these programs were still executing,
this could cause a GPU hang.
This issue probably is not disk shader cache specific, but rather may
have been hidden since the compiler would take some time to recompile
programs after the cache was cleared.
Cc: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/i965/brw_program_cache.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index f084f94f929..a6638c3d302 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -448,6 +448,8 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
brw->cs.base.prog_data = NULL;
intel_batchbuffer_flush(brw);
+ if (cache->bo)
+ brw_cache_new_bo(cache, cache->bo->size, false);
}
void
--
2.15.1
More information about the mesa-dev
mailing list