radv: add radv_has_shader_buffer_float_minmax

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16203>
This commit is contained in:
Rhys Perry 2022-05-05 12:35:09 +01:00 committed by Marge Bot
parent d70688492c
commit 28a87dee60
2 changed files with 8 additions and 4 deletions

View File

@ -1624,10 +1624,7 @@ 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 = ((pdevice->rad_info.chip_class == GFX6 ||
pdevice->rad_info.chip_class == GFX7) &&
!pdevice->use_llvm) ||
pdevice->rad_info.chip_class >= GFX10;
bool has_shader_buffer_float_minmax = radv_has_shader_buffer_float_minmax(pdevice);
bool has_shader_image_float_minmax = pdevice->rad_info.chip_class != GFX8 &&
pdevice->rad_info.chip_class != GFX9;
features->shaderBufferFloat16Atomics = false;

View File

@ -2938,6 +2938,13 @@ radv_use_llvm_for_stage(struct radv_device *device, UNUSED gl_shader_stage stage
return device->physical_device->use_llvm;
}
static inline bool
radv_has_shader_buffer_float_minmax(const struct radv_physical_device *pdevice)
{
return (pdevice->rad_info.chip_class <= GFX7 && !pdevice->use_llvm) ||
pdevice->rad_info.chip_class >= GFX10;
}
struct radv_acceleration_structure {
struct vk_object_base base;