iXit / Mesa-3D

Please use official https://gitlab.freedesktop.org/mesa/mesa/ !
https://github.com/iXit/Mesa-3D/wiki
66 stars 13 forks source link

Some Oculus Rift Unity demos hang on startup (PRIME?) #99

Open ChristophHaag opened 9 years ago

ChristophHaag commented 9 years ago

For example, this one: https://share.oculus.com/app/the-rpg-room (perhaps a signup is needed for this website, to download it, but it's free of cost in any way).

No Oculus Rift is needed to start the demo and no other software except wine is needed to run it (there will be obviously no head tracking).

I can only test it with PRIME, so I don't know if it also happens directly.

I simply start it with With wined3d, it starts and displays fine (but spills out some GL errors). The same command with nine d3d9 enabled, hangs before anything is displayed.

This is with nine:

$ WINEDEBUG=+d3dadapter9,+d3d9 DRI_PRIME=1 WINEPREFIX=~/.wine64 wine TheRPGRoom.exe
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
Mono path[0] = 'D:/The_RPG_Room-pc/TheRPGRoom_Data/Managed'
Mono path[1] = 'D:/The_RPG_Room-pc/TheRPGRoom_Data/Mono'
Mono config path = 'D:/The_RPG_Room-pc/TheRPGRoom_Data/Mono/etc'
fixme:imm:ImmReleaseContext (0x1004c, 0x1c2960): stub
fixme:win:EnumDisplayDevicesW ((null),0,0x32f6e8,0x00000000), stub!
fixme:d3d11:D3D11CreateDevice adapter 0x1c8958, driver_type D3D_DRIVER_TYPE_UNKNOWN, swrast (nil), flags 0x1, feature_levels 0x12fe7d0, levels 0x3, sdk_version 7, device 0xe2810c, feature_level 0x32fbb4, context 0xe280d0 stub!
trace:d3d9:Direct3DCreate9 sdk_version 0x20.
fixme:win:EnumDisplayDevicesW ((null),0,0x32f798,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f798,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x32f798,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32f798,0x00000000), stub!
fixme:d3d9:d3dadapter9_new
Native Direct3D 9 is active.
For more information visit https://wiki.ixit.cz/d3d9
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: \\.\DISPLAY1
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6800:1002
fixme:win:EnumDisplayDevicesW ((null),0,0x32f0a8,0x00000000), stub!
fixme:dxgi:dxgi_output_GetDesc iface 0x1d1900, desc 0x32f658 stub!
fixme:wbemprox:client_security_SetBlanket 0xf6d6d6bc, 0x1ccb38, 10, 0, (null), 3, 3, (nil), 0x00000000
fixme:wbemprox:client_security_Release 0xf6d6d6bc
fixme:win:EnumDisplayDevicesW ((null),0,0x32ef68,0x00000000), stub!
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: \\.\DISPLAY1
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6800:1002
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f268,0x00000000), stub!
trace:d3d9:d3dadapter9_AddRef 0x1c5710 increasing refcount to 2.
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x1ccab8), stub!
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x1ccab8), stub!
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:RegisterDeviceNotificationW (hwnd=0x1004c, filter=0x32fc4c,flags=0x00000000) returns a fake device notification handle!
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.

And after that line it hangs.

And this is with wined3d:

