mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-20 06:50:08 +01:00
Fix the VK_KHR_DISPLAY implementation within the WSI Layer
Surface extents are initialized in this change. This fixes the issues with execution of the wsi layer display backend. Additionally, functional code snippets are moved out of assert calls in the file wsi/display/swapchain.cpp to avoid them being stripped out by ndebug compilation. This change also fixes the unused variable error in ndebug compilation. Signed-off-by: Ginu Jacob <ginu.jacob@arm.com> Change-Id: I4ad33ef52dbb81faaf580ce7b89ce74ffe96e002
This commit is contained in:
parent
d0671474e5
commit
3675833d19
3 changed files with 6 additions and 3 deletions
|
|
@ -38,6 +38,7 @@ namespace display
|
||||||
surface::surface(drm_display_mode *display_mode, VkExtent2D extent)
|
surface::surface(drm_display_mode *display_mode, VkExtent2D extent)
|
||||||
: m_display_mode(display_mode)
|
: m_display_mode(display_mode)
|
||||||
, m_extent(extent)
|
, m_extent(extent)
|
||||||
|
, m_surface_properties(this)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,7 @@ GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR
|
||||||
});
|
});
|
||||||
|
|
||||||
assert(valid_mode != display->get_display_modes_end());
|
assert(valid_mode != display->get_display_modes_end());
|
||||||
|
UNUSED(valid_mode);
|
||||||
|
|
||||||
VkDisplayPlaneCapabilitiesKHR planeCapabilities{};
|
VkDisplayPlaneCapabilitiesKHR planeCapabilities{};
|
||||||
planeCapabilities.supportedAlpha = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR;
|
planeCapabilities.supportedAlpha = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR;
|
||||||
|
|
|
||||||
|
|
@ -524,8 +524,9 @@ void swapchain::present_image(const pending_present_request &pending_present)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(FD_ISSET(display->get_drm_fd(), &fds));
|
int result = FD_ISSET(display->get_drm_fd(), &fds);
|
||||||
|
assert(result > 0);
|
||||||
|
UNUSED(result);
|
||||||
drmEventContext ev = {};
|
drmEventContext ev = {};
|
||||||
ev.version = DRM_EVENT_CONTEXT_VERSION;
|
ev.version = DRM_EVENT_CONTEXT_VERSION;
|
||||||
ev.page_flip_handler = page_flip_event;
|
ev.page_flip_handler = page_flip_event;
|
||||||
|
|
@ -603,9 +604,9 @@ void swapchain::destroy_image(swapchain_image &image)
|
||||||
}
|
}
|
||||||
if (image_data->fb_id != std::numeric_limits<uint32_t>::max())
|
if (image_data->fb_id != std::numeric_limits<uint32_t>::max())
|
||||||
{
|
{
|
||||||
|
|
||||||
int result = drmModeRmFB(display->get_drm_fd(), image_data->fb_id);
|
int result = drmModeRmFB(display->get_drm_fd(), image_data->fb_id);
|
||||||
assert(result == 0);
|
assert(result == 0);
|
||||||
|
UNUSED(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_allocator.destroy(1, image_data);
|
m_allocator.destroy(1, image_data);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue