If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I encourage you to read also the comments below the videos on youtube.
"Here is a new demonstration (see in full HD) of prime support on Wayland.
I added an additional way of setting the graphic device to use besides setting DRI_PRIME.
The drirc config file can be used to configure which graphic device to use for every application.
When loading egl (egl_dri2, egl_gallium doesn't support choosing which graphic device to use yet), it tests if DRI_PRIME is set, and if the application has an option to set which device to use in drirc. This way to use drirc is not the canonical way, since drirc is usually read when initializing the driver of a graphic device and when creating the context. Thus this experimental option might be refused by Mesa maintainers. I think however having such a way to configure which graphic devices to use would be very handy for users.
The id would be 0 for the device that composites and 1,2,.. for the others (generally 1). Additionnaly each device would have a second id, dependents of its bus ID: that would allow to keep choosing the same gpu if we switch the gpu that composites (feature that is not supported yet, but that should be)
For those who wonder how to support a battery mode/AC mode, that could be done by a script that erase drirc by a special drirc for battery mode or AC mode when needed.
To sum up the status of my patch:
. Advertising multiple graphic devices in wl_drm and connecting to a special one
. Setting no tiling when the texture buffer need to be shared
Done, but would have to be changed when publishing the patch:
. Exporting prime buffers on non intel cards (I don't use the best way right now. RAOF has written a beginning of the correct implementation needed here, but it hasn't been merged yet)
. Importing prime buffers on non-intel cards (same comment than above)
. Find why egl_gallium doesn't clean properly when we try to use it, and then load egl_dri2 with the dedicated device.
. Add a way for the Wayland compositor to add devices to advertise (this is done automatically right now, but in future, the compositor would have to do it manually to allow VT_switching and using the dedicated device on other wl_displays). There would probably need an EGL extension here."
Yes. What are your thoughts about using drirc for choosing the graphic card to run?
hmm looks like it will work out on Wayland (Needs some R&D) as for Xorg you was luckly to get any thing working?
drirc has been used this way for many years as a Hack but it works we can develop a new way of doing things but it will be on the kernel side i think this really needs a lot of R&D to get true support this is just the start and it looks like it may work out on Wayland