From: Samuel Pitoiset Date: Mon, 24 Oct 2022 02:31:31 +0000 (+0000) Subject: radv: disable shaderBufferFloat64AtomicMinMax on GFX11 X-Git-Tag: upstream/22.3.5~1212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf7ada973a8ab1dade57c51afb981b84daa28710;p=platform%2Fupstream%2Fmesa.git radv: disable shaderBufferFloat64AtomicMinMax on GFX11 buffer_atomic_{fmin,fmax}_x2 aren't supported on this GPU apparently. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 821c639..4f69ed6 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 f3673d6..8ab926b 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 */