mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
vulkan: allow support for protected surfaces
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: José Roberto de Souza <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
This commit is contained in:
parent
e722665d65
commit
53762e75e8
4 changed files with 12 additions and 3 deletions
|
|
@ -122,6 +122,9 @@ struct wsi_device {
|
|||
* If false, WSI will always use either modifiers or the prime blit path.
|
||||
*/
|
||||
bool supports_scanout;
|
||||
|
||||
bool supports_protected[VK_ICD_WSI_PLATFORM_MAX];
|
||||
|
||||
bool supports_modifiers;
|
||||
uint32_t maxImageDimension2D;
|
||||
uint32_t optimalBufferCopyRowPitchAlignment;
|
||||
|
|
|
|||
|
|
@ -812,6 +812,9 @@ wsi_GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice,
|
|||
const VkDisplayPlaneInfo2KHR *pDisplayPlaneInfo,
|
||||
VkDisplayPlaneCapabilities2KHR *pCapabilities)
|
||||
{
|
||||
VK_FROM_HANDLE(vk_physical_device, pdevice, physicalDevice);
|
||||
struct wsi_device *wsi_device = pdevice->wsi_device;
|
||||
|
||||
assert(pCapabilities->sType ==
|
||||
VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR);
|
||||
|
||||
|
|
@ -825,7 +828,8 @@ wsi_GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice,
|
|||
switch (ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: {
|
||||
VkSurfaceProtectedCapabilitiesKHR *protected = (void *)ext;
|
||||
protected->supportsProtected = VK_FALSE;
|
||||
protected->supportsProtected =
|
||||
wsi_device->supports_protected[VK_ICD_WSI_PLATFORM_DISPLAY];
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1282,7 +1282,8 @@ wsi_wl_surface_get_capabilities2(VkIcdSurfaceBase *surface,
|
|||
switch (ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: {
|
||||
VkSurfaceProtectedCapabilitiesKHR *protected = (void *)ext;
|
||||
protected->supportsProtected = VK_FALSE;
|
||||
protected->supportsProtected =
|
||||
wsi_device->supports_protected[VK_ICD_WSI_PLATFORM_WAYLAND];
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -783,7 +783,8 @@ x11_surface_get_capabilities2(VkIcdSurfaceBase *icd_surface,
|
|||
switch (ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: {
|
||||
VkSurfaceProtectedCapabilitiesKHR *protected = (void *)ext;
|
||||
protected->supportsProtected = VK_FALSE;
|
||||
protected->supportsProtected =
|
||||
wsi_device->supports_protected[VK_ICD_WSI_PLATFORM_XCB];
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue