On 31 July 2018 at 14:35, Michel Dänzer <mic...@daenzer.net> wrote: > On 2018-07-31 10:03 AM, Yu, Qiang wrote: >> >> Seems the mesa driconf infrastructure is just what I need: >> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/ >> >> So I can reference the loader_get_dri_config_device_id implementation >> for adding loader driver override functionality in /etc/drirc: >> <driconf> >> <device driver="loader"> >> <option name="amdgpu" value="amdgpu" /> >> </device> >> </driconf> >> >> Thoughts? > > Using the driconf infrastructure is definitely better than creating a > new mechanism. It'll even allow configuring the driver per application. :) > > Grepping for device_id in src/util/xmlpool/t_options.h and > src/loader/loader.c might be useful. > > Here's an example of how I imagine general and per-application driver > configuration could work: > > <driconf> > <device kernel_driver="amdgpu"> > > <!-- Use radeonsi by default --> > <option name="dri_driver" value="radeonsi" /> > > <!-- Use amdgpu for a specific application --> > <application executable="fgl_glxgears"> > <option name="dri_driver" value="amdgpu" /> > </application> > > </device> > </driconf> > Good suggestion Michel, I love it. I'm a fan of the full names - kernel_driver/dri_driver. There's plenty of inconsistencies in Mesa when using the shorthand "driver".
Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev