From 51fb3b09dc1cd096f727f712c18a023c3886f660 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 5 Jun 2020 09:27:01 +0200 Subject: [PATCH] radv/aco: enable FP16 features/extensions on GFX9+ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This enables shaderFloat16, VK_AMD_gpu_shader_half_float and VK_AMD_gpu_shader_int16. Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Part-of: --- docs/relnotes/new_features.txt | 2 ++ src/amd/vulkan/radv_device.c | 2 +- src/amd/vulkan/radv_extensions.py | 4 ++-- src/amd/vulkan/radv_shader.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 1c01033a225..e6f1499abff 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -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. diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 6d86d88f615..2a51c607259 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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; diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index c28d793aff5..68984000d56 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -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'), diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index eadb89be0ed..41700287baf 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -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, -- 2.30.2