XPresentQueryCapabilities(3)
π XPresentQueryCapabilities(3) β the "what can ur CRTC actually do" check β¨
okay so real talk, this is a page from the X Version 11 manual set (iykyk, the classics π), and it's literally about asking a screen-thing what cool tricks it's capable of. bestie, buckle up π
πΈ NAME πΈ
XPresentQueryCapabilities β query capabilities of a CRTC π
(yes. that's it. that's the whole vibe check. it asks a CRTC what it can do.)
β¨ SYNTAX β¨
#include <X11/extensions/Xpresent.h>
uint32_t XPresentQueryCapabilities (Display *display, XID target);
no cap, that's the entire signature. two args, one uint32_t coming back at u π«Ά
π« DESCRIPTION π«
okay so XPresentQueryCapabilities returns a bitmask of the supported capabilities for the target CRTC. (a bitmask, bestie β meaning it's a bunch of flags OR'd together, so read it like a little checklist of yes/no's π
)
here's the cute part about how target works:
- if
targetis a CRTC, then it is used as the target CRTC. straightforward, iconic, no notes. - if
targetis a WINDOW, then the target CRTC is selected by the X server from among the CRTCs on the screen specified by the window. so likeβ¦ you hand it a window and the server picks the CRTC for you. main character energy from the server tbh π
π the capabilities themselves π
PresentCapabilityAsyncβ this means the target device can flip the scanout buffer mid-frame instead of waiting for a vertical blank interval. the way that's so impatient of it π but okay. the precise latency between the flip request and the actual scanout transition is not defined by this specification, but is intended to be no more than a few scanlines. so like, fast, but the spec is NOT committing to a number, don't @ it πPresentCapabilityFenceβ this means the target device can take advantage of SyncFences in the Present operations to improve GPU throughput π₯. the driver must operate correctly in the absence of fences, but may have reduced performance. and here's the cute disclaimer: using fences for drivers not advertising this capability should have no performance impact. so if it doesn't advertise it, you're not missing out, promise π«ΆPresentCapabilityUSTβ this means the target device can scanout the image at an arbitrary UST time value, and is not driven by a periodic scanout timer β° (it's giving "i live outside the clock" energy). applications specifying UST times forXPresentPixmap(3)can expect that their image will appear to the user within a short amount of time from that specified in the request. the precise accuracy of the scanout time is not defined by the extension, but is expected to be on the order of milliseconds or less β¨
π¦ SEE ALSO π¦
(go read them, they're the whole friend group π)
π AUTHORS π
Keith Packard, Intel β absolute legend, we stan ππΈ
ngl the whole point of this one is just: call it, get auint32_tback, and check which ofPresentCapabilityAsync,PresentCapabilityFence, andPresentCapabilityUSTbits are set. that's the tea β
this has been libXpresent 1.0.2, dated 2022-08-27 β mwah, go query some capabilities bestie, ily π β¨π
π¦ where this page comes from
- alpine 3.24: libxpresent-doc 1.0.2-r0 Β· MIT
- arch rolling: libxpresent 1.0.2-1 Β· MIT
- nixos 26.05: libxpresent 1.0.2
- nixpkgs unstable: libxpresent 1.0.2
- Copyright Β© 2013 Keith Packard
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms