radv/aco: enable FP16 features/extensions on GFX9+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 5 Jun 2020 07:27:01 +0000 (09:27 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 17 Jun 2020 16:12:51 +0000 (18:12 +0200)
This enables shaderFloat16, VK_AMD_gpu_shader_half_float and
VK_AMD_gpu_shader_int16.

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

docs/relnotes/new_features.txt
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_shader.c

index 1c01033a225fb12dba2af4f7a0db638ab56e7933..e6f1499abff395fb8c6cad7b08931cb3c2055fcf 100644 (file)
@@ -1,6 +1,8 @@
 GL_ARB_compute_variable_group_size on Iris.
 GL_EXT_shader_group_vote on GLES3.
 VK_AMD_texture_gather_bias_lod on RADV.
+VK_AMD_gpu_shader_half_float on RADV/ACO.
+VK_AMD_gpu_shader_int16 on RADV/ACO.
 VK_EXT_private_data on ANV and RADV.
 VK_EXT_custom_border_color on ANV and RADV.
 VK_EXT_pipeline_creation_cache_control on ANV and RADV.
index 6d86d88f615ece334aaae94d1a44932a3edb8500..2a51c60725986e6817a79e02b6888c997d3cd96c 100644 (file)
@@ -988,7 +988,7 @@ radv_get_physical_device_features_1_2(struct radv_physical_device *pdevice,
        f->storagePushConstant8 = true;
        f->shaderBufferInt64Atomics = LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco;
        f->shaderSharedInt64Atomics = LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco;
-       f->shaderFloat16 = pdevice->rad_info.has_packed_math_16bit && !pdevice->use_aco;
+       f->shaderFloat16 = pdevice->rad_info.has_packed_math_16bit;
        f->shaderInt8 = true;
 
        f->descriptorIndexing = true;
index c28d793aff56e10bba440cf211bbf9dab53267b2..68984000d561a73c09ba101c54917350c187a6c2 100644 (file)
@@ -165,8 +165,8 @@ EXTENSIONS = [
     Extension('VK_AMD_device_coherent_memory',            1, True),
     Extension('VK_AMD_draw_indirect_count',               1, True),
     Extension('VK_AMD_gcn_shader',                        1, True),
-    Extension('VK_AMD_gpu_shader_half_float',             1, '!device->use_aco && device->rad_info.has_packed_math_16bit'),
-    Extension('VK_AMD_gpu_shader_int16',                  1, '!device->use_aco && device->rad_info.has_packed_math_16bit'),
+    Extension('VK_AMD_gpu_shader_half_float',             1, 'device->rad_info.has_packed_math_16bit'),
+    Extension('VK_AMD_gpu_shader_int16',                  1, 'device->rad_info.has_packed_math_16bit'),
     Extension('VK_AMD_memory_overallocation_behavior',    1, True),
     # Disable mixed attachment samples on GFX6-GFX7 until the CTS failures have been resolved.
     Extension('VK_AMD_mixed_attachment_samples',          1, 'device->rad_info.chip_class >= GFX8'),
index eadb89be0ed6e3b609407dc3949eb7fe23cd2536..41700287baf10637f59f19c355dfa97ed182ac7f 100644 (file)
@@ -369,7 +369,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                                .device_group = true,
                                .draw_parameters = true,
                                .float_controls = true,
-                               .float16 = device->physical_device->rad_info.has_packed_math_16bit && !device->physical_device->use_aco,
+                               .float16 = device->physical_device->rad_info.has_packed_math_16bit,
                                .float64 = true,
                                .geometry_streams = true,
                                .image_ms_array = true,