Mesa (master): radv/aco: enable FP16 features/extensions on GFX9+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 17 16:46:35 UTC 2020
Module: Mesa
Branch: master
Commit: 51fb3b09dc1cd096f727f712c18a023c3886f660
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=51fb3b09dc1cd096f727f712c18a023c3886f660
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Jun 5 09:27:01 2020 +0200
radv/aco: enable FP16 features/extensions on GFX9+
This enables shaderFloat16, VK_AMD_gpu_shader_half_float and
VK_AMD_gpu_shader_int16.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5347>
---
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,
More information about the mesa-commit
mailing list