From c859eef1580ab1b8ba975ac293e75d0ef6ed9c63 Mon Sep 17 00:00:00 2001 From: Dennis Tsiang Date: Thu, 10 Oct 2024 10:24:36 +0100 Subject: [PATCH] Fix bug in frame boundary feature In submit_wait_request we were passing the memory location of the pointer to submission_pnext instead of the actual pointer. This commit fixes it to pass the actual pointer. Additionally when creating the frame boundary, set the pNext explicitly to nullptr. Change-Id: I61ab9c898c3af4b3f401a3de6fdf7201fd2553ac Signed-off-by: Dennis Tsiang --- layer/swapchain_api.cpp | 2 +- wsi/frame_boundary.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/layer/swapchain_api.cpp b/layer/swapchain_api.cpp index 23d24f2..c031df0 100644 --- a/layer/swapchain_api.cpp +++ b/layer/swapchain_api.cpp @@ -153,7 +153,7 @@ static VkResult submit_wait_request(VkQueue queue, const VkPresentInfoKHR &prese /* Notify that we don't want to pass any further frame boundary events */ frame_boundary_event_handled = submission_pnext != nullptr; - TRY(wsi::sync_queue_submit(device_data, queue, VK_NULL_HANDLE, semaphores, &submission_pnext)); + TRY(wsi::sync_queue_submit(device_data, queue, VK_NULL_HANDLE, semaphores, submission_pnext)); return VK_SUCCESS; } diff --git a/wsi/frame_boundary.cpp b/wsi/frame_boundary.cpp index 34f1567..53c2c48 100644 --- a/wsi/frame_boundary.cpp +++ b/wsi/frame_boundary.cpp @@ -68,6 +68,7 @@ bool frame_boundary_handler::should_layer_handle_frame_boundary_events() const VkFrameBoundaryEXT frame_boundary_handler::create_frame_boundary(VkImage *image) { VkFrameBoundaryEXT frame_boundary{}; + frame_boundary.pNext = nullptr; frame_boundary.sType = VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT; frame_boundary.flags = VK_FRAME_BOUNDARY_FRAME_END_BIT_EXT; /* Number of presented images by swapchain as the frame boundary