diff options
author | Keith Packard <[email protected]> | 2018-02-07 10:31:44 -0800 |
---|---|---|
committer | Keith Packard <[email protected]> | 2018-06-19 14:17:46 -0700 |
commit | 54d0daa4819338c5b94b6dd80a8693eb6046d09f (patch) | |
tree | fc55721fd8d56314d330bc90e4f5119fca98d183 /src/intel/vulkan/anv_extensions_gen.py | |
parent | da997ebec92942193955386535813374286b7fb1 (diff) |
anv: Add KHR_display extension to anv [v7]
This adds support for the KHR_display extension to the anv Vulkan
driver. The driver now attempts to open the master DRM node when the
KHR_display extension is requested so that the common winsys code can
perform the necessary operations.
v2: Make sure primary fd is usable
When KHR_display is selected, we try to open the primary node
instead of the render node in case the user wants to use
KHR_display for presentation. However, if we're actually going
to end up using RandR leases, then we don't care if the
resulting fd can't be used for display, but the kernel also
prevents us from using it for drawing when someone else has
master.
v3:
Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args
Suggested-by: Eric Engestrom <[email protected]>
v4:
Adapt primary node usage to new wsi_device_init API
v5:
Adopt Jason Ekstrand's coding conventions
Declare variables at first use, eliminate extra whitespace between
types and names. Wrap lines to 80 columns.
Remove spurious MM_PER_PIXEL define
Suggested-by: Jason Ekstrand <[email protected]>
v6:
Open DRM master before initializing WSI layer.
The DRM master FD is passed to the WSI layer during
initialization, so we need to open the device slightly earlier
in the function.
Close DRM master in device_finish.
Use anv_gem_get_param to detect working master_fd instead of
directly using the ioctl.
Suggested-by: Jason Ekstrand <[email protected]>
v7:
Add vkCreateDisplayModeKHR. This doesn't actually create
new modes, it only looks to see if the requested parameters
matches an existing mode and returns that.
Suggested-by: Jason Ekstrand <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_extensions_gen.py')
-rw-r--r-- | src/intel/vulkan/anv_extensions_gen.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_extensions_gen.py b/src/intel/vulkan/anv_extensions_gen.py index b75cb3e6fbb..a8b398f630d 100644 --- a/src/intel/vulkan/anv_extensions_gen.py +++ b/src/intel/vulkan/anv_extensions_gen.py @@ -103,7 +103,7 @@ _TEMPLATE_C = Template(COPYRIGHT + """ #include "vk_util.h" /* Convert the VK_USE_PLATFORM_* defines to booleans */ -%for platform in ['ANDROID', 'WAYLAND', 'XCB', 'XLIB']: +%for platform in ['ANDROID', 'WAYLAND', 'XCB', 'XLIB', 'DISPLAY']: #ifdef VK_USE_PLATFORM_${platform}_KHR # undef VK_USE_PLATFORM_${platform}_KHR # define VK_USE_PLATFORM_${platform}_KHR true @@ -122,7 +122,8 @@ _TEMPLATE_C = Template(COPYRIGHT + """ #define ANV_HAS_SURFACE (VK_USE_PLATFORM_WAYLAND_KHR || \\ VK_USE_PLATFORM_XCB_KHR || \\ - VK_USE_PLATFORM_XLIB_KHR) + VK_USE_PLATFORM_XLIB_KHR || \\ + VK_USE_PLATFORM_DISPLAY_KHR) static const uint32_t MAX_API_VERSION = ${MAX_API_VERSION.c_vk_version()}; |