[Mesa-dev] Question about display_gpu and render gpu in dri3_create_screen

Michel Dänzer michel at daenzer.net
Mon Sep 13 12:57:09 UTC 2021

On 2021-09-13 14:40, Luc Ma wrote:
> Hello,
> I recently tried multi-GPU support on the mesa gallium drivers(glx=dri). When I exported the env `DRI_PRIME=1`, I found that it didn't work with two different drivers loaded at the same time.
> because there are different driver names in my case. display_gpu driver name is "r600" while render_gpu driver name is "nouveau". It failed to create display gpu screen
> if (strcmp(driverName, driverNameDisplayGPU) == 0) {
>             psc->driScreenDisplayGPU =
>                psc->image_driver->createNewScreen2(screen, psc->fd_display_gpu,
>                                                    pdp->loader_extensions,
>                                                    extensions,
>                                                    &driver_configs, psc);
> }
> so I am wondering
> - is it possible to use two GPUs from different vendors on a system with gallium? one is for display, another for rendering
> - is it possible to use two GPUs driven by a shared driver(say both "r600") on a system?

Both should work.

Did you hit a problem other than psc->driScreenDisplayGPU related code being skipped (as is expected ATM with different drivers)?

Earthling Michel Dänzer               |               https://redhat.com
Libre software enthusiast             |             Mesa and X developer

More information about the mesa-dev mailing list