diff options
author | Louis-Francis Ratté-Boulianne <[email protected]> | 2017-07-07 02:54:26 -0400 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2018-03-09 17:47:14 +0000 |
commit | 069fdd5f9facbd72fb6a289696c7b74e3237e70f (patch) | |
tree | 1a019e8325ed0d9799d710e6131b38a0cc28721d /src/loader/loader_dri3_helper.h | |
parent | 61309c2a727d52d543207d6ae79fcb3e68b5cff3 (diff) |
egl/x11: Support DRI3 v1.1
Add support for DRI3 v1.1, which allows pixmaps to be backed by
multi-planar buffers, or those with format modifiers. This is both
for allocating render buffers, as well as EGLImage imports from a
native pixmap (EGL_NATIVE_PIXMAP_KHR).
Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/loader/loader_dri3_helper.h')
-rw-r--r-- | src/loader/loader_dri3_helper.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h index 5caf214b372..c54c668032e 100644 --- a/src/loader/loader_dri3_helper.h +++ b/src/loader/loader_dri3_helper.h @@ -62,8 +62,11 @@ struct loader_dri3_buffer { bool busy; /* Set on swap, cleared on IdleNotify */ bool own_pixmap; /* We allocated the pixmap ID, free on destroy */ + 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; @@ -120,6 +123,7 @@ struct loader_dri3_drawable { /* Information about the GPU owning the buffer */ __DRIscreen *dri_screen; bool is_different_gpu; + bool multiplanes_available; /* Present extension capabilities */ @@ -180,6 +184,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, @@ -237,6 +242,14 @@ loader_dri3_create_image(xcb_connection_t *c, const __DRIimageExtension *image, void *loaderPrivate); +__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); + int loader_dri3_get_buffers(__DRIdrawable *driDrawable, unsigned int format, |