From b3aee3aa23bc0945802ae37825c96dc7d5ec4684 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 5 May 2020 09:07:33 +0200 Subject: [PATCH] radv/aco: enable 8-bit/16-bit storage on GFX6-GFX7 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Reviewed-by: Rhys Perry Part-of: --- src/amd/vulkan/radv_device.c | 12 ++++++------ src/amd/vulkan/radv_extensions.py | 4 ++-- src/amd/vulkan/radv_shader.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 2efa549f2a3..62e37a6e2aa 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -956,9 +956,9 @@ radv_get_physical_device_features_1_1(struct radv_physical_device *pdevice, { assert(f->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES); - f->storageBuffer16BitAccess = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8; - f->uniformAndStorageBuffer16BitAccess = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8; - f->storagePushConstant16 = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8; + f->storageBuffer16BitAccess = true; + f->uniformAndStorageBuffer16BitAccess = true; + f->storagePushConstant16 = true; f->storageInputOutput16 = pdevice->rad_info.has_packed_math_16bit && (LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco); f->multiview = true; f->multiviewGeometryShader = true; @@ -978,9 +978,9 @@ radv_get_physical_device_features_1_2(struct radv_physical_device *pdevice, f->samplerMirrorClampToEdge = true; f->drawIndirectCount = true; - f->storageBuffer8BitAccess = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8; - f->uniformAndStorageBuffer8BitAccess = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8; - f->storagePushConstant8 = !pdevice->use_aco || pdevice->rad_info.chip_class >= GFX8; + f->storageBuffer8BitAccess = true; + f->uniformAndStorageBuffer8BitAccess = true; + 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; diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index ace0ee7024e..0aa0861322b 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -58,7 +58,7 @@ MAX_API_VERSION = None # Computed later EXTENSIONS = [ Extension('VK_ANDROID_external_memory_android_hardware_buffer', 3, 'RADV_SUPPORT_ANDROID_HARDWARE_BUFFER && device->rad_info.has_syncobj_wait_for_submit'), Extension('VK_ANDROID_native_buffer', 5, 'ANDROID && device->rad_info.has_syncobj_wait_for_submit'), - Extension('VK_KHR_16bit_storage', 1, '!device->use_aco || device->rad_info.chip_class >= GFX8'), + Extension('VK_KHR_16bit_storage', 1, True), Extension('VK_KHR_bind_memory2', 1, True), Extension('VK_KHR_buffer_device_address', 1, True), Extension('VK_KHR_create_renderpass2', 1, True), @@ -115,7 +115,7 @@ EXTENSIONS = [ Extension('VK_KHR_xlib_surface', 6, 'VK_USE_PLATFORM_XLIB_KHR'), Extension('VK_KHR_multiview', 1, True), Extension('VK_KHR_display', 23, 'VK_USE_PLATFORM_DISPLAY_KHR'), - Extension('VK_KHR_8bit_storage', 1, '!device->use_aco || device->rad_info.chip_class >= GFX8'), + Extension('VK_KHR_8bit_storage', 1, True), Extension('VK_EXT_direct_mode_display', 1, 'VK_USE_PLATFORM_DISPLAY_KHR'), Extension('VK_EXT_acquire_xlib_display', 1, 'VK_USE_PLATFORM_XLIB_XRANDR_EXT'), Extension('VK_EXT_buffer_device_address', 1, True), diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index a6fb13a60e7..55ff73799ef 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -389,8 +389,8 @@ radv_shader_compile_to_nir(struct radv_device *device, .shader_clock = true, .shader_viewport_index_layer = true, .stencil_export = true, - .storage_8bit = int8_int16_enable, - .storage_16bit = int8_int16_enable, + .storage_8bit = true, + .storage_16bit = true, .storage_image_ms = true, .subgroup_arithmetic = true, .subgroup_ballot = true, -- 2.30.2