glx/windows: Fix compliation after code motion to put event base in 'dri' context

> ../src/glx/driwindows_glx.c: In function ‘driwindowsCreateScreen’:
> ../src/glx/driwindows_glx.c:479:48: error: ‘dpy’ undeclared (first use in this function)

08e2985e57 moved this code from driwindowsCreateDisplay to
driwindowsCreateScreen.

Unfortunately, dpy is no longer a parameter, so we need to look it up in
glx_display struct. (Looking it up in psc->base before it's initialized
here initialized would be incorrect).

Fixes: 08e2985e57 ("glx: move driwindows_display::event_base to driwindows_context")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
This commit is contained in:
Jon Turney 2026-03-19 15:46:14 +00:00 committed by Marge Bot
parent 464daf978e
commit db26f34530

View file

@ -452,12 +452,12 @@ driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is
int major, minor, patch;
/* Verify server has Windows-DRI extension */
if (!XWindowsDRIQueryExtension(dpy, &eventBase, &errorBase)) {
if (!XWindowsDRIQueryExtension(priv->dpy, &eventBase, &errorBase)) {
ErrorMessageF("Windows-DRI extension not available\n");
return NULL;
}
if (!XWindowsDRIQueryVersion(dpy, &major, &minor, &patch)) {
if (!XWindowsDRIQueryVersion(priv->dpy, &major, &minor, &patch)) {
ErrorMessageF("Fetching Windows-DRI extension version failed\n");
return NULL;
}