diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2019-08-04 01:34:19 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2019-08-12 13:32:18 +0000 |
commit | d062bec48dfd2d79d8eab09218fe9e4bd74a5857 (patch) | |
tree | 9a40c25d9fcabe6852729b68d7c4642515729312 /src/amd/vulkan | |
parent | ba8d3c362bf01640df9579ba65b32c1582d1ceea (diff) |
radv: Hash Wave32 settings in shader key.
Can result in different shaders.
Fixes: 8a86908e9a7 "radv/gfx10: add Wave32 support for vertex, tessellation and geometry shaders"
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 6 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 5e1dae86c11..8e56e2cbd79 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -178,6 +178,12 @@ static uint32_t get_hash_flags(struct radv_device *device) hash_flags |= RADV_HASH_SHADER_NO_NGG; if (device->instance->perftest_flags & RADV_PERFTEST_SISCHED) hash_flags |= RADV_HASH_SHADER_SISCHED; + if (device->physical_device->cs_wave_size == 32) + hash_flags |= RADV_HASH_SHADER_CS_WAVE32; + if (device->physical_device->ps_wave_size == 32) + hash_flags |= RADV_HASH_SHADER_PS_WAVE32; + if (device->physical_device->ge_wave_size == 32) + hash_flags |= RADV_HASH_SHADER_GE_WAVE32; return hash_flags; } diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 8f3615f2f1c..7d7704f69aa 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1423,6 +1423,9 @@ struct radv_shader_module; #define RADV_HASH_SHADER_SISCHED (1 << 1) #define RADV_HASH_SHADER_UNSAFE_MATH (1 << 2) #define RADV_HASH_SHADER_NO_NGG (1 << 3) +#define RADV_HASH_SHADER_CS_WAVE32 (1 << 4) +#define RADV_HASH_SHADER_PS_WAVE32 (1 << 5) +#define RADV_HASH_SHADER_GE_WAVE32 (1 << 6) void radv_hash_shaders(unsigned char *hash, |