mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
wsi: Track CPU side present ordering via a serial
We will use this in our hueristics to pick the most optimal buffer in AcquireNextImageKHR Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
d9cbc79941
commit
06c2af994b
2 changed files with 4 additions and 0 deletions
|
|
@ -1472,6 +1472,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
|||
/* The app can only submit images they have acquired. */
|
||||
assert(image->acquired);
|
||||
image->acquired = false;
|
||||
image->present_serial = ++swapchain->present_serial;
|
||||
|
||||
#ifdef HAVE_LIBDRM
|
||||
if (has_signal_dma_buf) {
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ struct wsi_image {
|
|||
* on the CPU side via acquire_next_image.
|
||||
*/
|
||||
bool acquired;
|
||||
uint64_t present_serial;
|
||||
|
||||
#ifndef _WIN32
|
||||
uint64_t drm_modifier;
|
||||
|
|
@ -164,6 +165,8 @@ struct wsi_swapchain {
|
|||
|
||||
struct wsi_image_info image_info;
|
||||
uint32_t image_count;
|
||||
|
||||
uint64_t present_serial;
|
||||
|
||||
struct {
|
||||
enum wsi_swapchain_blit_type type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue