aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader/loader_dri3_helper.h
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2017-08-10 16:14:23 +0200
committerThomas Hellstrom <[email protected]>2017-08-17 07:39:42 +0200
commit1e83baeb4b6b6d557ae8b9c219347b1b252b27c7 (patch)
treeb907be53bf669f565a8dcdc3810d1a6d65f891d3 /src/loader/loader_dri3_helper.h
parentf71e174bb8d01855b56523348e5b8f50a6a5ce78 (diff)
loader_dri3: Honor the request to preserve back buffer content
EGL uses the force_copy parameter to loader_dri3_swap_buffers_msc() to indicate that it wants to preserve back buffer contents across a buffer swap. While the loader then turns off server-side page-flipping there's nothing to guarantee that a new backbuffer isn't chosen when EGL starts to render again, and that buffer's content is of course undefined. So rework the functionality: If the client supports local blits, allow server-side page flipping and when a new back is grabbed, if needed, blit the old back's content to the new back. If the client doesn't support local blits, disallow server-side page-flipping to avoid a client deadlock and then, when grabbing a new back buffer, sleep until the old back is idle, which may take a substantial time depending on swap interval. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/loader/loader_dri3_helper.h')
-rw-r--r--src/loader/loader_dri3_helper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h
index 231d39db04d..165c3cc9e08 100644
--- a/src/loader/loader_dri3_helper.h
+++ b/src/loader/loader_dri3_helper.h
@@ -145,6 +145,7 @@ struct loader_dri3_drawable {
struct loader_dri3_buffer *buffers[LOADER_DRI3_NUM_BUFFERS];
int cur_back;
int num_back;
+ int cur_blit_source;
uint32_t *stamp;