Stefan Dirsch
f72bdc5d3e
0002-glx-fix-some-indentation.patch, 0003-glx-add-an-implicit-param-to-createScreen.patch, 0004-glx-pass-implicit-load-param-through-allocation.patch, 0005-dri-plumb-a-implicit-param-through-createNewScreen-i.patch, 0006-gbm-plumb-an-implicit-param-through-device-creation.patch, 0007-frontends-dri-plumb-an-implicit-param-through-screen.patch, 0008-pipe-loader-plumb-a-flag-for-implicit-driver-load-th.patch, 0009-zink-don-t-print-error-messages-when-failing-an-impl.patch * get rid of error message: 'MESA: error: ZINK: vkEnumeratePhysicalDevices failed (VK_ERROR_INITIALIZATION_FAILED)' [gitlab mesa issue #10802] OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1273
576 lines
25 KiB
Diff
576 lines
25 KiB
Diff
From 6b3f6a6e0b1e2cba749f8c38b087a59eee3f4efa Mon Sep 17 00:00:00 2001
|
|
From: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
|
|
Date: Tue, 12 Mar 2024 10:00:54 -0400
|
|
Subject: [PATCH 5/9] dri: plumb a 'implicit' param through createNewScreen
|
|
interfaces
|
|
|
|
---
|
|
include/GL/internal/dri_interface.h | 33 ++++++++++++++++--
|
|
include/GL/internal/mesa_interface.h | 5 ++-
|
|
src/egl/drivers/dri2/egl_dri2.c | 20 +++++------
|
|
src/gallium/frontends/dri/dri2.c | 6 ++--
|
|
src/gallium/frontends/dri/dri_util.c | 52 ++++++++++++++++++++--------
|
|
src/gallium/frontends/dri/dri_util.h | 5 +++
|
|
src/gallium/frontends/dri/drisw.c | 3 +-
|
|
src/gallium/frontends/dri/kopper.c | 3 +-
|
|
src/gbm/backends/dri/gbm_dri.c | 16 ++++-----
|
|
src/glx/dri2_glx.c | 8 ++---
|
|
src/glx/dri3_glx.c | 12 +++----
|
|
src/glx/drisw_glx.c | 14 ++++----
|
|
12 files changed, 120 insertions(+), 57 deletions(-)
|
|
|
|
Index: mesa-24.0.3/include/GL/internal/dri_interface.h
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/include/GL/internal/dri_interface.h
|
|
+++ mesa-24.0.3/include/GL/internal/dri_interface.h
|
|
@@ -913,7 +913,7 @@ struct __DRIframebufferRec {
|
|
* extension. Version 1 is required by the X server, and version 3 is used.
|
|
*/
|
|
#define __DRI_SWRAST "DRI_SWRast"
|
|
-#define __DRI_SWRAST_VERSION 4
|
|
+#define __DRI_SWRAST_VERSION 5
|
|
|
|
struct __DRIswrastExtensionRec {
|
|
__DRIextension base;
|
|
@@ -961,6 +961,18 @@ struct __DRIswrastExtensionRec {
|
|
const __DRIconfig ***driver_configs,
|
|
void *loaderPrivate);
|
|
|
|
+ /**
|
|
+ * createNewScreen() with the driver extensions passed in and implicit load flag.
|
|
+ *
|
|
+ * \since version 6
|
|
+ */
|
|
+ __DRIscreen *(*createNewScreen3)(int screen,
|
|
+ const __DRIextension **loader_extensions,
|
|
+ const __DRIextension **driver_extensions,
|
|
+ const __DRIconfig ***driver_configs,
|
|
+ bool implicit,
|
|
+ void *loaderPrivate);
|
|
+
|
|
};
|
|
|
|
/** Common DRI function definitions, shared among DRI2 and Image extensions
|
|
@@ -972,6 +984,13 @@ typedef __DRIscreen *
|
|
const __DRIextension **driver_extensions,
|
|
const __DRIconfig ***driver_configs,
|
|
void *loaderPrivate);
|
|
+typedef __DRIscreen *
|
|
+(*__DRIcreateNewScreen3Func)(int screen, int fd,
|
|
+ const __DRIextension **extensions,
|
|
+ const __DRIextension **driver_extensions,
|
|
+ const __DRIconfig ***driver_configs,
|
|
+ bool implicit,
|
|
+ void *loaderPrivate);
|
|
|
|
typedef __DRIdrawable *
|
|
(*__DRIcreateNewDrawableFunc)(__DRIscreen *screen,
|
|
@@ -1107,7 +1126,7 @@ struct __DRIdri2LoaderExtensionRec {
|
|
* constructors for DRI2. The X server uses up to version 4.
|
|
*/
|
|
#define __DRI_DRI2 "DRI_DRI2"
|
|
-#define __DRI_DRI2_VERSION 4
|
|
+#define __DRI_DRI2_VERSION 5
|
|
|
|
#define __DRI_API_OPENGL 0 /**< OpenGL compatibility profile */
|
|
#define __DRI_API_GLES 1 /**< OpenGL ES 1.x */
|
|
@@ -1226,6 +1245,13 @@ struct __DRIdri2ExtensionRec {
|
|
* \since version 4
|
|
*/
|
|
__DRIcreateNewScreen2Func createNewScreen2;
|
|
+
|
|
+ /**
|
|
+ * createNewScreen with the driver's extension list passed in and implicit load flag.
|
|
+ *
|
|
+ * \since version 5
|
|
+ */
|
|
+ __DRIcreateNewScreen3Func createNewScreen3;
|
|
};
|
|
|
|
|
|
@@ -2083,7 +2109,7 @@ struct __DRIimageLoaderExtensionRec {
|
|
*/
|
|
|
|
#define __DRI_IMAGE_DRIVER "DRI_IMAGE_DRIVER"
|
|
-#define __DRI_IMAGE_DRIVER_VERSION 1
|
|
+#define __DRI_IMAGE_DRIVER_VERSION 2
|
|
|
|
struct __DRIimageDriverExtensionRec {
|
|
__DRIextension base;
|
|
@@ -2093,6 +2119,7 @@ struct __DRIimageDriverExtensionRec {
|
|
__DRIcreateNewDrawableFunc createNewDrawable;
|
|
__DRIcreateContextAttribsFunc createContextAttribs;
|
|
__DRIgetAPIMaskFunc getAPIMask;
|
|
+ __DRIcreateNewScreen3Func createNewScreen3;
|
|
};
|
|
|
|
/**
|
|
Index: mesa-24.0.3/include/GL/internal/mesa_interface.h
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/include/GL/internal/mesa_interface.h
|
|
+++ mesa-24.0.3/include/GL/internal/mesa_interface.h
|
|
@@ -33,7 +33,7 @@
|
|
typedef struct __DRImesaCoreExtensionRec __DRImesaCoreExtension;
|
|
|
|
#define __DRI_MESA "DRI_Mesa"
|
|
-#define __DRI_MESA_VERSION 1
|
|
+#define __DRI_MESA_VERSION 2
|
|
|
|
struct dri_screen;
|
|
|
|
@@ -63,6 +63,9 @@ struct __DRImesaCoreExtensionRec {
|
|
const __DRIconfig **(*initScreen)(struct dri_screen *screen);
|
|
|
|
int (*queryCompatibleRenderOnlyDeviceFd)(int kms_only_fd);
|
|
+
|
|
+ /* version 2 */
|
|
+ __DRIcreateNewScreen3Func createNewScreen3;
|
|
};
|
|
|
|
#endif /* MESA_INTERFACE_H */
|
|
Index: mesa-24.0.3/src/egl/drivers/dri2/egl_dri2.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/egl/drivers/dri2/egl_dri2.c
|
|
+++ mesa-24.0.3/src/egl/drivers/dri2/egl_dri2.c
|
|
@@ -701,8 +701,8 @@ const __DRIimageLookupExtension image_lo
|
|
|
|
static const struct dri_extension_match dri3_driver_extensions[] = {
|
|
{__DRI_CORE, 1, offsetof(struct dri2_egl_display, core), false},
|
|
- {__DRI_MESA, 1, offsetof(struct dri2_egl_display, mesa), false},
|
|
- {__DRI_IMAGE_DRIVER, 1, offsetof(struct dri2_egl_display, image_driver),
|
|
+ {__DRI_MESA, 2, offsetof(struct dri2_egl_display, mesa), false},
|
|
+ {__DRI_IMAGE_DRIVER, 2, offsetof(struct dri2_egl_display, image_driver),
|
|
false},
|
|
{__DRI_CONFIG_OPTIONS, 2, offsetof(struct dri2_egl_display, configOptions),
|
|
true},
|
|
@@ -710,8 +710,8 @@ static const struct dri_extension_match
|
|
|
|
static const struct dri_extension_match dri2_driver_extensions[] = {
|
|
{__DRI_CORE, 1, offsetof(struct dri2_egl_display, core), false},
|
|
- {__DRI_MESA, 1, offsetof(struct dri2_egl_display, mesa), false},
|
|
- {__DRI_DRI2, 4, offsetof(struct dri2_egl_display, dri2), false},
|
|
+ {__DRI_MESA, 2, offsetof(struct dri2_egl_display, mesa), false},
|
|
+ {__DRI_DRI2, 5, offsetof(struct dri2_egl_display, dri2), false},
|
|
{__DRI_CONFIG_OPTIONS, 2, offsetof(struct dri2_egl_display, configOptions),
|
|
true},
|
|
};
|
|
@@ -724,8 +724,8 @@ static const struct dri_extension_match
|
|
|
|
static const struct dri_extension_match swrast_driver_extensions[] = {
|
|
{__DRI_CORE, 1, offsetof(struct dri2_egl_display, core), false},
|
|
- {__DRI_MESA, 1, offsetof(struct dri2_egl_display, mesa), false},
|
|
- {__DRI_SWRAST, 4, offsetof(struct dri2_egl_display, swrast), false},
|
|
+ {__DRI_MESA, 2, offsetof(struct dri2_egl_display, mesa), false},
|
|
+ {__DRI_SWRAST, 5, offsetof(struct dri2_egl_display, swrast), false},
|
|
{__DRI_CONFIG_OPTIONS, 2, offsetof(struct dri2_egl_display, configOptions),
|
|
true},
|
|
};
|
|
@@ -1013,18 +1013,18 @@ dri2_create_screen(_EGLDisplay *disp)
|
|
* will not crash.
|
|
*/
|
|
if (strcmp(dri2_dpy->driver_name, driver_name_display_gpu) == 0) {
|
|
- dri2_dpy->dri_screen_display_gpu = dri2_dpy->mesa->createNewScreen(
|
|
+ dri2_dpy->dri_screen_display_gpu = dri2_dpy->mesa->createNewScreen3(
|
|
0, dri2_dpy->fd_display_gpu, dri2_dpy->loader_extensions,
|
|
- dri2_dpy->driver_extensions, &dri2_dpy->driver_configs, disp);
|
|
+ dri2_dpy->driver_extensions, &dri2_dpy->driver_configs, false, disp);
|
|
}
|
|
free(driver_name_display_gpu);
|
|
}
|
|
}
|
|
|
|
int screen_fd = dri2_dpy->swrast ? -1 : dri2_dpy->fd_render_gpu;
|
|
- dri2_dpy->dri_screen_render_gpu = dri2_dpy->mesa->createNewScreen(
|
|
+ dri2_dpy->dri_screen_render_gpu = dri2_dpy->mesa->createNewScreen3(
|
|
0, screen_fd, dri2_dpy->loader_extensions, dri2_dpy->driver_extensions,
|
|
- &dri2_dpy->driver_configs, disp);
|
|
+ &dri2_dpy->driver_configs, false, disp);
|
|
|
|
if (dri2_dpy->dri_screen_render_gpu == NULL) {
|
|
_eglLog(_EGL_WARNING, "egl: failed to create dri2 screen");
|
|
Index: mesa-24.0.3/src/gallium/frontends/dri/dri2.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/gallium/frontends/dri/dri2.c
|
|
+++ mesa-24.0.3/src/gallium/frontends/dri/dri2.c
|
|
@@ -2484,12 +2484,13 @@ dri_query_compatible_render_only_device_
|
|
}
|
|
|
|
static const struct __DRImesaCoreExtensionRec mesaCoreExtension = {
|
|
- .base = { __DRI_MESA, 1 },
|
|
+ .base = { __DRI_MESA, 2 },
|
|
.version_string = MESA_INTERFACE_VERSION_STRING,
|
|
.createNewScreen = driCreateNewScreen2,
|
|
.createContext = driCreateContextAttribs,
|
|
.initScreen = dri2_init_screen,
|
|
.queryCompatibleRenderOnlyDeviceFd = dri_query_compatible_render_only_device_fd,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
|
|
/* This is the table of extensions that the loader will dlsym() for. */
|
|
@@ -2503,11 +2504,12 @@ const __DRIextension *galliumdrm_driver_
|
|
};
|
|
|
|
static const struct __DRImesaCoreExtensionRec swkmsMesaCoreExtension = {
|
|
- .base = { __DRI_MESA, 1 },
|
|
+ .base = { __DRI_MESA, 2 },
|
|
.version_string = MESA_INTERFACE_VERSION_STRING,
|
|
.createNewScreen = driCreateNewScreen2,
|
|
.createContext = driCreateContextAttribs,
|
|
.initScreen = dri_swrast_kms_init_screen,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
|
|
const __DRIextension *dri_swrast_kms_driver_extensions[] = {
|
|
Index: mesa-24.0.3/src/gallium/frontends/dri/dri_util.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/gallium/frontends/dri/dri_util.c
|
|
+++ mesa-24.0.3/src/gallium/frontends/dri/dri_util.c
|
|
@@ -96,10 +96,10 @@ setupLoaderExtensions(struct dri_screen
|
|
* Display.
|
|
*/
|
|
__DRIscreen *
|
|
-driCreateNewScreen2(int scrn, int fd,
|
|
+driCreateNewScreen3(int scrn, int fd,
|
|
const __DRIextension **loader_extensions,
|
|
const __DRIextension **driver_extensions,
|
|
- const __DRIconfig ***driver_configs, void *data)
|
|
+ const __DRIconfig ***driver_configs, bool implicit, void *data)
|
|
{
|
|
static const __DRIextension *emptyExtensionList[] = { NULL };
|
|
struct dri_screen *screen;
|
|
@@ -172,14 +172,25 @@ driCreateNewScreen2(int scrn, int fd,
|
|
return opaque_dri_screen(screen);
|
|
}
|
|
|
|
+__DRIscreen *
|
|
+driCreateNewScreen2(int scrn, int fd,
|
|
+ const __DRIextension **loader_extensions,
|
|
+ const __DRIextension **driver_extensions,
|
|
+ const __DRIconfig ***driver_configs, void *data)
|
|
+{
|
|
+ return driCreateNewScreen3(scrn, fd, loader_extensions,
|
|
+ driver_extensions,
|
|
+ driver_configs, false, data);
|
|
+}
|
|
+
|
|
static __DRIscreen *
|
|
dri2CreateNewScreen(int scrn, int fd,
|
|
const __DRIextension **extensions,
|
|
const __DRIconfig ***driver_configs, void *data)
|
|
{
|
|
- return driCreateNewScreen2(scrn, fd, extensions,
|
|
+ return driCreateNewScreen3(scrn, fd, extensions,
|
|
galliumdrm_driver_extensions,
|
|
- driver_configs, data);
|
|
+ driver_configs, false, data);
|
|
}
|
|
|
|
static __DRIscreen *
|
|
@@ -187,9 +198,9 @@ swkmsCreateNewScreen(int scrn, int fd,
|
|
const __DRIextension **extensions,
|
|
const __DRIconfig ***driver_configs, void *data)
|
|
{
|
|
- return driCreateNewScreen2(scrn, fd, extensions,
|
|
+ return driCreateNewScreen3(scrn, fd, extensions,
|
|
dri_swrast_kms_driver_extensions,
|
|
- driver_configs, data);
|
|
+ driver_configs, false, data);
|
|
}
|
|
|
|
/** swrast driver createNewScreen entrypoint. */
|
|
@@ -197,9 +208,9 @@ static __DRIscreen *
|
|
driSWRastCreateNewScreen(int scrn, const __DRIextension **extensions,
|
|
const __DRIconfig ***driver_configs, void *data)
|
|
{
|
|
- return driCreateNewScreen2(scrn, -1, extensions,
|
|
+ return driCreateNewScreen3(scrn, -1, extensions,
|
|
galliumsw_driver_extensions,
|
|
- driver_configs, data);
|
|
+ driver_configs, false, data);
|
|
}
|
|
|
|
static __DRIscreen *
|
|
@@ -207,8 +218,17 @@ driSWRastCreateNewScreen2(int scrn, cons
|
|
const __DRIextension **driver_extensions,
|
|
const __DRIconfig ***driver_configs, void *data)
|
|
{
|
|
- return driCreateNewScreen2(scrn, -1, extensions, driver_extensions,
|
|
- driver_configs, data);
|
|
+ return driCreateNewScreen3(scrn, -1, extensions, driver_extensions,
|
|
+ driver_configs, false, data);
|
|
+}
|
|
+
|
|
+static __DRIscreen *
|
|
+driSWRastCreateNewScreen3(int scrn, const __DRIextension **extensions,
|
|
+ const __DRIextension **driver_extensions,
|
|
+ const __DRIconfig ***driver_configs, bool implicit, void *data)
|
|
+{
|
|
+ return driCreateNewScreen3(scrn, -1, extensions, driver_extensions,
|
|
+ driver_configs, implicit, data);
|
|
}
|
|
|
|
/**
|
|
@@ -878,7 +898,7 @@ const __DRIcoreExtension driCoreExtensio
|
|
|
|
/** DRI2 interface */
|
|
const __DRIdri2Extension driDRI2Extension = {
|
|
- .base = { __DRI_DRI2, 4 },
|
|
+ .base = { __DRI_DRI2, 5 },
|
|
|
|
.createNewScreen = dri2CreateNewScreen,
|
|
.createNewDrawable = driCreateNewDrawable,
|
|
@@ -889,10 +909,11 @@ const __DRIdri2Extension driDRI2Extensio
|
|
.releaseBuffer = dri2ReleaseBuffer,
|
|
.createContextAttribs = driCreateContextAttribs,
|
|
.createNewScreen2 = driCreateNewScreen2,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
|
|
const __DRIdri2Extension swkmsDRI2Extension = {
|
|
- .base = { __DRI_DRI2, 4 },
|
|
+ .base = { __DRI_DRI2, 5 },
|
|
|
|
.createNewScreen = swkmsCreateNewScreen,
|
|
.createNewDrawable = driCreateNewDrawable,
|
|
@@ -903,18 +924,20 @@ const __DRIdri2Extension swkmsDRI2Extens
|
|
.releaseBuffer = dri2ReleaseBuffer,
|
|
.createContextAttribs = driCreateContextAttribs,
|
|
.createNewScreen2 = driCreateNewScreen2,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
|
|
#endif
|
|
|
|
const __DRIswrastExtension driSWRastExtension = {
|
|
- .base = { __DRI_SWRAST, 4 },
|
|
+ .base = { __DRI_SWRAST, 5 },
|
|
|
|
.createNewScreen = driSWRastCreateNewScreen,
|
|
.createNewDrawable = driCreateNewDrawable,
|
|
.createNewContextForAPI = driCreateNewContextForAPI,
|
|
.createContextAttribs = driCreateContextAttribs,
|
|
.createNewScreen2 = driSWRastCreateNewScreen2,
|
|
+ .createNewScreen3 = driSWRastCreateNewScreen3,
|
|
};
|
|
|
|
const __DRI2configQueryExtension dri2ConfigQueryExtension = {
|
|
@@ -1117,10 +1140,11 @@ driImageFormatToGLFormat(uint32_t image_
|
|
|
|
/** Image driver interface */
|
|
const __DRIimageDriverExtension driImageDriverExtension = {
|
|
- .base = { __DRI_IMAGE_DRIVER, 1 },
|
|
+ .base = { __DRI_IMAGE_DRIVER, 2 },
|
|
|
|
.createNewScreen2 = driCreateNewScreen2,
|
|
.createNewDrawable = driCreateNewDrawable,
|
|
.getAPIMask = driGetAPIMask,
|
|
.createContextAttribs = driCreateContextAttribs,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
Index: mesa-24.0.3/src/gallium/frontends/dri/dri_util.h
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/gallium/frontends/dri/dri_util.h
|
|
+++ mesa-24.0.3/src/gallium/frontends/dri/dri_util.h
|
|
@@ -104,6 +104,11 @@ struct __DriverContextConfig {
|
|
#define __DRIVER_CONTEXT_ATTRIB_PROTECTED (1 << 4)
|
|
|
|
__DRIscreen *
|
|
+driCreateNewScreen3(int scrn, int fd,
|
|
+ const __DRIextension **loader_extensions,
|
|
+ const __DRIextension **driver_extensions,
|
|
+ const __DRIconfig ***driver_configs, bool implicit, void *data);
|
|
+__DRIscreen *
|
|
driCreateNewScreen2(int scrn, int fd,
|
|
const __DRIextension **loader_extensions,
|
|
const __DRIextension **driver_extensions,
|
|
Index: mesa-24.0.3/src/gallium/frontends/dri/drisw.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/gallium/frontends/dri/drisw.c
|
|
+++ mesa-24.0.3/src/gallium/frontends/dri/drisw.c
|
|
@@ -616,11 +616,12 @@ const __DRIcopySubBufferExtension driSWC
|
|
};
|
|
|
|
static const struct __DRImesaCoreExtensionRec mesaCoreExtension = {
|
|
- .base = { __DRI_MESA, 1 },
|
|
+ .base = { __DRI_MESA, 2 },
|
|
.version_string = MESA_INTERFACE_VERSION_STRING,
|
|
.createNewScreen = driCreateNewScreen2,
|
|
.createContext = driCreateContextAttribs,
|
|
.initScreen = drisw_init_screen,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
|
|
/* This is the table of extensions that the loader will dlsym() for. */
|
|
Index: mesa-24.0.3/src/gallium/frontends/dri/kopper.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/gallium/frontends/dri/kopper.c
|
|
+++ mesa-24.0.3/src/gallium/frontends/dri/kopper.c
|
|
@@ -963,11 +963,12 @@ const __DRIkopperExtension driKopperExte
|
|
};
|
|
|
|
static const struct __DRImesaCoreExtensionRec mesaCoreExtension = {
|
|
- .base = { __DRI_MESA, 1 },
|
|
+ .base = { __DRI_MESA, 2 },
|
|
.version_string = MESA_INTERFACE_VERSION_STRING,
|
|
.createNewScreen = driCreateNewScreen2,
|
|
.createContext = driCreateContextAttribs,
|
|
.initScreen = kopper_init_screen,
|
|
+ .createNewScreen3 = driCreateNewScreen3,
|
|
};
|
|
|
|
const __DRIextension *galliumvk_driver_extensions[] = {
|
|
Index: mesa-24.0.3/src/gbm/backends/dri/gbm_dri.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/gbm/backends/dri/gbm_dri.c
|
|
+++ mesa-24.0.3/src/gbm/backends/dri/gbm_dri.c
|
|
@@ -250,14 +250,14 @@ static struct dri_extension_match dri_co
|
|
|
|
static struct dri_extension_match gbm_dri_device_extensions[] = {
|
|
{ __DRI_CORE, 1, offsetof(struct gbm_dri_device, core), false },
|
|
- { __DRI_MESA, 1, offsetof(struct gbm_dri_device, mesa), false },
|
|
- { __DRI_IMAGE_DRIVER, 1, offsetof(struct gbm_dri_device, image_driver), false },
|
|
+ { __DRI_MESA, 2, offsetof(struct gbm_dri_device, mesa), false },
|
|
+ { __DRI_IMAGE_DRIVER, 2, offsetof(struct gbm_dri_device, image_driver), false },
|
|
};
|
|
|
|
static struct dri_extension_match gbm_swrast_device_extensions[] = {
|
|
{ __DRI_CORE, 1, offsetof(struct gbm_dri_device, core), false },
|
|
- { __DRI_MESA, 1, offsetof(struct gbm_dri_device, mesa), false },
|
|
- { __DRI_SWRAST, 4, offsetof(struct gbm_dri_device, swrast), false },
|
|
+ { __DRI_MESA, 2, offsetof(struct gbm_dri_device, mesa), false },
|
|
+ { __DRI_SWRAST, 5, offsetof(struct gbm_dri_device, swrast), false },
|
|
{ __DRI_KOPPER, 1, offsetof(struct gbm_dri_device, kopper), true },
|
|
};
|
|
|
|
@@ -315,10 +315,10 @@ dri_screen_create_for_driver(struct gbm_
|
|
|
|
dri->driver_extensions = extensions;
|
|
dri->loader_extensions = gbm_dri_screen_extensions;
|
|
- dri->screen = dri->mesa->createNewScreen(0, swrast ? -1 : dri->base.v0.fd,
|
|
- dri->loader_extensions,
|
|
- dri->driver_extensions,
|
|
- &dri->driver_configs, dri);
|
|
+ dri->screen = dri->mesa->createNewScreen3(0, swrast ? -1 : dri->base.v0.fd,
|
|
+ dri->loader_extensions,
|
|
+ dri->driver_extensions,
|
|
+ &dri->driver_configs, false, dri);
|
|
if (dri->screen == NULL)
|
|
goto close_driver;
|
|
|
|
Index: mesa-24.0.3/src/glx/dri2_glx.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/glx/dri2_glx.c
|
|
+++ mesa-24.0.3/src/glx/dri2_glx.c
|
|
@@ -1064,17 +1064,17 @@ dri2CreateScreen(int screen, struct glx_
|
|
|
|
static const struct dri_extension_match exts[] = {
|
|
{ __DRI_CORE, 1, offsetof(struct dri2_screen, core), false },
|
|
- { __DRI_DRI2, 4, offsetof(struct dri2_screen, dri2), false },
|
|
- { __DRI_MESA, 1, offsetof(struct dri2_screen, mesa), false },
|
|
+ { __DRI_DRI2, 5, offsetof(struct dri2_screen, dri2), false },
|
|
+ { __DRI_MESA, 2, offsetof(struct dri2_screen, mesa), false },
|
|
};
|
|
if (!loader_bind_extensions(psc, exts, ARRAY_SIZE(exts), extensions))
|
|
goto handle_error;
|
|
|
|
psc->driScreen =
|
|
- psc->dri2->createNewScreen2(screen, psc->fd,
|
|
+ psc->dri2->createNewScreen3(screen, psc->fd,
|
|
(const __DRIextension **)&pdp->loader_extensions[0],
|
|
extensions,
|
|
- &driver_configs, psc);
|
|
+ &driver_configs, implicit, psc);
|
|
|
|
if (psc->driScreen == NULL) {
|
|
ErrorMessageF("glx: failed to create dri2 screen\n");
|
|
Index: mesa-24.0.3/src/glx/dri3_glx.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/glx/dri3_glx.c
|
|
+++ mesa-24.0.3/src/glx/dri3_glx.c
|
|
@@ -841,8 +841,8 @@ dri3_create_screen(int screen, struct gl
|
|
|
|
static const struct dri_extension_match exts[] = {
|
|
{ __DRI_CORE, 1, offsetof(struct dri3_screen, core), false },
|
|
- { __DRI_IMAGE_DRIVER, 1, offsetof(struct dri3_screen, image_driver), false },
|
|
- { __DRI_MESA, 1, offsetof(struct dri3_screen, mesa), false },
|
|
+ { __DRI_IMAGE_DRIVER, 2, offsetof(struct dri3_screen, image_driver), false },
|
|
+ { __DRI_MESA, 2, offsetof(struct dri3_screen, mesa), false },
|
|
};
|
|
if (!loader_bind_extensions(psc, exts, ARRAY_SIZE(exts), extensions))
|
|
goto handle_error;
|
|
@@ -858,10 +858,10 @@ dri3_create_screen(int screen, struct gl
|
|
*/
|
|
if (strcmp(driverName, driverNameDisplayGPU) == 0) {
|
|
psc->driScreenDisplayGPU =
|
|
- psc->image_driver->createNewScreen2(screen, psc->fd_display_gpu,
|
|
+ psc->image_driver->createNewScreen3(screen, psc->fd_display_gpu,
|
|
pdp->loader_extensions,
|
|
extensions,
|
|
- &driver_configs, psc);
|
|
+ &driver_configs, implicit, psc);
|
|
}
|
|
|
|
free(driverNameDisplayGPU);
|
|
@@ -869,10 +869,10 @@ dri3_create_screen(int screen, struct gl
|
|
}
|
|
|
|
psc->driScreenRenderGPU =
|
|
- psc->image_driver->createNewScreen2(screen, psc->fd_render_gpu,
|
|
+ psc->image_driver->createNewScreen3(screen, psc->fd_render_gpu,
|
|
pdp->loader_extensions,
|
|
extensions,
|
|
- &driver_configs, psc);
|
|
+ &driver_configs, implicit, psc);
|
|
|
|
if (psc->driScreenRenderGPU == NULL) {
|
|
ErrorMessageF("glx: failed to create dri3 screen\n");
|
|
Index: mesa-24.0.3/src/glx/drisw_glx.c
|
|
===================================================================
|
|
--- mesa-24.0.3.orig/src/glx/drisw_glx.c
|
|
+++ mesa-24.0.3/src/glx/drisw_glx.c
|
|
@@ -934,7 +934,7 @@ kopperGetSwapInterval(__GLXDRIdrawable *
|
|
|
|
static struct glx_screen *
|
|
driswCreateScreenDriver(int screen, struct glx_display *priv,
|
|
- const char *driver)
|
|
+ const char *driver, bool implicit)
|
|
{
|
|
__GLXDRIscreen *psp;
|
|
const __DRIconfig **driver_configs;
|
|
@@ -967,18 +967,18 @@ driswCreateScreenDriver(int screen, stru
|
|
|
|
static const struct dri_extension_match exts[] = {
|
|
{ __DRI_CORE, 1, offsetof(struct drisw_screen, core), false },
|
|
- { __DRI_SWRAST, 4, offsetof(struct drisw_screen, swrast), false },
|
|
+ { __DRI_SWRAST, 5, offsetof(struct drisw_screen, swrast), false },
|
|
{ __DRI_KOPPER, 1, offsetof(struct drisw_screen, kopper), true },
|
|
{ __DRI_COPY_SUB_BUFFER, 1, offsetof(struct drisw_screen, copySubBuffer), true },
|
|
- { __DRI_MESA, 1, offsetof(struct drisw_screen, mesa), false },
|
|
+ { __DRI_MESA, 2, offsetof(struct drisw_screen, mesa), false },
|
|
};
|
|
if (!loader_bind_extensions(psc, exts, ARRAY_SIZE(exts), extensions))
|
|
goto handle_error;
|
|
|
|
psc->driScreen =
|
|
- psc->swrast->createNewScreen2(screen, loader_extensions_local,
|
|
+ psc->swrast->createNewScreen3(screen, loader_extensions_local,
|
|
extensions,
|
|
- &driver_configs, psc);
|
|
+ &driver_configs, implicit, psc);
|
|
if (psc->driScreen == NULL) {
|
|
ErrorMessageF("glx: failed to create drisw screen\n");
|
|
goto handle_error;
|
|
@@ -1059,10 +1059,10 @@ driswCreateScreen(int screen, struct glx
|
|
{
|
|
const struct drisw_display *pdpyp = (struct drisw_display *)priv->driswDisplay;
|
|
if (pdpyp->zink && !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false)) {
|
|
- return driswCreateScreenDriver(screen, priv, "zink");
|
|
+ return driswCreateScreenDriver(screen, priv, "zink", implicit);
|
|
}
|
|
|
|
- return driswCreateScreenDriver(screen, priv, "swrast");
|
|
+ return driswCreateScreenDriver(screen, priv, "swrast", implicit);
|
|
}
|
|
|
|
/* Called from __glXFreeDisplayPrivate.
|