[Mesa-dev] [PATCH 2/3] gallium/radeon: only pass shader-specific debug flags to the disk shader cache
Nicolai Hähnle
nhaehnle at gmail.com
Fri Aug 11 16:01:30 UTC 2017
Patches 1 & 2:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 10.08.2017 21:57, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/gallium/drivers/radeon/r600_pipe_common.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index 2acef6a..95458d2e 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -870,24 +870,31 @@ static void r600_disk_cache_create(struct r600_common_screen *rscreen)
> else {
> uint32_t llvm_timestamp;
> if (disk_cache_get_function_timestamp(LLVMInitializeAMDGPUTargetInfo,
> &llvm_timestamp)) {
> res = asprintf(×tamp_str, "%u_%u",
> mesa_timestamp, llvm_timestamp);
> }
> }
> #endif
> if (res != -1) {
> + /* These flags affect shader compilation. */
> + uint64_t shader_debug_flags =
> + rscreen->debug_flags &
> + (DBG_FS_CORRECT_DERIVS_AFTER_KILL |
> + DBG_SI_SCHED |
> + DBG_UNSAFE_MATH);
> +
> rscreen->disk_shader_cache =
> disk_cache_create(r600_get_family_name(rscreen),
> timestamp_str,
> - rscreen->debug_flags);
> + shader_debug_flags);
> free(timestamp_str);
> }
> }
> }
>
> static struct disk_cache *r600_get_disk_shader_cache(struct pipe_screen *pscreen)
> {
> struct r600_common_screen *rscreen = (struct r600_common_screen*)pscreen;
> return rscreen->disk_shader_cache;
> }
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list