radv: only expose storageInputOutput16 for chips with double rate fp16
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 5 Apr 2020 07:33:43 +0000 (09:33 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 9 Apr 2020 11:35:08 +0000 (13:35 +0200)
This feature allows to use both 16-bit integers and 16-bit floats
as inputs/outputs.

This disables storageInputOutput16 on GFX8 because only GFX9+ supports
double rate packed math.

This improves consistency regarding other AMD Vulkan drivers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4453>

src/amd/vulkan/radv_device.c

index 097f54931b94b10933fd724061a7542992fe3086..db992d6867a4845738c01a444cff28324858f1cb 100644 (file)
@@ -1000,7 +1000,7 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->storageBuffer16BitAccess = !pdevice->use_aco;
                        features->uniformAndStorageBuffer16BitAccess = !pdevice->use_aco;
                        features->storagePushConstant16 = !pdevice->use_aco;
-                       features->storageInputOutput16 = pdevice->rad_info.chip_class >= GFX8 && !pdevice->use_aco && LLVM_VERSION_MAJOR >= 9;
+                       features->storageInputOutput16 = pdevice->rad_info.has_double_rate_fp16 && !pdevice->use_aco && LLVM_VERSION_MAJOR >= 9;
                        break;
                }
                case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
@@ -1218,7 +1218,7 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->storageBuffer16BitAccess = !pdevice->use_aco;
                        features->uniformAndStorageBuffer16BitAccess = !pdevice->use_aco;
                        features->storagePushConstant16 = !pdevice->use_aco;
-                       features->storageInputOutput16 = pdevice->rad_info.chip_class >= GFX8 && !pdevice->use_aco && LLVM_VERSION_MAJOR >= 9;
+                       features->storageInputOutput16 = pdevice->rad_info.has_double_rate_fp16 && !pdevice->use_aco && LLVM_VERSION_MAJOR >= 9;
                        features->multiview = true;
                        features->multiviewGeometryShader = true;
                        features->multiviewTessellationShader = true;