From 8dd496955d96d2204b7a73c1cbb9ec392d85ecfc Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 12 Jun 2025 08:54:01 +0200 Subject: [PATCH] radv: advertise VK_KHR_unified_image_layouts on GFX11+ On GFX12, everything is compressed with DCC and it's completely transparent to the userspace driver. On GFX11-GFX11.5, DCC can compress everything with GENERAL and FMASK has been merged with DCC. On GFX10-GFX10.3, MSAA through FMASK can't be compressed with GENERAL and this will hurt performance. On GFX6-9, DCC can't be supported with GENERAL because no DCC stores, so this will destroy performance. Signed-off-by: Samuel Pitoiset Part-of: --- docs/features.txt | 1 + docs/relnotes/new_features.txt | 1 + src/amd/vulkan/radv_physical_device.c | 9 +++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/features.txt b/docs/features.txt index 85b13d2c5a4..c70c1e80c76 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -572,6 +572,7 @@ Khronos extensions that are not part of any Vulkan version: VK_KHR_surface_protected_capabilities DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_KHR_swapchain DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_swapchain_mutable_format DONE (anv, hasvk, hk, lvp, nvk, radv, tu, v3dv, vn) + VK_KHR_unified_image_layouts DONE (radv/gfx11+) VK_KHR_wayland_surface DONE (anv, dzn, hk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_workgroup_memory_explicit_layout DONE (anv, hk, nvk, hasvk, radv, tu, v3dv, vn) VK_KHR_win32_keyed_mutex not started diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 1547f805d56..50424773ad5 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -45,3 +45,4 @@ VK_EXT_depth_clamp_zero_one on panvk VK_KHR_depth_clamp_zero_one on panvk VK_EXT_depth_clip_control on panvk VK_KHR_maintenance9 on RADV +VK_KHR_unified_image_layouts on RADV (RDNA3+) diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index b0226d1092b..10d4665b352 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -603,6 +603,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device #endif .KHR_synchronization2 = true, .KHR_timeline_semaphore = true, + .KHR_unified_image_layouts = pdev->info.gfx_level >= GFX11, .KHR_uniform_buffer_standard_layout = true, .KHR_variable_pointers = true, .KHR_vertex_attribute_divisor = true, @@ -841,8 +842,8 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc .storagePushConstant8 = true, .shaderBufferInt64Atomics = true, .shaderSharedInt64Atomics = true, - .shaderFloat16 = pdev->info.has_packed_math_16bit || - (pdev->info.gfx_level == GFX8 && instance->drirc.expose_float16_gfx8), + .shaderFloat16 = + pdev->info.has_packed_math_16bit || (pdev->info.gfx_level == GFX8 && instance->drirc.expose_float16_gfx8), .shaderInt8 = true, .descriptorIndexing = true, @@ -1323,6 +1324,10 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc /* VK_KHR_maintenance9 */ .maintenance9 = true, + + /* VK_KHR_unified_layouts */ + .unifiedImageLayouts = true, + .unifiedImageLayoutsVideo = true, }; }