gallium/radeon: disable the shader cache if dumping shaders
authorMarek Olšák <marek.olsak@amd.com>
Fri, 10 Mar 2017 11:18:07 +0000 (12:18 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 13 Mar 2017 22:34:52 +0000 (23:34 +0100)
otherwise, cached shaders aren't dumped.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeon/r600_pipe_common.c

index 7eb457f8e1db18b450212a5b4cfff504d9ab3a0c..b3b925e09c6c194e61148b7068ce2ee07c9cb7f6 100644 (file)
@@ -785,6 +785,11 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
 
 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)) {