Mesa (main): anv: Implement VK_EXT_acquire_drm_display
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 13 21:01:01 UTC 2021
Module: Mesa
Branch: main
Commit: c8ed5ac206a7c05647e5faea258ab20bf12803cc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8ed5ac206a7c05647e5faea258ab20bf12803cc
Author: Simon Zeni <simon at bl4ckb0ne.ca>
Date: Tue Jul 6 13:04:09 2021 -0400
anv: Implement VK_EXT_acquire_drm_display
Signed-off-by: Simon Zeni <simon at bl4ckb0ne.ca>
Reviewed-by: Simon Ser <contact at emersion.fr>
Tested-by: Simon Ser <contact at emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11735>
---
docs/features.txt | 2 +-
docs/relnotes/new_features.txt | 2 +-
src/intel/vulkan/anv_device.c | 1 +
src/intel/vulkan/anv_wsi_display.c | 21 +++++++++++++++++++++
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/docs/features.txt b/docs/features.txt
index 29e8a7ae200..5a54634d036 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -563,7 +563,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_GOOGLE_user_type DONE (anv, radv)
VK_IMG_filter_cubic DONE (tu/a650)
VK_NV_compute_shader_derivatives DONE (anv, radv)
- VK_EXT_acquire_drm_display DONE (radv)
+ VK_EXT_acquire_drm_display DONE (radv, anv)
OpenCL 1.0 -- all DONE:
diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index 6ffc4283b70..495a3545f28 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -7,7 +7,7 @@ VK_KHR_shader_subgroup_uniform_control_flow on Intel and RADV.
VK_EXT_color_write_enable on RADV.
32-bit x86 builds now default disable x87 math and use sse2.
GL ES 3.1 on GT21x hardware.
-VK_EXT_acquire_drm_display on RADV.
+VK_EXT_acquire_drm_display on RADV and ANV.
VK_EXT_vertex_input_dynamic_state on lavapipe
wideLines on lavapipe
VK_EXT_line_rasterization on lavapipe
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index f01f4c3dfe1..edb1e156013 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -191,6 +191,7 @@ static const struct vk_instance_extension_table instance_extensions = {
.KHR_get_display_properties2 = true,
.EXT_direct_mode_display = true,
.EXT_display_surface_counter = true,
+ .EXT_acquire_drm_display = true,
#endif
};
diff --git a/src/intel/vulkan/anv_wsi_display.c b/src/intel/vulkan/anv_wsi_display.c
index 8a3194a65d9..4bb0453f55f 100644
--- a/src/intel/vulkan/anv_wsi_display.c
+++ b/src/intel/vulkan/anv_wsi_display.c
@@ -315,3 +315,24 @@ anv_GetSwapchainCounterEXT(VkDevice _device,
_device, &device->physical->wsi_device,
swapchain, flag_bits, value);
}
+
+VkResult
+anv_AcquireDrmDisplayEXT(VkPhysicalDevice physical_device,
+ int32_t drm_fd,
+ VkDisplayKHR display)
+{
+ ANV_FROM_HANDLE(anv_physical_device, pdevice, physical_device);
+
+ return wsi_acquire_drm_display(physical_device, &pdevice->wsi_device, drm_fd, display);
+}
+
+VkResult
+anv_GetDrmDisplayEXT(VkPhysicalDevice physical_device,
+ int32_t drm_fd,
+ uint32_t connector_id,
+ VkDisplayKHR *display)
+{
+ ANV_FROM_HANDLE(anv_physical_device, pdevice, physical_device);
+
+ return wsi_get_drm_display(physical_device, &pdevice->wsi_device, drm_fd, connector_id, display);
+}
More information about the mesa-commit
mailing list