-enum dri3_buffer_type {
- dri3_buffer_back = 0,
- dri3_buffer_front = 1
-};
-
-struct dri3_buffer {
- __DRIimage *image;
- uint32_t pixmap;
-
- /* Synchronization between the client and X server is done using an
- * xshmfence that is mapped into an X server SyncFence. This lets the
- * client check whether the X server is done using a buffer with a simple
- * xshmfence call, rather than going to read X events from the wire.
- *
- * However, we can only wait for one xshmfence to be triggered at a time,
- * so we need to know *which* buffer is going to be idle next. We do that
- * by waiting for a PresentIdleNotify event. When that event arrives, the
- * 'busy' flag gets cleared and the client knows that the fence has been
- * triggered, and that the wait call will not block.
- */
-
- uint32_t sync_fence; /* XID of X SyncFence object */
- struct xshmfence *shm_fence; /* pointer to xshmfence object */
- GLboolean busy; /* Set on swap, cleared on IdleNotify */
- GLboolean own_pixmap; /* We allocated the pixmap ID, free on destroy */
- void *driverPrivate;
-
- uint32_t size;
- uint32_t pitch;
- uint32_t cpp;
- uint32_t flags;
- uint32_t width, height;
- uint64_t last_swap;
-
- enum dri3_buffer_type buffer_type;
-};
-