X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fpipe-loader%2Fpipe_loader.h;h=b50114310b4a43e58658adf2e2633e4dda9e22f7;hb=cf170616daa6e1a4545c2bbfd35c9b857fdcf2f6;hp=9b8712666bb4433c1101d65284a6bcc155c39d7f;hpb=132031b110a9fd652f3c9d5727502134ef9c22c1;p=mesa.git diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h index 9b8712666bb..b50114310b4 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h @@ -35,6 +35,7 @@ #include "pipe/p_compiler.h" #include "state_tracker/drm_driver.h" +#include "util/xmlconfig.h" #ifdef __cplusplus extern "C" { @@ -65,6 +66,9 @@ struct pipe_loader_device { char *driver_name; const struct pipe_loader_ops *ops; + + driOptionCache option_cache; + driOptionCache option_info; }; /** @@ -82,13 +86,9 @@ pipe_loader_probe(struct pipe_loader_device **devs, int ndev); * Create a pipe_screen for the specified device. * * \param dev Device the screen will be created for. - * \param library_paths Colon-separated list of filesystem paths that - * will be used to look for the pipe driver - * module that handles this device. */ struct pipe_screen * -pipe_loader_create_screen(struct pipe_loader_device *dev, - const char *library_paths); +pipe_loader_create_screen(struct pipe_loader_device *dev); /** * Query the configuration parameters for the specified device. @@ -100,6 +100,24 @@ const struct drm_conf_ret * pipe_loader_configuration(struct pipe_loader_device *dev, enum drm_conf conf); +/** + * Ensure that dev->option_cache is initialized appropriately for the driver. + * + * This function can be called multiple times. + * + * \param dev Device for which options should be loaded. + */ +void +pipe_loader_load_options(struct pipe_loader_device *dev); + +/** + * Get the driinfo XML string used by the given driver. + * + * The returned string is heap-allocated. + */ +char * +pipe_loader_get_driinfo_xml(const char *driver_name); + /** * Release resources allocated for a list of devices. * @@ -112,8 +130,6 @@ pipe_loader_configuration(struct pipe_loader_device *dev, void pipe_loader_release(struct pipe_loader_device **devs, int ndev); -#ifdef HAVE_PIPE_LOADER_DRI - /** * Initialize sw dri device give the drisw_loader_funcs. * @@ -125,7 +141,15 @@ bool pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, struct drisw_loader_funcs *drisw_lf); -#endif +/** + * Initialize a kms backed sw device given an fd. + * + * This function is platform-specific. + * + * \sa pipe_loader_probe + */ +bool +pipe_loader_sw_probe_kms(struct pipe_loader_device **devs, int fd); /** * Initialize a null sw device. @@ -158,8 +182,6 @@ boolean pipe_loader_sw_probe_wrapped(struct pipe_loader_device **dev, struct pipe_screen *screen); -#ifdef HAVE_PIPE_LOADER_DRM - /** * Get a list of known DRM devices. * @@ -180,7 +202,15 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev); bool pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd); -#endif +/** + * Get the driinfo XML used for the DRM driver of the given name, if any. + * + * The returned string is heap-allocated. + */ +char * +pipe_loader_drm_get_driinfo_xml(const char *driver_name); + +extern const char gallium_driinfo_xml[]; #ifdef __cplusplus }