radv/aco: enable shaderInt8 and VK_KHR_shader_float16_int8 on GFX6-GFX7
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 4 Jun 2020 09:33:28 +0000 (11:33 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 9 Jun 2020 21:25:38 +0000 (21:25 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>

src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_shader.c

index 5db1456a4da698f011f0f2fb625d19dc0e7660d4..32a0458c4ee5d8b293c1a8d632022d815ac15591 100644 (file)
@@ -984,7 +984,7 @@ radv_get_physical_device_features_1_2(struct radv_physical_device *pdevice,
        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->shaderInt8 = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8;
+       f->shaderInt8 = true;
 
        f->descriptorIndexing = true;
        f->shaderInputAttachmentArrayDynamicIndexing = true;
index 0aa0861322b204f21acbd9d5de96ae42b71641aa..c28d793aff56e10bba440cf211bbf9dab53267b2 100644 (file)
@@ -98,7 +98,7 @@ EXTENSIONS = [
     Extension('VK_KHR_shader_clock',                      1, True),
     Extension('VK_KHR_shader_draw_parameters',            1, True),
     Extension('VK_KHR_shader_float_controls',             1, True),
-    Extension('VK_KHR_shader_float16_int8',               1, '!device->use_aco || device->rad_info.chip_class >= GFX8'),
+    Extension('VK_KHR_shader_float16_int8',               1, True),
     Extension('VK_KHR_shader_non_semantic_info',          1, True),
     Extension('VK_KHR_shader_subgroup_extended_types',    1, True),
     Extension('VK_KHR_spirv_1_4',                         1, True),
index 2ae60fe7d5eaa4201707d6ea917ed7938035d071..f6c09866113a5e18690ed4993b7b022c695e879f 100644 (file)
@@ -351,8 +351,6 @@ radv_shader_compile_to_nir(struct radv_device *device,
                                }
                        }
                }
-               bool int8_enable = !device->physical_device->use_aco ||
-                                  device->physical_device->rad_info.chip_class >= GFX8;
                const struct spirv_to_nir_options spirv_options = {
                        .lower_ubo_ssbo_access_to_offsets = true,
                        .caps = {
@@ -377,7 +375,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                                .image_ms_array = true,
                                .image_read_without_format = true,
                                .image_write_without_format = true,
-                               .int8 = int8_enable,
+                               .int8 = true,
                                .int16 = true,
                                .int64 = true,
                                .int64_atomics = true,