mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-26 03:48:12 +02:00
glx: move driwindows_display::event_base to driwindows_context
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
This commit is contained in:
parent
2126a48149
commit
08e2985e57
1 changed files with 19 additions and 22 deletions
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
struct driwindows_display
|
struct driwindows_display
|
||||||
{
|
{
|
||||||
int event_base;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct driwindows_context
|
struct driwindows_context
|
||||||
|
|
@ -50,6 +49,7 @@ struct driwindows_screen
|
||||||
struct glx_screen base;
|
struct glx_screen base;
|
||||||
__DRIscreen *driScreen;
|
__DRIscreen *driScreen;
|
||||||
__GLXDRIscreen vtable;
|
__GLXDRIscreen vtable;
|
||||||
|
int event_base;
|
||||||
Bool copySubBuffer;
|
Bool copySubBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -466,6 +466,24 @@ driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is
|
||||||
struct driwindows_screen *psc;
|
struct driwindows_screen *psc;
|
||||||
struct glx_config *configs = NULL, *visuals = NULL;
|
struct glx_config *configs = NULL, *visuals = NULL;
|
||||||
int directCapable;
|
int directCapable;
|
||||||
|
int eventBase, errorBase;
|
||||||
|
int major, minor, patch;
|
||||||
|
|
||||||
|
/* Verify server has Windows-DRI extension */
|
||||||
|
if (!XWindowsDRIQueryExtension(dpy, &eventBase, &errorBase)) {
|
||||||
|
ErrorMessageF("Windows-DRI extension not available\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!XWindowsDRIQueryVersion(dpy, &major, &minor, &patch)) {
|
||||||
|
ErrorMessageF("Fetching Windows-DRI extension version failed\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!windows_check_renderer()) {
|
||||||
|
ErrorMessageF("Windows-DRI extension disabled for GDI Generic renderer\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
psc = calloc(1, sizeof *psc);
|
psc = calloc(1, sizeof *psc);
|
||||||
if (psc == NULL)
|
if (psc == NULL)
|
||||||
|
|
@ -537,30 +555,9 @@ driwindowsCreateDisplay(Display * dpy)
|
||||||
{
|
{
|
||||||
struct driwindows_display *pdpyp;
|
struct driwindows_display *pdpyp;
|
||||||
|
|
||||||
int eventBase, errorBase;
|
|
||||||
int major, minor, patch;
|
|
||||||
|
|
||||||
/* Verify server has Windows-DRI extension */
|
|
||||||
if (!XWindowsDRIQueryExtension(dpy, &eventBase, &errorBase)) {
|
|
||||||
ErrorMessageF("Windows-DRI extension not available\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!XWindowsDRIQueryVersion(dpy, &major, &minor, &patch)) {
|
|
||||||
ErrorMessageF("Fetching Windows-DRI extension version failed\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!windows_check_renderer()) {
|
|
||||||
ErrorMessageF("Windows-DRI extension disabled for GDI Generic renderer\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
pdpyp = malloc(sizeof *pdpyp);
|
pdpyp = malloc(sizeof *pdpyp);
|
||||||
if (pdpyp == NULL)
|
if (pdpyp == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pdpyp->event_base = eventBase;
|
|
||||||
|
|
||||||
return &pdpyp->base;
|
return &pdpyp->base;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue