diff options
author | Eric Anholt <[email protected]> | 2018-11-15 13:54:49 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-11-16 17:49:17 -0800 |
commit | d971a4230d54069c996bca78b6ed6a6a23377821 (patch) | |
tree | 2d9c29c0c0df5405a0bad5b2c7860bcc614069a2 /src/loader/loader.h | |
parent | cc198157382a988590b0288d287281139c5f73e6 (diff) |
loader: Factor out the common driver opening logic from each loader.
I copied the code from egl_dri2.c, but the functionality was equivalent
between all the loaders other than their particular environment variables.
v2: Drop the logging function equivalent to loader_default_logger()
(requested by Eric, Emil). Move the SCons workaround across. Drop
the now-unused driGetDriverExtensions() declaration that was lost in a
rebase.
Reviewed-by: Eric Engestrom <[email protected]> (v1)
Reviewed-by: Emil Velikov <[email protected]> (v1)
Diffstat (limited to 'src/loader/loader.h')
-rw-r--r-- | src/loader/loader.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/loader/loader.h b/src/loader/loader.h index 7b4dd01144f..779ec44b75d 100644 --- a/src/loader/loader.h +++ b/src/loader/loader.h @@ -33,6 +33,8 @@ extern "C" { #endif +struct __DRIextensionRec; + /* Helpers to figure out driver and device name, eg. from pci-id, etc. */ int @@ -47,6 +49,11 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id); char * loader_get_driver_for_fd(int fd); +const struct __DRIextensionRec ** +loader_open_driver(const char *driver_name, + void **out_driver_handle, + const char **search_path_vars); + char * loader_get_device_name_for_fd(int fd); |