loader/dri3: add drawable type set by GLX and EGL
Drawable type include more information which can be used to distinguish pixmap and pbuffer which both treated as pixmap before. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
This commit is contained in:
@@ -384,6 +384,7 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw)
|
||||
int
|
||||
loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
xcb_drawable_t drawable,
|
||||
enum loader_dri3_drawable_type type,
|
||||
__DRIscreen *dri_screen,
|
||||
bool is_different_gpu,
|
||||
bool multiplanes_available,
|
||||
@@ -403,6 +404,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
draw->ext = ext;
|
||||
draw->vtable = vtable;
|
||||
draw->drawable = drawable;
|
||||
draw->type = type;
|
||||
draw->region = 0;
|
||||
draw->dri_screen = dri_screen;
|
||||
draw->is_different_gpu = is_different_gpu;
|
||||
|
||||
@@ -116,6 +116,13 @@ struct loader_dri3_vtable {
|
||||
|
||||
#define LOADER_DRI3_NUM_BUFFERS (1 + LOADER_DRI3_MAX_BACK)
|
||||
|
||||
enum loader_dri3_drawable_type {
|
||||
LOADER_DRI3_DRAWABLE_UNKNOWN,
|
||||
LOADER_DRI3_DRAWABLE_WINDOW,
|
||||
LOADER_DRI3_DRAWABLE_PIXMAP,
|
||||
LOADER_DRI3_DRAWABLE_PBUFFER,
|
||||
};
|
||||
|
||||
struct loader_dri3_drawable {
|
||||
xcb_connection_t *conn;
|
||||
xcb_screen_t *screen;
|
||||
@@ -129,6 +136,7 @@ struct loader_dri3_drawable {
|
||||
uint8_t have_back;
|
||||
uint8_t have_fake_front;
|
||||
uint8_t is_pixmap;
|
||||
enum loader_dri3_drawable_type type;
|
||||
|
||||
/* Information about the GPU owning the buffer */
|
||||
__DRIscreen *dri_screen;
|
||||
@@ -202,6 +210,7 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw);
|
||||
int
|
||||
loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
xcb_drawable_t drawable,
|
||||
enum loader_dri3_drawable_type type,
|
||||
__DRIscreen *dri_screen,
|
||||
bool is_different_gpu,
|
||||
bool is_multiplanes_available,
|
||||
|
||||
Reference in New Issue
Block a user