[PATCH v2 2/4] winex11: Add DriverVersion registry property to display adapters.

Matteo Bruni matteo.mystral at gmail.com
Tue Oct 13 04:04:07 CDT 2020


On Mon, Oct 5, 2020 at 12:57 PM Henri Verbeet <hverbeet at gmail.com> wrote:
>
> On Mon, 5 Oct 2020 at 08:28, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
> > On 10/1/20 5:01 PM, Matteo Bruni wrote:
> > > Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
> > > ---
> > > I picked the more or less current version of the AMD driver for the
> > > time being.
> > >
> > > I think we should eventually move wined3d's GPU driver detection and
> > > override stuff to the display drivers (TBD how to share the code
> > > between the different drivers) so that everything has the same
> > > consistent view.
> > Hi Matteo,
> >
> > I would prefer making the move now. There are other bugs that rely on this as well.
> > For example, some games need a consistent GPU name in DXGI and SetupAPI.
> > As to how to share the code, what about something like a include/wine/wine_gpu_db.h header?
> > I am thinking keeping the existing GPU detection code in wined3d there and only move the PCI ID
> > related tables to wine_gpu_db.h. What do you think?
> >
> That's probably decent enough for a start, but note that ideally we'd
> be able to update GPU information independently from the source code.
> I.e., in the long term it may make more sense to move the GPU
> information DB to e.g. the registry.

Sounds okay to me as well.
My main concern with centralizing the GPU detection stuff is that, at
the moment, wined3d allows overriding the advertised GPU [*] but,
obviously, the display driver knows nothing about that. Also wined3d
has some complex GPU detection code for both GL and Vulkan, while
winex11 has recently got a VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2
path to basically gather the same info. That's a bit of code
duplication at best and a potential source of trouble at worst.
It feels like, eventually, the whole GPU detection / info gathering
should be handled by the display driver. I guess the code could reside
in wined3d, although something will need to be reworked (e.g. to avoid
a loop like "display driver initialization" -> "wined3d GPU detection"
-> "create a WGL / Vulkan context on a win32 window" -> "display
driver initialization"). But that's a possible longer term plan.
Creating a shared GPU info DB seems like a good first step.

[*]: Overriding the GPU is a bit of a hack but, unfortunately, one
that we'll need to have around for the foreseeable future to support a
number of games.



More information about the wine-devel mailing list