diff options
author | Emil Velikov <[email protected]> | 2014-06-16 23:30:44 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-07-10 01:06:47 +0100 |
commit | 5b7e43aea89847100b929989c21d23da124d4936 (patch) | |
tree | 60a9d72688f989c730f87c4051250f1102e280a9 /src/gallium/state_trackers/dri | |
parent | 532eb72be3894329eb751813f84882cf82478b8c (diff) |
targets/dri: Add __driDriverGetExtensions_nouveau symbol
The symbol is introduced by the mesa megadrivers, and adding
gallium support for it will allow us to merge st/dri/drm and
st/dri/sw. Resulting in a single dri library across gallium.
v2: Rebase on top of gallium dri3.
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Clark <[email protected]>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
Acked-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h index 2d07f517db6..106dcc3a711 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.h +++ b/src/gallium/state_trackers/dri/common/dri_screen.h @@ -145,6 +145,8 @@ dri_destroy_screen_helper(struct dri_screen * screen); void dri_destroy_screen(__DRIscreen * sPriv); +extern const struct __DriverAPIRec galliumdrm_driver_api; +extern const __DRIextension *galliumdrm_driver_extensions[]; extern const __DRIconfigOptionsExtension gallium_config_options; #endif diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 898fd0ab1f6..1d26522ca96 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -1342,6 +1342,20 @@ const struct __DriverAPIRec driDriverAPI = { .ReleaseBuffer = dri2_release_buffer, }; +const struct __DriverAPIRec galliumdrm_driver_api = { + .InitScreen = dri2_init_screen, + .DestroyScreen = dri_destroy_screen, + .CreateContext = dri_create_context, + .DestroyContext = dri_destroy_context, + .CreateBuffer = dri2_create_buffer, + .DestroyBuffer = dri_destroy_buffer, + .MakeCurrent = dri_make_current, + .UnbindContext = dri_unbind_context, + + .AllocateBuffer = dri2_allocate_buffer, + .ReleaseBuffer = dri2_release_buffer, +}; + /* This is the table of extensions that the loader will dlsym() for. */ PUBLIC const __DRIextension *__driDriverExtensions[] = { &driCoreExtension.base, @@ -1351,4 +1365,12 @@ PUBLIC const __DRIextension *__driDriverExtensions[] = { NULL }; +const __DRIextension *galliumdrm_driver_extensions[] = { + &driCoreExtension.base, + &driImageDriverExtension.base, + &driDRI2Extension.base, + &gallium_config_options.base, + NULL +}; + /* vim: set sw=3 ts=8 sts=3 expandtab: */ |