[Mesa-dev] [PATCH 7/7] gallium/radeon: disable the shader cache if dumping shaders
Marek Olšák
maraeo at gmail.com
Sun Mar 12 17:16:31 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
otherwise, cached shaders aren't dumped.
---
src/gallium/drivers/radeon/r600_pipe_common.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 7eb457f..b3b925e 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -778,20 +778,25 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
case CHIP_POLARIS10: return "AMD POLARIS10";
case CHIP_POLARIS11: return "AMD POLARIS11";
case CHIP_POLARIS12: return "AMD POLARIS12";
case CHIP_STONEY: return "AMD STONEY";
default: return "AMD unknown";
}
}
static void r600_disk_cache_create(struct r600_common_screen *rscreen)
{
+ /* Don't use the cache if shader dumping is enabled. */
+ if (rscreen->debug_flags &
+ (DBG_FS | DBG_VS | DBG_TCS | DBG_TES | DBG_GS | DBG_PS | DBG_CS))
+ return;
+
uint32_t mesa_timestamp;
if (disk_cache_get_function_timestamp(r600_disk_cache_create,
&mesa_timestamp)) {
char *timestamp_str;
int res = -1;
if (rscreen->chip_class < SI) {
res = asprintf(×tamp_str, "%u",mesa_timestamp);
}
#if HAVE_LLVM
else {
--
2.7.4
More information about the mesa-dev
mailing list