radv: advertise VK_EXT_border_color_swizzle on GFX10+

On GFX9 and older, the driver needs to swizzle itself it seems.
Exposing it on GFX10+, allows us to test it with Zink, at least.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17057>
This commit is contained in:
Samuel Pitoiset 2022-06-14 10:30:54 +02:00 committed by Marge Bot
parent 09a7304d5a
commit 16c47ad347
3 changed files with 10 additions and 2 deletions

View File

@ -529,7 +529,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_win32_surface DONE (lvp)
VK_KHR_xcb_surface DONE (anv, lvp, radv, tu, v3dv, vn)
VK_KHR_xlib_surface DONE (anv, lvp, radv, tu, v3dv, vn)
VK_EXT_border_color_swizzle DONE (anv, lvp, tu)
VK_EXT_border_color_swizzle DONE (anv, lvp, tu, radv/gfx10+)
VK_EXT_buffer_device_address DONE (radv)
VK_EXT_calibrated_timestamps DONE (anv, lvp, radv)
VK_EXT_color_write_enable DONE (anv, lvp, radv, tu, v3dv)

View File

@ -7,4 +7,4 @@ vertexAttributeInstanceRateZeroDivisor support for lavapipe
panfrost Valhall support (conformant OpenGL ES 3.1 on Mali-G57)
VK_EXT_primitives_generated_query on RADV
VK_EXT_non_seamless_cube_map on RADV, ANV
VK_EXT_border_color_swizzle on lavapipe, ANV, turnip
VK_EXT_border_color_swizzle on lavapipe, ANV, turnip, RADV

View File

@ -467,6 +467,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
.KHR_workgroup_memory_explicit_layout = true,
.KHR_zero_initialize_workgroup_memory = true,
.EXT_4444_formats = true,
.EXT_border_color_swizzle = device->rad_info.gfx_level >= GFX10,
.EXT_buffer_device_address = true,
.EXT_calibrated_timestamps = RADV_SUPPORT_CALIBRATED_TIMESTAMPS,
.EXT_color_write_enable = true,
@ -1770,6 +1771,13 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
features->nonSeamlessCubeMap = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: {
VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *features =
(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)ext;
features->borderColorSwizzle = true;
features->borderColorSwizzleFromImage = true;
break;
}
default:
break;
}