diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 821c639824e..4f69ed61e66 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1684,15 +1684,16 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *features = (VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)ext; - bool has_shader_buffer_float_minmax = radv_has_shader_buffer_float_minmax(pdevice); bool has_shader_image_float_minmax = pdevice->rad_info.gfx_level != GFX8 && pdevice->rad_info.gfx_level != GFX9 && pdevice->rad_info.gfx_level != GFX11; features->shaderBufferFloat16Atomics = false; features->shaderBufferFloat16AtomicAdd = false; features->shaderBufferFloat16AtomicMinMax = false; - features->shaderBufferFloat32AtomicMinMax = has_shader_buffer_float_minmax; - features->shaderBufferFloat64AtomicMinMax = has_shader_buffer_float_minmax; + features->shaderBufferFloat32AtomicMinMax = + radv_has_shader_buffer_float_minmax(pdevice, 32); + features->shaderBufferFloat64AtomicMinMax = + radv_has_shader_buffer_float_minmax(pdevice, 64); features->shaderSharedFloat16Atomics = false; features->shaderSharedFloat16AtomicAdd = false; features->shaderSharedFloat16AtomicMinMax = false; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index f3673d6289e..8ab926b7f78 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -3137,10 +3137,11 @@ radv_use_llvm_for_stage(struct radv_device *device, UNUSED gl_shader_stage stage } static inline bool -radv_has_shader_buffer_float_minmax(const struct radv_physical_device *pdevice) +radv_has_shader_buffer_float_minmax(const struct radv_physical_device *pdevice, unsigned bitsize) { return (pdevice->rad_info.gfx_level <= GFX7 && !pdevice->use_llvm) || - pdevice->rad_info.gfx_level >= GFX10; + pdevice->rad_info.gfx_level == GFX10 || pdevice->rad_info.gfx_level == GFX10_3 || + (pdevice->rad_info.gfx_level == GFX11 && bitsize == 32); } /* radv_perfcounter.c */