dri: Fill in the driver extensions for the legacy createNewScreen paths
The inner routine is going to want access to the driver extensions, but the legacy paths only give you the loader extensions. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15649>
This commit is contained in:
parent
c1dc98ceec
commit
b6f7a4836a
|
@ -42,6 +42,7 @@
|
|||
#include <stdbool.h>
|
||||
#include "dri_util.h"
|
||||
#include "dri_context.h"
|
||||
#include "dri_screen.h"
|
||||
#include "utils.h"
|
||||
#include "util/u_endian.h"
|
||||
#include "util/driconf.h"
|
||||
|
@ -197,8 +198,19 @@ dri2CreateNewScreen(int scrn, int fd,
|
|||
const __DRIextension **extensions,
|
||||
const __DRIconfig ***driver_configs, void *data)
|
||||
{
|
||||
return driCreateNewScreen2(scrn, fd, extensions, NULL,
|
||||
driver_configs, data);
|
||||
return driCreateNewScreen2(scrn, fd, extensions,
|
||||
galliumdrm_driver_extensions,
|
||||
driver_configs, data);
|
||||
}
|
||||
|
||||
static __DRIscreen *
|
||||
swkmsCreateNewScreen(int scrn, int fd,
|
||||
const __DRIextension **extensions,
|
||||
const __DRIconfig ***driver_configs, void *data)
|
||||
{
|
||||
return driCreateNewScreen2(scrn, fd, extensions,
|
||||
dri_kms_driver_extensions,
|
||||
driver_configs, data);
|
||||
}
|
||||
|
||||
/** swrast driver createNewScreen entrypoint. */
|
||||
|
@ -206,8 +218,9 @@ static __DRIscreen *
|
|||
driSWRastCreateNewScreen(int scrn, const __DRIextension **extensions,
|
||||
const __DRIconfig ***driver_configs, void *data)
|
||||
{
|
||||
return driCreateNewScreen2(scrn, -1, extensions, NULL,
|
||||
driver_configs, data);
|
||||
return driCreateNewScreen2(scrn, -1, extensions,
|
||||
galliumsw_driver_extensions,
|
||||
driver_configs, data);
|
||||
}
|
||||
|
||||
static __DRIscreen *
|
||||
|
@ -832,6 +845,20 @@ const __DRIdri2Extension driDRI2Extension = {
|
|||
.createNewScreen2 = driCreateNewScreen2,
|
||||
};
|
||||
|
||||
const __DRIdri2Extension swkmsDRI2Extension = {
|
||||
.base = { __DRI_DRI2, 4 },
|
||||
|
||||
.createNewScreen = swkmsCreateNewScreen,
|
||||
.createNewDrawable = driCreateNewDrawable,
|
||||
.createNewContext = driCreateNewContext,
|
||||
.getAPIMask = driGetAPIMask,
|
||||
.createNewContextForAPI = driCreateNewContextForAPI,
|
||||
.allocateBuffer = dri2AllocateBuffer,
|
||||
.releaseBuffer = dri2ReleaseBuffer,
|
||||
.createContextAttribs = driCreateContextAttribs,
|
||||
.createNewScreen2 = driCreateNewScreen2,
|
||||
};
|
||||
|
||||
const __DRIswrastExtension driSWRastExtension = {
|
||||
.base = { __DRI_SWRAST, 4 },
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ struct gl_context;
|
|||
extern const __DRIcoreExtension driCoreExtension;
|
||||
extern const __DRIswrastExtension driSWRastExtension;
|
||||
extern const __DRIdri2Extension driDRI2Extension;
|
||||
extern const __DRIdri2Extension swkmsDRI2Extension;
|
||||
extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
|
||||
extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
|
||||
extern const __DRI2flushControlExtension dri2FlushControlExtension;
|
||||
|
|
Loading…
Reference in New Issue