X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Floader%2Floader_dri3_helper.h;h=7e3d82947bcc8eb19bdba25624bb3c8022bbea4f;hb=478fc2d2a1a392108f48a3ed9aa21b10be72b4a2;hp=4ce98b8c59fc99bc97a07d30ad65f4c633907eae;hpb=7b0e8264dd21ae05521d08d41fecd84139401fef;p=mesa.git diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h index 4ce98b8c59f..7e3d82947bc 100644 --- a/src/loader/loader_dri3_helper.h +++ b/src/loader/loader_dri3_helper.h @@ -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; @@ -99,6 +103,7 @@ struct loader_dri3_vtable { void (*set_drawable_size)(struct loader_dri3_drawable *, int, int); bool (*in_current_context)(struct loader_dri3_drawable *); __DRIcontext *(*get_dri_context)(struct loader_dri3_drawable *); + __DRIscreen *(*get_dri_screen)(void); void (*flush_drawable)(struct loader_dri3_drawable *, unsigned); void (*show_fps)(struct loader_dri3_drawable *, uint64_t); }; @@ -115,11 +120,11 @@ struct loader_dri3_drawable { 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 */ @@ -156,6 +161,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, @@ -179,6 +185,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, @@ -236,6 +243,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,