[Bug 40803] Hard Reset Redux fails to launch (" DirectX 10 device not found!")(DXGI_ADAPTER_DESC1 'DedicatedSystemMemory' or 'SharedSystemMemory' member must be non-null)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Oct 14 19:06:34 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=40803

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
     Ever confirmed|0                           |1
            Summary|Hard Reset Redux fails to   |Hard Reset Redux fails to
                   |launch ("DirectX 10 device  |launch ("DirectX 10 device
                   |not found!")                |not
                   |                            |found!")(DXGI_ADAPTER_DESC1
                   |                            |'DedicatedSystemMemory' or
                   |                            |'SharedSystemMemory' member
                   |                            |must be non-null)
             Status|UNCONFIRMED                 |NEW
          Component|-unknown                    |directx-d3d

--- Comment #19 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

found a distributed "backup", confirming.

--- snip ---
$ pwd
/home/focht/.wine/drive_c/GOG Games/Hard Reset Redux

$  WINEDEBUG=+seh,+loaddll,+process,+dxgi,+d3d,+d3d11,+msgbox wine
./hr.Win32.exe >>log.txt 2>&1
...
<same as other logs attached to ticket>
--- snip ---

Took some hours to debug that out as the game copies adapter values/caps/limits
around in internal data structures, without preserving original data structure
which makes it harder to track what kind of value corresponds to which
adapter/driver value. Even worse when various values are zero.

The game gfx engine init code does various checks on adapter/driver caps to
validate the system is really able to run the game. The culprits are
'DedicatedSystemMemory' and 'SharedSystemMemory' members of
'DXGI_ADAPTER_DESC1' structure. At least one of them has to be non-null,
otherwise it game will terminate with that error message.

Wine source:

https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/dxgi/adapter.c#l149

--- snip ---
 149 static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc1(IWineDXGIAdapter
*iface, DXGI_ADAPTER_DESC1 *desc)
 150 {
 151     struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface);
 152     struct wined3d_adapter_identifier adapter_id;
 153     char description[128];
 154     HRESULT hr;
 155 
 156     TRACE("iface %p, desc %p.\n", iface, desc);
 157 
 158     if (!desc)
 159         return E_INVALIDARG;
 160 
 161     adapter_id.driver_size = 0;
 162     adapter_id.description = description;
 163     adapter_id.description_size = sizeof(description);
 164     adapter_id.device_name_size = 0;
 165 
 166     wined3d_mutex_lock();
 167     hr = wined3d_get_adapter_identifier(adapter->factory->wined3d,
adapter->ordinal, 0, &adapter_id);
 168     wined3d_mutex_unlock();
 169 
 170     if (FAILED(hr))
 171         return hr;
 172 
 173     if (!MultiByteToWideChar(CP_ACP, 0, description, -1,
desc->Description, 128))
 174     {
 175         DWORD err = GetLastError();
 176         ERR("Failed to translate description %s (%#x).\n",
debugstr_a(description), err);
 177         hr = E_FAIL;
 178     }
 179 
 180     desc->VendorId = adapter_id.vendor_id;
 181     desc->DeviceId = adapter_id.device_id;
 182     desc->SubSysId = adapter_id.subsystem_id;
 183     desc->Revision = adapter_id.revision;
 184     desc->DedicatedVideoMemory = adapter_id.video_memory;
 185     desc->DedicatedSystemMemory = 0; /* FIXME */
 186     desc->SharedSystemMemory = 0; /* FIXME */
 187     desc->AdapterLuid = adapter_id.adapter_luid;
 188     desc->Flags = 0;
 189 
 190     return hr;
 191 }
--- snip ---

Dat FIXME seems legit ;-)

Microsoft Docs:

https://docs.microsoft.com/en-us/windows/desktop/api/dxgi/ns-dxgi-dxgi_adapter_desc1

With that change in place the game starts fine with my dual GPU setup
(Bumblebee) on both GPUs. Tested with 32-bit 'hr.Win32.exe' and 64-bit
'hr.x64.exe'.

--- snip ---
$ optirun glxinfo | grep -i opengl
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 850M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 396.54
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 396.54
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
--- snip ---

--- snip ---
$ glxinfo | grep -i opengl
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
--- snip ---

There is a crash on exit but that's a different issue.

$ sha1sum *
f355e7a8fe0e8478bf3b17f5c35e82e3bc6e0cf1  setup_hard_reset_redux_2.0.0.2-1.bin
6b0137751cd0ef4f5cf18f7789ec05444e842d3d  setup_hard_reset_redux_2.0.0.2-2.bin
e3a7b9a142de3896de82e444bdaf14fdabda276e  setup_hard_reset_redux_2.0.0.2.exe

$ du -shL *
4.0G    setup_hard_reset_redux_2.0.0.2-1.bin
1.3G    setup_hard_reset_redux_2.0.0.2-2.bin
33M    setup_hard_reset_redux_2.0.0.2.exe

$ wine --version
wine-3.18

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list