[PATCH v2 2/4] winex11: Add DriverVersion registry property to display adapters.
Zhiyi Zhang
zzhang at codeweavers.com
Sun Oct 4 23:22:53 CDT 2020
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?
Thanks,
Zhiyi
>
> dlls/winex11.drv/display.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
> index cf55a5c1fb67..918339b05f31 100644
> --- a/dlls/winex11.drv/display.c
> +++ b/dlls/winex11.drv/display.c
> @@ -53,6 +53,7 @@ DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4ab
> static const WCHAR driver_date_dataW[] = {'D','r','i','v','e','r','D','a','t','e','D','a','t','a',0};
> static const WCHAR driver_dateW[] = {'D','r','i','v','e','r','D','a','t','e',0};
> static const WCHAR driver_descW[] = {'D','r','i','v','e','r','D','e','s','c',0};
> +static const WCHAR driver_versionW[] = {'D','r','i','v','e','r','V','e','r','s','i','o','n',0};
> static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
> static const WCHAR pciW[] = {'P','C','I',0};
> static const WCHAR video_idW[] = {'V','i','d','e','o','I','D',0};
> @@ -109,6 +110,7 @@ static const WCHAR monitor_hardware_idW[] = {
> 'M','O','N','I','T','O','R','\\',
> 'D','e','f','a','u','l','t','_','M','o','n','i','t','o','r',0,0};
> static const WCHAR driver_date_fmtW[] = {'%','u','-','%','u','-','%','u',0};
> +static const WCHAR driver_version_fallbackW[] ={'2','6','.','2','0','.','1','5','0','0','2','.','6','1',0};
>
> static struct x11drv_display_device_handler host_handler;
> struct x11drv_display_device_handler desktop_handler;
> @@ -476,6 +478,10 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g
> if (RegSetValueExW(hkey, driver_dateW, 0, REG_SZ, (BYTE *)bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)))
> goto done;
>
> + if (RegSetValueExW(hkey, driver_versionW, 0, REG_SZ, (const BYTE *)driver_version_fallbackW,
> + sizeof(driver_version_fallbackW)))
> + goto done;
> +
> RegCloseKey(hkey);
>
> /* Retrieve driver value for adapters */
More information about the wine-devel
mailing list