[Mesa-dev] [PATCH 7/7] gallium/radeon: disable the shader cache if dumping shaders

Timothy Arceri tarceri at itsqueeze.com
Sun Mar 12 22:06:05 UTC 2017


Patches 2, 3 & 7 are:

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

I'd need some more time to understand the others can take another look 
if no one else gets to it.

On 13/03/17 04:16, Marek Olšák wrote:
> 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(&timestamp_str, "%u",mesa_timestamp);
>  		}
>  #if HAVE_LLVM
>  		else {
>


More information about the mesa-dev mailing list