Some applications (e.g. UE4) requires the DriverVersion string in the registry. The string is taken from `dlls/wbemprox/builtin.c`
-- v4: win32u: Add DriverVersion string for GPUs to registry
From: Michael Skorokhodov mykhailo.skorokhodov@globallogic.com
Some applications (e.g. UE4) requires the DriverVersion string in the registry.
Signed-off-by: Mykhailo Skorokhodov mykhailo.skorokhodov@globallogic.com --- dlls/win32u/sysparams.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 233e5bb934b..41bb9218b70 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1230,6 +1230,8 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) static const WCHAR ramdacW[] = {'I','n','t','e','r','g','r','a','t','e','d',' ','R','A','M','D','A','C',0}; static const WCHAR driver_dateW[] = {'D','r','i','v','e','r','D','a','t','e',0}; + static const WCHAR driver_versionW[] = + {'D','r','i','v','e','r','V','e','r','s','i','o','n',0};
TRACE( "%s %04X %04X %08X %02X\n", debugstr_w(gpu->name), gpu->vendor_id, gpu->device_id, gpu->subsys_id, gpu->revision_id ); @@ -1374,6 +1376,30 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) set_reg_value( hkey, chip_typeW, REG_BINARY, desc, size ); set_reg_value( hkey, dac_typeW, REG_BINARY, ramdacW, sizeof(ramdacW) );
+ if (gpu->vendor_id && gpu->device_id) + { + switch (gpu->vendor_id) + { + /* Intel */ + case 0x8086: + sprintf(buffer, "31.0.101.4576"); + break; + /* AMD */ + case 0x1002: + sprintf(buffer, "31.0.14051.5006"); + break; + /* Nvidia */ + case 0x10de: + sprintf(buffer, "31.0.15.3625"); + break; + default: + /* Default value for any other vendor */ + sprintf(buffer, "31.0.10.1000"); + break; + } + set_reg_value( hkey, driver_versionW, REG_SZ, bufferW, asciiz_to_unicode( bufferW, buffer )); + } + NtClose( hkey );
link_device( ctx->gpuid, guid_devinterface_display_adapterW );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=135305
Your paranoid android.
=== debian11b (64 bit WoW report) ===
ntdll: exception.c:3256: Test failed: B0 flag is not set in Dr6 exception.c:3257: Test failed: BS flag is set in Dr6
Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
sprintf(buffer, "31.0.101.4576");
break;
/* AMD */
case 0x1002:
sprintf(buffer, "31.0.14051.5006");
break;
/* Nvidia */
case 0x10de:
sprintf(buffer, "31.0.15.3625");
break;
default:
/* Default value for any other vendor */
sprintf(buffer, "31.0.10.1000");
break;
}
set_reg_value( hkey, driver_versionW, REG_SZ, bufferW, asciiz_to_unicode( bufferW, buffer ));
Don't forget to add a space before the last parenthesis bracket.
Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
switch (gpu->vendor_id)
{
/* Intel */
case 0x8086:
sprintf(buffer, "31.0.101.4576");
break;
/* AMD */
case 0x1002:
sprintf(buffer, "31.0.14051.5006");
break;
/* Nvidia */
case 0x10de:
sprintf(buffer, "31.0.15.3625");
break;
default:
/* Default value for any other vendor */
Put the comment on top of default.
Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
set_reg_value( hkey, chip_typeW, REG_BINARY, desc, size ); set_reg_value( hkey, dac_typeW, REG_BINARY, ramdacW, sizeof(ramdacW) );
- if (gpu->vendor_id && gpu->device_id)
- {
switch (gpu->vendor_id)
{
/* Intel */
case 0x8086:
sprintf(buffer, "31.0.101.4576");
break;
/* AMD */
case 0x1002:
sprintf(buffer, "31.0.14051.5006");
Are you sure that all these versions of different vendors have versions like 31.*.*.*?
On Fri Jul 28 02:59:09 2023 +0000, Zhiyi Zhang wrote:
Are you sure that all these versions of different vendors have versions like 31.*.*.*?
Yeah. "31" is the WDDM version. All the latest GPU drivers (even on Windows 10) have this. The second value is unused. The third and the last are build numbers.