kopper: move pixmap param for drawable creation to info struct
no functional changes Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24075>
This commit is contained in:

committed by
Marge Bot

parent
7100ef4566
commit
6b0f8973c9
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
typedef struct __DRIkopperExtensionRec __DRIkopperExtension;
|
typedef struct __DRIkopperExtensionRec __DRIkopperExtension;
|
||||||
typedef struct __DRIkopperLoaderExtensionRec __DRIkopperLoaderExtension;
|
typedef struct __DRIkopperLoaderExtensionRec __DRIkopperLoaderExtension;
|
||||||
|
typedef struct __DRIkopperDrawableInfoRec __DRIkopperDrawableInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This extension defines the core GL-atop-VK functionality. This is used by the
|
* This extension defines the core GL-atop-VK functionality. This is used by the
|
||||||
@@ -48,6 +49,10 @@ typedef struct __DRIkopperLoaderExtensionRec __DRIkopperLoaderExtension;
|
|||||||
#define __DRI_KOPPER "DRI_Kopper"
|
#define __DRI_KOPPER "DRI_Kopper"
|
||||||
#define __DRI_KOPPER_VERSION 1
|
#define __DRI_KOPPER_VERSION 1
|
||||||
|
|
||||||
|
struct __DRIkopperDrawableInfoRec {
|
||||||
|
int is_pixmap;
|
||||||
|
};
|
||||||
|
|
||||||
struct __DRIkopperExtensionRec {
|
struct __DRIkopperExtensionRec {
|
||||||
__DRIextension base;
|
__DRIextension base;
|
||||||
|
|
||||||
@@ -60,7 +65,7 @@ struct __DRIkopperExtensionRec {
|
|||||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
||||||
const __DRIconfig *config,
|
const __DRIconfig *config,
|
||||||
void *loaderPrivate,
|
void *loaderPrivate,
|
||||||
int pixmap);
|
__DRIkopperDrawableInfo *info);
|
||||||
/* flags is a set of __DRI2_FLUSH_* flags */
|
/* flags is a set of __DRI2_FLUSH_* flags */
|
||||||
int64_t (*swapBuffers)(__DRIdrawable *draw, uint32_t flush_flags);
|
int64_t (*swapBuffers)(__DRIdrawable *draw, uint32_t flush_flags);
|
||||||
void (*setSwapInterval)(__DRIdrawable *drawable, int interval);
|
void (*setSwapInterval)(__DRIdrawable *drawable, int interval);
|
||||||
|
@@ -1595,8 +1595,10 @@ dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
|
|||||||
if (dri2_dpy->kopper) {
|
if (dri2_dpy->kopper) {
|
||||||
dri2_surf->dri_drawable = dri2_dpy->kopper->createNewDrawable(
|
dri2_surf->dri_drawable = dri2_dpy->kopper->createNewDrawable(
|
||||||
dri2_dpy->dri_screen_render_gpu, config, loaderPrivate,
|
dri2_dpy->dri_screen_render_gpu, config, loaderPrivate,
|
||||||
dri2_surf->base.Type == EGL_PBUFFER_BIT ||
|
&(__DRIkopperDrawableInfo){
|
||||||
dri2_surf->base.Type == EGL_PIXMAP_BIT);
|
.is_pixmap = dri2_surf->base.Type == EGL_PBUFFER_BIT ||
|
||||||
|
dri2_surf->base.Type == EGL_PIXMAP_BIT,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
__DRIcreateNewDrawableFunc createNewDrawable;
|
__DRIcreateNewDrawableFunc createNewDrawable;
|
||||||
if (dri2_dpy->image_driver)
|
if (dri2_dpy->image_driver)
|
||||||
|
@@ -893,13 +893,13 @@ static __DRIdrawable *
|
|||||||
kopperCreateNewDrawable(__DRIscreen *psp,
|
kopperCreateNewDrawable(__DRIscreen *psp,
|
||||||
const __DRIconfig *config,
|
const __DRIconfig *config,
|
||||||
void *data,
|
void *data,
|
||||||
int is_pixmap)
|
__DRIkopperDrawableInfo *info)
|
||||||
{
|
{
|
||||||
assert(data != NULL);
|
assert(data != NULL);
|
||||||
|
|
||||||
struct dri_screen *screen = dri_screen(psp);
|
struct dri_screen *screen = dri_screen(psp);
|
||||||
struct dri_drawable *drawable =
|
struct dri_drawable *drawable =
|
||||||
screen->create_drawable(screen, &config->modes, is_pixmap, data);
|
screen->create_drawable(screen, &config->modes, info->is_pixmap, data);
|
||||||
|
|
||||||
return opaque_dri_drawable(drawable);
|
return opaque_dri_drawable(drawable);
|
||||||
}
|
}
|
||||||
|
@@ -726,7 +726,10 @@ driswCreateDrawable(struct glx_screen *base, XID xDrawable,
|
|||||||
/* Create a new drawable */
|
/* Create a new drawable */
|
||||||
if (kopper) {
|
if (kopper) {
|
||||||
pdp->driDrawable =
|
pdp->driDrawable =
|
||||||
kopper->createNewDrawable(psc->driScreen, config->driConfig, pdp, !(type & GLX_WINDOW_BIT));
|
kopper->createNewDrawable(psc->driScreen, config->driConfig, pdp,
|
||||||
|
&(__DRIkopperDrawableInfo){
|
||||||
|
.is_pixmap = !(type & GLX_WINDOW_BIT),
|
||||||
|
});
|
||||||
|
|
||||||
pdp->swapInterval = dri_get_initial_swap_interval(psc->driScreen, psc->config);
|
pdp->swapInterval = dri_get_initial_swap_interval(psc->driScreen, psc->config);
|
||||||
psc->kopper->setSwapInterval(pdp->driDrawable, pdp->swapInterval);
|
psc->kopper->setSwapInterval(pdp->driDrawable, pdp->swapInterval);
|
||||||
|
Reference in New Issue
Block a user