vulkan: Add KHR_display extension using DRM [v10]

Graphics / Mesa 3D Graphics Library / Mesa - Keith Packard [keithp.com] - 19 June 2018 21:17 EDT

This adds support for the KHR_display extension support to the vulkan WSI layer. Driver support will be added separately.

v2:
- fix double ;; in wsi_common_display.c

- Move mode list from wsi_display to wsi_display_connector

- Fix scope for wsi_display_mode andwsi_display_connector allocs

- Switch all allocations to vk_zalloc instead of vk_alloc.

- Fix DRM failure in wsi_display_get_physical_device_display_properties

When DRM fails, or when we don't have a master fd (presumably due to application errors), just return 0 properties from this function, which is at least a valid response.

- Use vk_outarray for all property queries

This is a bit less error-prone than open-coding the same stuff.

- Remove VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR from surface caps

Until we have multi-plane support, we shouldn't pretend to have any multi-plane semantics, even if undefined.

da997ebec9 vulkan: Add KHR_display extension using DRM [v10]
src/amd/vulkan/radv_device.c | 8 +
src/amd/vulkan/radv_private.h | 1 +
src/amd/vulkan/radv_wsi.c | 3 +-
src/intel/vulkan/anv_device.c | 4 +
src/intel/vulkan/anv_private.h | 1 +
src/intel/vulkan/anv_wsi.c | 3 +-
src/vulkan/Makefile.am | 7 +
src/vulkan/Makefile.sources | 4 +
src/vulkan/wsi/meson.build | 8 +
src/vulkan/wsi/wsi_common.c | 12 +-
src/vulkan/wsi/wsi_common.h | 5 +-
src/vulkan/wsi/wsi_common_display.c | 1477 +++++++++++++++++++++++++++++++++++
src/vulkan/wsi/wsi_common_display.h | 85 ++
src/vulkan/wsi/wsi_common_private.h | 9 +
14 files changed, 1622 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share