mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-09 07:18:04 +02:00
Reintroduce is pending
Change-Id: Ie5f2e9363df827d6b0e4e3ff83859bcd20106d62 Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
This commit is contained in:
parent
fb4b1b18bb
commit
b4896d3ab8
2 changed files with 23 additions and 6 deletions
|
|
@ -147,7 +147,7 @@ VkResult wsi_ext_present_timing::get_queue_end_timing_to_queue(uint32_t image_in
|
|||
{
|
||||
for (auto &slot : m_queue)
|
||||
{
|
||||
if ((slot.m_image_index == image_index) && !slot.is_complete(VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT))
|
||||
if ((slot.m_image_index == image_index) && slot.is_pending(VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT))
|
||||
{
|
||||
uint64_t time;
|
||||
auto stage_timing_optional = slot.get_stage_timing(VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT);
|
||||
|
|
@ -407,15 +407,23 @@ swapchain_presentation_entry::swapchain_presentation_entry(VkPresentStageFlagsEX
|
|||
bool swapchain_presentation_entry::is_complete(VkPresentStageFlagBitsEXT stage)
|
||||
{
|
||||
auto stage_timing_optional = get_stage_timing(stage);
|
||||
return stage_timing_optional.has_value() ? stage_timing_optional->get().m_set.load(std::memory_order_relaxed) : true;
|
||||
return stage_timing_optional.has_value() ? stage_timing_optional->get().m_set.load(std::memory_order_relaxed) :
|
||||
false;
|
||||
}
|
||||
|
||||
bool swapchain_presentation_entry::is_pending(VkPresentStageFlagBitsEXT stage)
|
||||
{
|
||||
auto stage_timing_optional = get_stage_timing(stage);
|
||||
return stage_timing_optional.has_value() ? !stage_timing_optional->get().m_set.load(std::memory_order_relaxed) :
|
||||
false;
|
||||
}
|
||||
|
||||
bool swapchain_presentation_entry::has_outstanding_stages()
|
||||
{
|
||||
return (!is_complete(VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT) ||
|
||||
!is_complete(VK_PRESENT_STAGE_IMAGE_LATCHED_BIT_EXT) ||
|
||||
!is_complete(VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT) ||
|
||||
!is_complete(VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT));
|
||||
return (is_pending(VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT) ||
|
||||
is_pending(VK_PRESENT_STAGE_IMAGE_LATCHED_BIT_EXT) ||
|
||||
is_pending(VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT) ||
|
||||
is_pending(VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT));
|
||||
}
|
||||
|
||||
bool swapchain_presentation_entry::has_completed_stages()
|
||||
|
|
|
|||
|
|
@ -151,6 +151,15 @@ struct swapchain_presentation_entry
|
|||
*/
|
||||
bool is_complete(VkPresentStageFlagBitsEXT stage);
|
||||
|
||||
/**
|
||||
* @brief Check if a present stage is pending.
|
||||
*
|
||||
* @param stage The stage to get the status for.
|
||||
*
|
||||
* @return true when the stage is pending and false otherwise.
|
||||
*/
|
||||
bool is_pending(VkPresentStageFlagBitsEXT stage);
|
||||
|
||||
/**
|
||||
* @brief Check if there are outstanding present stages.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue