diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index db44eede651..8a413daf043 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -89,9 +89,10 @@ setupLoaderExtensions(__DRIscreen *psp, * Display. */ static __DRIscreen * -dri2CreateNewScreen(int scrn, int fd, - const __DRIextension **extensions, - const __DRIconfig ***driver_configs, void *data) +dri2CreateNewScreen2(int scrn, int fd, + const __DRIextension **extensions, + const __DRIextension **driver_extensions, + const __DRIconfig ***driver_configs, void *data) { static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; @@ -154,12 +155,31 @@ dri2CreateNewScreen(int scrn, int fd, return psp; } +static __DRIscreen * +dri2CreateNewScreen(int scrn, int fd, + const __DRIextension **extensions, + const __DRIconfig ***driver_configs, void *data) +{ + return dri2CreateNewScreen2(scrn, fd, extensions, NULL, + driver_configs, data); +} + /** swrast driver createNewScreen entrypoint. */ static __DRIscreen * -driCreateNewScreen(int scrn, const __DRIextension **extensions, - const __DRIconfig ***driver_configs, void *data) +driSWRastCreateNewScreen(int scrn, const __DRIextension **extensions, + const __DRIconfig ***driver_configs, void *data) +{ + return dri2CreateNewScreen2(scrn, -1, extensions, NULL, + driver_configs, data); +} + +static __DRIscreen * +driSWRastCreateNewScreen2(int scrn, const __DRIextension **extensions, + const __DRIextension **driver_extensions, + const __DRIconfig ***driver_configs, void *data) { - return dri2CreateNewScreen(scrn, -1, extensions, driver_configs, data); + return dri2CreateNewScreen2(scrn, -1, extensions, driver_extensions, + driver_configs, data); } /** @@ -688,7 +708,7 @@ const __DRIcoreExtension driCoreExtension = { /** DRI2 interface */ const __DRIdri2Extension driDRI2Extension = { - .base = { __DRI_DRI2, 3 }, + .base = { __DRI_DRI2, 4 }, .createNewScreen = dri2CreateNewScreen, .createNewDrawable = dri2CreateNewDrawable, @@ -697,15 +717,17 @@ const __DRIdri2Extension driDRI2Extension = { .createNewContextForAPI = dri2CreateNewContextForAPI, .allocateBuffer = dri2AllocateBuffer, .releaseBuffer = dri2ReleaseBuffer, - .createContextAttribs = dri2CreateContextAttribs + .createContextAttribs = dri2CreateContextAttribs, + .createNewScreen2 = dri2CreateNewScreen2, }; const __DRIswrastExtension driSWRastExtension = { - { __DRI_SWRAST, __DRI_SWRAST_VERSION }, - driCreateNewScreen, + { __DRI_SWRAST, 4 }, + driSWRastCreateNewScreen, dri2CreateNewDrawable, dri2CreateNewContextForAPI, - dri2CreateContextAttribs + dri2CreateContextAttribs, + driSWRastCreateNewScreen2, }; const __DRI2configQueryExtension dri2ConfigQueryExtension = { |