Skip to content

x11: ensure some context is bound before calling glClientWaitSync

Ray Strode requested to merge wip/fencing-without-context-is-discouraged into master

Since commit 972134ab we now call glClientWaitSync for the vendor nvidia driver, to know when a frame is ready for the compositor to process.

glClientWaitSync can be called regardless of which context is currently bound, but if no context is bound at all, it returns 0 without doing anything.

This commit checks for that edge case, and ensures a context gets made current in the event no context is already current, before calling glClientWaitSync.

Merge request reports