$ DRI_PRIME=1 WINEPREFIX=~/.wine64 wine TheRPGRoom.exe
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
Mono path[0] = 'D:/The_RPG_Room-pc/TheRPGRoom_Data/Managed'
Mono path[1] = 'D:/The_RPG_Room-pc/TheRPGRoom_Data/Mono'
Mono config path = 'D:/The_RPG_Room-pc/TheRPGRoom_Data/Mono/etc'
fixme:imm:ImmReleaseContext (0x40054, 0x1c2960): stub
fixme:win:EnumDisplayDevicesW ((null),0,0x32f6e8,0x00000000), stub!
fixme:d3d11:D3D11CreateDevice adapter 0x1c8958, driver_type D3D_DRIVER_TYPE_UNKNOWN, swrast (nil), flags 0x1, feature_levels 0x12fe7d0, levels 0x3, sdk_version 7, device 0xe2810c, feature_level 0x32fbb4, context 0xe280d0 stub!
fixme:d3d9:try_native 
Native Direct3D 9 is disabled.
For more information visit https://wiki.ixit.cz/d3d9
((null),0,0x32f718,0x00000000), stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8X8_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8A8_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8X8_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B10G10R10A2_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B5G6R5_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B5G5R5A1_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B5G5R5X1_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8A8_UNORM, dst_format WINED3DFMT_B5G6R5_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8X8_UNORM, dst_format WINED3DFMT_B5G6R5_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B10G10R10A2_UNORM, dst_format WINED3DFMT_B5G6R5_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B5G6R5_UNORM, dst_format WINED3DFMT_B5G6R5_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B5G5R5A1_UNORM, dst_format WINED3DFMT_B5G6R5_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1ce200, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B5G5R5X1_UNORM, dst_format WINED3DFMT_B5G6R5_UNORM stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x32f0a8,0x00000000), stub!
fixme:dxgi:dxgi_output_GetDesc iface 0x1c5858, desc 0x32f658 stub!
fixme:wbemprox:client_security_SetBlanket 0xf6d4e6bc, 0x1c57c0, 10, 0, (null), 3, 3, (nil), 0x00000000
fixme:wbemprox:client_security_Release 0xf6d4e6bc
fixme:win:EnumDisplayDevicesW ((null),0,0x32ef68,0x00000000), stub!
fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff
fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff
fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff
fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff
fixme:d3d:debug_d3dformat Unrecognized 0x36314644 (as fourcc: DF16) WINED3DFORMAT!
fixme:d3d:wined3d_get_format Can't find format unrecognized (0x36314644) in the format lookup table
fixme:d3d:debug_d3dformat Unrecognized 0x5a574152 (as fourcc: RAWZ) WINED3DFORMAT!
fixme:d3d:wined3d_get_format Can't find format unrecognized (0x5a574152) in the format lookup table
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:RegisterDeviceNotificationW (hwnd=0x40054, filter=0x32fc4c,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
fixme:win:RegisterDeviceNotificationW (hwnd=0x40054, filter=0x32fb8c,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
fixme:win:RegisterDeviceNotificationW (hwnd=0x40054, filter=0x32fc44,flags=0x00000000) returns a fake device notification handle!
fixme:advapi:RegisterEventSourceA ((null),"OculusVR"): stub
fixme:advapi:RegisterEventSourceW (L"",L"OculusVR"): stub
fixme:win:EnumDisplayDevicesW ((null),0,0x32ec30,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32ef78,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x32ef78,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32ec30,0x00000000), stub!

etc.

Some other oculus rift unity applications do work with nine d3d9. Like https://share.oculus.com/app/titans-of-space:

WINEDEBUG=+d3dadapter9,+d3d9 DRI_PRIME=1 WINEPREFIX=~/.wine64 wine TitansOfSpaceV1.70-DK2.exe
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
fixme:system:SetProcessDPIAware stub!
Mono path[0] = 'D:/Titans_of_Space-pc/TitansOfSpaceV1.70-DK2_Data/Managed'
Mono path[1] = 'D:/Titans_of_Space-pc/TitansOfSpaceV1.70-DK2_Data/Mono'
Mono config path = 'D:/Titans_of_Space-pc/TitansOfSpaceV1.70-DK2_Data/Mono/etc'
fixme:win:EnumDisplayDevicesW ((null),0,0x32f498,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f498,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32f498,0x00000000), stub!
fixme:imm:ImmReleaseContext (0x1004c, 0x1c2a70): stub
fixme:win:EnumDisplayDevicesW ((null),0,0x32f6e8,0x00000000), stub!
fixme:d3d11:D3D11CreateDevice adapter 0x1c56f0, driver_type D3D_DRIVER_TYPE_UNKNOWN, swrast (nil), flags 0x1, feature_levels 0x13012d8, levels 0x3, sdk_version 7, device 0xe2b4d0, feature_level 0x32fbb4, context 0xe2b48c stub!
trace:d3d9:Direct3DCreate9 sdk_version 0x20.
fixme:win:EnumDisplayDevicesW ((null),0,0x32f798,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f798,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x32f798,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32f798,0x00000000), stub!
fixme:d3d9:d3dadapter9_new 
Native Direct3D 9 is active.
For more information visit https://wiki.ixit.cz/d3d9
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: \\.\DISPLAY1
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6800:1002
fixme:win:EnumDisplayDevicesW ((null),0,0x32f0a8,0x00000000), stub!
fixme:dxgi:dxgi_output_GetDesc iface 0x1c9e00, desc 0x32f658 stub!
fixme:wbemprox:client_security_SetBlanket 0xf6d506bc, 0x1c9db0, 10, 0, (null), 3, 3, (nil), 0x00000000
fixme:wbemprox:client_security_Release 0xf6d506bc
fixme:win:EnumDisplayDevicesW ((null),0,0x32ef68,0x00000000), stub!
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: \\.\DISPLAY1
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6800:1002
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f258,0x00000000), stub!
trace:d3d9:d3dadapter9_AddRef 0x1c89b8 increasing refcount to 2.
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x1cccf0), stub!
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x1cccf0), stub!
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:RegisterDeviceNotificationW (hwnd=0x1004c, filter=0x32fc4c,flags=0x00000000) returns a fake device notification handle!
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
trace:d3d9:d3dadapter9_GetAdapterModeCount 20 modes.
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
fixme:win:RegisterDeviceNotificationW (hwnd=0x1004c, filter=0x32fb6c,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
fixme:win:RegisterDeviceNotificationW (hwnd=0x1004c, filter=0x32fc44,flags=0x00000000) returns a fake device notification handle!
fixme:advapi:RegisterEventSourceA ((null),"OculusVR"): stub
fixme:advapi:RegisterEventSourceW (L"",L"OculusVR"): stub
fixme:win:EnumDisplayDevicesW ((null),0,0x32e954,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32ec9c,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x32ec9c,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32e954,0x00000000), stub!
fixme:winsock:convert_proto_w2u unhandled Windows socket protocol 41
fixme:ver:GetCurrentPackageId (0x643e9d8 (nil)): stub

etc.

One possibility is that the different programs simply do different things at startup, another one is that they maybe use different unity versions, but in any case, the programs that do not work with nine do work with wined3d.

ChristophHaag commented 9 years ago

And I tried to make a trace: http://haagch.frickel.club/files/TheRPGRoom.trace

axeldavy commented 8 years ago

the trace doesn't work on wined3d either.