From 00afc4e353fae3b39a4c272a2ddbc62e78bdf7e2 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 11 Sep 2024 11:56:27 +0200 Subject: [PATCH] radv: advertise Vulkan 1.4 on GFX8+ GFX6-7 can't support Vulkan 1.4 because indexTypeUint8 isn't supported in hardware, and emulating features for very old hardware isn't the option I would personally choose. Signed-off-by: Samuel Pitoiset Part-of: --- docs/relnotes/new_features.txt | 3 ++- src/amd/vulkan/meson.build | 4 ++-- src/amd/vulkan/radv_instance.h | 3 ++- src/amd/vulkan/radv_physical_device.c | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 9a6b48db7c3..7cfe3305b62 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -1 +1,2 @@ -cl_khr_depth_images in rusticl \ No newline at end of file +cl_khr_depth_images in rusticl +Vulkan 1.4 on radv/gfx8+ diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index 539be57c9dc..38789f0f1c1 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -269,7 +269,7 @@ endif icd_command = [ prog_python, '@INPUT0@', - '--api-version', '1.3', '--xml', '@INPUT1@', + '--api-version', '1.4', '--xml', '@INPUT1@', '--lib-path', join_paths(icd_lib_path, icd_file_name), '--out', '@OUTPUT@', ] @@ -295,7 +295,7 @@ _dev_icd = custom_target( output : _dev_icdname, command : [ prog_python, '@INPUT0@', - '--api-version', '1.3', '--xml', '@INPUT1@', + '--api-version', '1.4', '--xml', '@INPUT1@', '--lib-path', meson.current_build_dir() / icd_file_name, '--out', '@OUTPUT@', ], diff --git a/src/amd/vulkan/radv_instance.h b/src/amd/vulkan/radv_instance.h index 876461b642b..13be1d24bc9 100644 --- a/src/amd/vulkan/radv_instance.h +++ b/src/amd/vulkan/radv_instance.h @@ -19,7 +19,8 @@ #ifdef ANDROID_STRICT #define RADV_API_VERSION VK_MAKE_VERSION(1, 1, VK_HEADER_VERSION) #else -#define RADV_API_VERSION VK_MAKE_VERSION(1, 3, VK_HEADER_VERSION) +#define RADV_API_VERSION VK_MAKE_VERSION(1, 4, VK_HEADER_VERSION) +#define RADV_API_VERSION_1_3 VK_MAKE_VERSION(1, 3, VK_HEADER_VERSION) #endif enum radv_trace_mode { diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index 776e2d785cb..f86bca0d6e9 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -1381,7 +1381,11 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev) } pdev->vk.properties = (struct vk_properties){ +#ifdef ANDROID_STRICT .apiVersion = RADV_API_VERSION, +#else + .apiVersion = pdev->info.gfx_level >= GFX8 ? RADV_API_VERSION : RADV_API_VERSION_1_3, +#endif .driverVersion = vk_get_driver_version(), .vendorID = ATI_VENDOR_ID, .deviceID = pdev->info.pci_id,