radv: fix shader caching with discard->demote workaround
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: bdd7587414
("radv: use nir_lower_discard_to_demote to work around game bugs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7423>
This commit is contained in:
@@ -219,6 +219,8 @@ static uint32_t get_hash_flags(const struct radv_device *device)
|
||||
hash_flags |= RADV_HASH_SHADER_GE_WAVE32;
|
||||
if (device->physical_device->use_llvm)
|
||||
hash_flags |= RADV_HASH_SHADER_LLVM;
|
||||
if (device->instance->debug_flags & RADV_DEBUG_DISCARD_TO_DEMOTE)
|
||||
hash_flags |= RADV_HASH_SHADER_DISCARD_TO_DEMOTE;
|
||||
return hash_flags;
|
||||
}
|
||||
|
||||
|
@@ -1646,6 +1646,7 @@ struct radv_shader_module;
|
||||
#define RADV_HASH_SHADER_PS_WAVE32 (1 << 2)
|
||||
#define RADV_HASH_SHADER_GE_WAVE32 (1 << 3)
|
||||
#define RADV_HASH_SHADER_LLVM (1 << 4)
|
||||
#define RADV_HASH_SHADER_DISCARD_TO_DEMOTE (1 << 5)
|
||||
|
||||
void
|
||||
radv_hash_shaders(unsigned char *hash,
|
||||
|
Reference in New Issue
Block a user