mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 02:04:41 +08:00
ir3,tu: filter debug flags included in the hash key
Only include debug flags that have an influence on codegen. Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
This commit is contained in:
parent
d8c90806e4
commit
554494e2cd
@ -378,6 +378,21 @@ ir3_debug_print(struct ir3 *ir, const char *when)
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the debug flags that influence shader codegen and should be included
|
||||
* in the hash key. Note that we use a deny list so that we don't accidentally
|
||||
* forget to include new flags.
|
||||
*/
|
||||
static inline enum ir3_shader_debug
|
||||
ir3_shader_debug_hash_key()
|
||||
{
|
||||
return (enum ir3_shader_debug)(
|
||||
ir3_shader_debug &
|
||||
~(IR3_DBG_SHADER_VS | IR3_DBG_SHADER_TCS | IR3_DBG_SHADER_TES |
|
||||
IR3_DBG_SHADER_GS | IR3_DBG_SHADER_FS | IR3_DBG_SHADER_CS |
|
||||
IR3_DBG_DISASM | IR3_DBG_OPTMSGS | IR3_DBG_NOCACHE |
|
||||
IR3_DBG_SHADER_INTERNAL | IR3_DBG_SCHEDMSGS | IR3_DBG_RAMSGS));
|
||||
}
|
||||
|
||||
ENDC;
|
||||
|
||||
#endif /* IR3_COMPILER_H_ */
|
||||
|
@ -44,7 +44,7 @@ ir3_disk_cache_init(struct ir3_compiler *compiler)
|
||||
char timestamp[41];
|
||||
_mesa_sha1_format(timestamp, id_sha1);
|
||||
|
||||
uint64_t driver_flags = ir3_shader_debug;
|
||||
uint64_t driver_flags = ir3_shader_debug_hash_key();
|
||||
compiler->disk_cache = disk_cache_create(renderer, timestamp, driver_flags);
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ tu_hash_shaders(unsigned char *hash,
|
||||
}
|
||||
}
|
||||
_mesa_sha1_update(&ctx, &state, sizeof(state));
|
||||
enum ir3_shader_debug ir3_debug_key = ir3_shader_debug;
|
||||
enum ir3_shader_debug ir3_debug_key = ir3_shader_debug_hash_key();
|
||||
_mesa_sha1_update(&ctx, &ir3_debug_key, sizeof(ir3_debug_key));
|
||||
_mesa_sha1_final(&ctx, hash);
|
||||
}
|
||||
@ -1503,7 +1503,7 @@ tu_hash_compute(unsigned char *hash,
|
||||
_mesa_sha1_update(&ctx, layout->sha1, sizeof(layout->sha1));
|
||||
|
||||
tu_hash_stage(&ctx, pipeline_flags, stage, NULL, key);
|
||||
enum ir3_shader_debug ir3_debug_key = ir3_shader_debug;
|
||||
enum ir3_shader_debug ir3_debug_key = ir3_shader_debug_hash_key();
|
||||
_mesa_sha1_update(&ctx, &ir3_debug_key, sizeof(ir3_debug_key));
|
||||
|
||||
_mesa_sha1_final(&ctx, hash);
|
||||
|
Loading…
Reference in New Issue
Block a user