Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / loader / loader_dri3_helper.h
index 839cba30df0193574154bcd650b0cf9522b6f28d..af5fdbc4193da2caa35117fc5377c7562fab001e 100644 (file)
@@ -61,9 +61,13 @@ struct loader_dri3_buffer {
    struct xshmfence *shm_fence; /* pointer to xshmfence object */
    bool         busy;           /* Set on swap, cleared on IdleNotify */
    bool         own_pixmap;     /* We allocated the pixmap ID, free on destroy */
+   bool         reallocate;     /* Buffer should be reallocated and not reused */
 
+   uint32_t     num_planes;
    uint32_t     size;
-   uint32_t     pitch;
+   int          strides[4];
+   int          offsets[4];
+   uint64_t     modifier;
    uint32_t     cpp;
    uint32_t     flags;
    uint32_t     width, height;
@@ -108,19 +112,21 @@ struct loader_dri3_vtable {
 
 struct loader_dri3_drawable {
    xcb_connection_t *conn;
+   xcb_screen_t *screen;
    __DRIdrawable *dri_drawable;
    xcb_drawable_t drawable;
+   xcb_window_t window;
    int width;
    int height;
    int depth;
    uint8_t have_back;
    uint8_t have_fake_front;
    uint8_t is_pixmap;
-   uint8_t flipping;
 
    /* Information about the GPU owning the buffer */
    __DRIscreen *dri_screen;
    bool is_different_gpu;
+   bool multiplanes_available;
 
    /* Present extension capabilities
     */
@@ -150,6 +156,8 @@ struct loader_dri3_drawable {
    xcb_special_event_t *special_event;
 
    bool first_init;
+   bool adaptive_sync;
+   bool adaptive_sync_active;
    int swap_interval;
 
    struct loader_dri3_extensions *ext;
@@ -157,6 +165,7 @@ struct loader_dri3_drawable {
 
    unsigned int swap_method;
    unsigned int back_format;
+   xcb_present_complete_mode_t last_present_mode;
 
    /* Currently protects the following fields:
     * event_cnd, has_event_waiter,
@@ -165,6 +174,7 @@ struct loader_dri3_drawable {
     */
    mtx_t mtx;
    cnd_t event_cnd;
+   unsigned last_special_event_sequence;
    bool has_event_waiter;
 };
 
@@ -180,6 +190,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
                           xcb_drawable_t drawable,
                           __DRIscreen *dri_screen,
                           bool is_different_gpu,
+                          bool is_multiplanes_available,
                           const __DRIconfig *dri_config,
                           struct loader_dri3_extensions *ext,
                           const struct loader_dri3_vtable *vtable,
@@ -194,6 +205,7 @@ int64_t
 loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
                              int64_t target_msc, int64_t divisor,
                              int64_t remainder, unsigned flush_flags,
+                             const int *rects, int n_rects,
                              bool force_copy);
 
 int
@@ -237,6 +249,15 @@ loader_dri3_create_image(xcb_connection_t *c,
                          const __DRIimageExtension *image,
                          void *loaderPrivate);
 
+#ifdef HAVE_DRI3_MODIFIERS
+__DRIimage *
+loader_dri3_create_image_from_buffers(xcb_connection_t *c,
+                                      xcb_dri3_buffers_from_pixmap_reply_t *bp_reply,
+                                      unsigned int format,
+                                      __DRIscreen *dri_screen,
+                                      const __DRIimageExtension *image,
+                                      void *loaderPrivate);
+#endif
 int
 loader_dri3_get_buffers(__DRIdrawable *driDrawable,
                         unsigned int format,