Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load swapchain #9

Open
schell opened this issue Nov 4, 2022 · 12 comments
Open

Unable to load swapchain #9

schell opened this issue Nov 4, 2022 · 12 comments

Comments

@schell
Copy link
Contributor

schell commented Nov 4, 2022

I'm trying to run the example with cargo run -- xr and am getting this error:

PS C:\Users\efsub\source\repos\wgpu-openxr-example> $env:RUST_BACKTRACE=1; cargo run -- xr
    Finished dev [unoptimized + debuginfo] target(s) in 1.32s
     Running `target\debug\wgpu-openxr-example.exe xr`
loaded OpenXR runtime: SteamVR/OpenXR 0.1.0
thread 'main' panicked at 'Unable to load create_swapchain_khr', C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\ash-0.37.0+1.3.209\src\vk\extensions.rs:268:21
stack backtrace:
   0: std::panicking::begin_panic<str>
             at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panicking.rs:616
   1: ash::vk::extensions::impl$9::load::create_swapchain_khr
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\ash-0.37.0+1.3.209\src\vk\extensions.rs:268
   2: ash::extensions::khr::swapchain::Swapchain::create_swapchain
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\ash-0.37.0+1.3.209\src\extensions\khr\swapchain.rs:64
   3: wgpu_hal::vulkan::Device::create_swapchain
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\wgpu-hal-0.13.2\src\vulkan\device.rs:559
   4: wgpu_hal::vulkan::instance::impl$5::configure
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\wgpu-hal-0.13.2\src\vulkan\instance.rs:737
   5: wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::surface_configure<wgpu_core::hub::IdentityManagerFactory,wgpu_hal::vulkan::Api>
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\wgpu-core-0.13.2\src\device\mod.rs:5089
   6: wgpu::backend::direct::impl$3::surface_configure
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\wgpu-0.13.1\src\backend\direct.rs:1003
   7: wgpu::Surface::configure
             at C:\Users\efsub\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\wgpu-0.13.1\src\lib.rs:3576
   8: wgpu_openxr_example::main
             at .\src\main.rs:136
   9: core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),tuple$<> >
             at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\ops\function.rs:248
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\debug\wgpu-openxr-example.exe xr` (exit code: 101)

I have since installed the LunarG Vulkan SDK, installed the latest drivers for my GPU (Nvidia GeForce GTX 1060) and SteamVR is running before I run cargo run -- xr. Are there any other setup steps I'm forgetting?

@philpax
Copy link
Owner

philpax commented Nov 4, 2022

Hmm, do you have more than one GPU (i.e. integrated graphics) in your machine, and does cargo run -- desktop work? That looks like it's failing to create the swapchain for the window on the device that's being used for XR rendering; I'm not sure what could lead to that, other than a) disagreements over which device is responsible for rendering to that device or b) some kind of runtime Vulkan issue.

If it works in desktop mode, we can narrow it down to the device; if it doesn't, then there's something else askew with your Vulkan setup, and we'll have to keep debugging.

@schell
Copy link
Contributor Author

schell commented Nov 4, 2022

It works in desktop mode!

Could it be that SteamVR (which is providing the OpenXR runtime) is using D3D and can't interop with Vulkan?

@schell
Copy link
Contributor Author

schell commented Nov 4, 2022

In the SteamVR web console I do see it setting up D3D11 textures:

Created shared texture 'Scene create D3D11, -1' 48x48 (1 mips)
Sat Nov 05 2022 08:59:38.448 - Created shared texture 'Scene create D3D11, 0' 2137x2375 (1 mips)
Sat Nov 05 2022 08:59:38.449 - Created shared texture 'Scene create D3D11, 0' 2137x2375 (1 mips)
Sat Nov 05 2022 08:59:38.449 - Created shared texture 'Scene create D3D11, 0' 2137x2375 (1 mips)
Sat Nov 05 2022 08:59:38.452 - Created shared texture 'Scene create D3D11, 1' 2137x2375 (1 mips)
Sat Nov 05 2022 08:59:38.452 - Created shared texture 'Scene create D3D11, 1' 2137x2375 (1 mips)
Sat Nov 05 2022 08:59:38.452 - Created shared texture 'Scene create D3D11, 1' 2137x2375 (1 mips)

@schell
Copy link
Contributor Author

schell commented Nov 4, 2022

This is the full SteamVr log while running cargo run -- xr:

Sat Nov 05 2022 09:17:14.533 - Connecting client (SteamVR_Namespace) app container status: 1
Sat Nov 05 2022 09:17:14.533 - CSharedResourceNamespaceServer sent namespace data: 11932
Sat Nov 05 2022 09:17:14.534 - Connecting client (VR_ServerPipe_11932) app container status: 1
Sat Nov 05 2022 09:17:14.534 - New Connect message from \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe (VRApplication_OpenXRInstance) (Args: xr) 13172 
Sat Nov 05 2022 09:17:14.538 - Creating Builtin AppInfo for \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe (VRApplication_OpenXRInstance). , wgpu-openxr-example, 13172
Sat Nov 05 2022 09:17:14.538 - AppInfoManager.ProcessConnected BEGIN 13172 \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe 9 system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe
Sat Nov 05 2022 09:17:14.542 - SetApplicationPid appkey=system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe pid=13172, external transition
Sat Nov 05 2022 09:17:14.542 - SetApplicationPid: Setting app system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID to 13172
Sat Nov 05 2022 09:17:14.542 - AppInfoManager.ProcessConnected END
Sat Nov 05 2022 09:17:14.542 - 0 - leaving standby
Sat Nov 05 2022 09:17:14.543 - Using existing HMD lighthouse.LHR-D061B9FE
Sat Nov 05 2022 09:17:14.543 - Processing message VRMsg_Connect from wgpu-openxr-example (13172) took 0.00866 seconds
Sat Nov 05 2022 09:17:14.751 - StartSceneApplicationTransitionFromProcess( 13172, \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe, system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe)
Sat Nov 05 2022 09:17:14.751 - Sending Quit event to process steamtours (2944)
Sat Nov 05 2022 09:17:14.751 - Refusing to change app type from wgpu-openxr-example (13172) because app start error VRInitError_Init_Retry
Sat Nov 05 2022 09:17:14.863 - ClearSkyboxOverride
Sat Nov 05 2022 09:17:14.864 - VR_Shutdown called
Sat Nov 05 2022 09:17:14.864 - Closing pipe steamtours (2944) because it was broken from the other end
Sat Nov 05 2022 09:17:14.864 - Process steamtours (2944) disconnected (Thread(0x0000029BC8DCF080/0x000)
Sat Nov 05 2022 09:17:14.864 - Closing pipe steamtours (2944) because it was broken from the other end
Sat Nov 05 2022 09:17:14.864 - AppInfoManager.ProcessQuit processid=2944 eLaunchingApp=LaunchingApp_Process
Sat Nov 05 2022 09:17:14.864 - Process steamtours (2944) disconnected (Thread(0x000001A5AD60D910/0x000)
Sat Nov 05 2022 09:17:14.864 - AppInfoManager.ProcessQuit: Clearing application openvr.tool.steamvr_environments PID was 2944
Sat Nov 05 2022 09:17:14.864 - Lost pipe connection from steamtours (2944)
Sat Nov 05 2022 09:17:14.864 - ######################################################################
Sat Nov 05 2022 09:17:14.864 - Cumulative stats for pid: 2944
Sat Nov 05 2022 09:17:14.864 - AppInfoManager.ProcessQuit: Clearing application openvr.tool.steamvr_environments PID because 2944 has exited
Sat Nov 05 2022 09:17:14.864 - Total..................   460 presents. 8133 dropped.   17 reprojected
Sat Nov 05 2022 09:17:14.864 - Startup................   460 presents. 8133 dropped.   17 reprojected
Sat Nov 05 2022 09:17:14.864 - Loading...  0 total....     0 presents.    0 dropped.    0 reprojected
Sat Nov 05 2022 09:17:14.864 - Timed out.  0 total....     0 presents.    0 dropped.    0 reprojected
Sat Nov 05 2022 09:17:14.864 - Compositor Time........CPU: 0.408ms / GPU: 1.112ms
Sat Nov 05 2022 09:17:14.864 - Game Info..............FPS Average Target 90  ApplicationTime CPU: 7.547ms / GPU: 1.532ms
Sat Nov 05 2022 09:17:14.865 - ######################################################################
Sat Nov 05 2022 09:17:14.865 - Total dropped frames: 8133
Sat Nov 05 2022 09:17:15.258 - StartSceneApplicationTransitionFromProcess( 13172, \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe, system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe)
Sat Nov 05 2022 09:17:15.258 - AppInfoManager.ProcessConnected BEGIN 13172 \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe 10 system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe
Sat Nov 05 2022 09:17:15.262 - SetApplicationPid appkey=system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe pid=13172, external transition
Sat Nov 05 2022 09:17:15.262 - SetApplicationPid: Setting app system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID to 13172
Sat Nov 05 2022 09:17:15.262 - AppInfoManager.ProcessConnected END
Sat Nov 05 2022 09:17:15.273 - Connecting client (VR_CompositorPipe_11932) app container status: 1
Sat Nov 05 2022 09:17:15.273 - External connection from \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe 13172
Sat Nov 05 2022 09:17:15.296 - CEF Local Resource Load Error: http://localhost:27062/app/image?app_key=system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe&version=1.24.6 -> 404 (Not Found)
Sat Nov 05 2022 09:17:15.301 - [system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe] Created default binding for 'knuckles': C:\Program Files (x86)\Steam\config\openxr\system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe_knuckles_0_binding.json
Sat Nov 05 2022 09:17:15.301 - Error: Unable to find input profile for holographic_controller in SetXrInputConfig
Sat Nov 05 2022 09:17:15.301 - Error: Unable to find input profile for vive_cosmos_controller in SetXrInputConfig
Sat Nov 05 2022 09:17:15.301 - Error: Unable to find input profile for hpmotioncontroller in SetXrInputConfig
Sat Nov 05 2022 09:17:15.302 - [system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe] Created default binding for 'vive_controller': C:\Program Files (x86)\Steam\config\openxr\system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe_vive_controller_1_binding.json
Sat Nov 05 2022 09:17:15.302 - [system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe] Created default binding for 'oculus_touch': C:\Program Files (x86)\Steam\config\openxr\system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe_oculus_touch_2_binding.json
Sat Nov 05 2022 09:17:15.302 - Error: Unable to find input profile for khr_simple_controller in SetXrInputConfig
Sat Nov 05 2022 09:17:15.357 - [System] Unknown Transition from 'SteamVRSystemState_Standby' to 'SteamVRSystemState_Ready'.
Sat Nov 05 2022 09:17:15.487 - Error: No manifest. Clearing input data: system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe.
Sat Nov 05 2022 09:17:15.509 - AppInfoManager.ProcessQuit processid=13172 eLaunchingApp=LaunchingApp_None
Sat Nov 05 2022 09:17:15.509 - AppInfoManager.ProcessQuit: Clearing application system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID was 13172
Sat Nov 05 2022 09:17:15.509 - AppInfoManager.ProcessQuit: Clearing application system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID because 13172 has exited
Sat Nov 05 2022 09:17:15.509 - AppInfoManager.ProcessConnected BEGIN 13172 \\?\C:\Users\efsub\source\repos\wgpu-openxr-example\target\debug\wgpu-openxr-example.exe 9 system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe
Sat Nov 05 2022 09:17:15.513 - SetApplicationPid appkey=system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe pid=13172, external transition
Sat Nov 05 2022 09:17:15.513 - SetApplicationPid: Setting app system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID to 13172
Sat Nov 05 2022 09:17:15.513 - AppInfoManager.ProcessConnected END
Sat Nov 05 2022 09:17:15.518 - SetApplicationPid appkey=openvr.tool.steamvr_environments pid=10424, external transition
Sat Nov 05 2022 09:17:15.518 - SetApplicationPid: Setting app openvr.tool.steamvr_environments PID to 10424
Sat Nov 05 2022 09:17:15.518 - Processing message VRMsg_ChangeAppType from wgpu-openxr-example (13172) took 0.0087 seconds
Sat Nov 05 2022 09:17:15.519 - Closing pipe wgpu-openxr-example (13172) because it was broken from the other end
Sat Nov 05 2022 09:17:15.519 - Process wgpu-openxr-example (13172) disconnected (Thread(0x0000029BC8DCF2C0/0x000)
Sat Nov 05 2022 09:17:15.519 - Closing pipe wgpu-openxr-example (13172) because it was broken from the other end
Sat Nov 05 2022 09:17:15.519 - AppInfoManager.ProcessQuit processid=13172 eLaunchingApp=LaunchingApp_Key
Sat Nov 05 2022 09:17:15.519 - AppInfoManager.ProcessQuit: Clearing application system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID was 13172
Sat Nov 05 2022 09:17:15.519 - AppInfoManager.ProcessQuit: Clearing application system.generated.openxr.wgpu-openxr-example.wgpu-openxr-example.exe PID because 13172 has exited
Sat Nov 05 2022 09:17:15.519 - Process wgpu-openxr-example (13172) disconnected (Thread(0x000001A5AD60F410/0x000)
Sat Nov 05 2022 09:17:15.519 - Lost pipe connection from wgpu-openxr-example (13172)
vrclient type=VRApplication_Scene
[Settings] Load Default Json Settings from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\htc\resources\settings\default.vrsettings
[Settings] Load Default Json Settings from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\resources\settings\default.vrsettings
[Settings] Load Default Json Settings from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\null\resources\settings\default.vrsettings
[Settings] Load Default Json Settings from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\resources\settings\default.vrsettings
[Settings] Load Json Settings from C:\Program Files (x86)\Steam\config\steamvr.vrsettings
Client (SteamVR_Namespace) app container state: 1
Sat Nov 05 2022 09:17:15.940 - Connecting client (SteamVR_Namespace) app container status: 1
Sat Nov 05 2022 09:17:15.940 - CSharedResourceNamespaceServer sent namespace data: 11932
CSharedResourceNamespaceClient::Init(): received namespace data 11932
Client (VR_ServerPipe_11932) app container state: 1
Sat Nov 05 2022 09:17:15.942 - Connecting client (VR_ServerPipe_11932) app container status: 1
Sat Nov 05 2022 09:17:15.942 - New Connect message from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\steamvr_environments\game\bin\win64\steamtours.exe (VRApplication_Scene) (Args: -vr -retail -useappid SteamVRAppID -nowindow -vconport 29009) 10424 
Sat Nov 05 2022 09:17:15.946 - StartSceneApplicationTransitionFromProcess( 10424, C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\steamvr_environments\game\bin\win64\steamtours.exe, openvr.tool.steamvr_environments)
Sat Nov 05 2022 09:17:15.946 - AppInfoManager.ProcessConnected BEGIN 10424 C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\steamvr_environments\game\bin\win64\steamtours.exe 1 openvr.tool.steamvr_environments
Sat Nov 05 2022 09:17:15.950 - SetApplicationPid appkey=openvr.tool.steamvr_environments pid=10424, external transition
Sat Nov 05 2022 09:17:15.950 - SetApplicationPid: Setting app openvr.tool.steamvr_environments PID to 10424
Sat Nov 05 2022 09:17:15.950 - AppInfoManager.ProcessConnected END
Sat Nov 05 2022 09:17:15.951 - openvr.tool.steamvr_environments (vive) has no configured binding. Input will not be available
Sat Nov 05 2022 09:17:15.951 - Using existing HMD lighthouse.LHR-D061B9FE
Sat Nov 05 2022 09:17:15.951 - Processing message VRMsg_Connect from steamtours (10424) took 0.00857 seconds
Received success response from vrserver connect
App key after connect message:openvr.tool.steamvr_environments
Sat Nov 05 2022 09:17:15.957 - Console message (Info) from http://localhost:27062/dashboard/vrwebui_shared.js?v=4f8c5928c6802151aa28:2:
| OnBindingLoadFailed: openvr.tool.steamvr_environments vive #input_binding_load_failed_no_url
Client (VR_CompositorPipe_11932) app container state: 1
Sat Nov 05 2022 09:17:15.966 - Connecting client (VR_CompositorPipe_11932) app container status: 1
Sat Nov 05 2022 09:17:15.966 - External connection from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\steamvr_environments\game\bin\win64\steamtours.exe 10424
Received success response from vrcompositor connect
Initializing the limited version of CVRCompositorClient
Attempting to load initial input config
Failed to load binding file. We'll wait and try again when CRC or load count changes( computed CRC=0, old CRC=0, shared CRC=0, load count=0, shared load count=1 [app: openvr.tool.steamvr_environments]
No controllers detected. Not waiting for config.
VR Dashboard executable already running.
Failed to find interface 'IXrProto_001'
Sat Nov 05 2022 09:17:15.980 - SetActionManifest from openvr.tool.steamvr_environments: Using configured URL file:///C:/Program%20Files%20%28x86%29/Steam/steamapps/common/SteamVR/tools/steamvr_environments/game/steamtours/cfg/actions.json
Sat Nov 05 2022 09:17:15.981 - openvr.tool.steamvr_environments (vive) has no configured binding. Input will not be available
Sat Nov 05 2022 09:17:16.032 - Processing message VRMsg_Input_SetActionManifestPath from steamtours (10424) took 0.0513 seconds
Action Manifest Path set to C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\steamvr_environments\game\steamtours\cfg\actions.json
Capturing Scene Focus
Sat Nov 05 2022 09:17:16.041 - Console message (Info) from http://localhost:27062/dashboard/vrwebui_shared.js?v=4f8c5928c6802151aa28:2:
| OnBindingLoadFailed: openvr.tool.steamvr_environments vive #input_binding_load_failed_no_url

@schell
Copy link
Contributor Author

schell commented Nov 4, 2022

After enabling logging I can see that there is an available extension in wgpu_hal for this - maybe it has to be explicitly enabled? Forgive me if it's already being enabled and I just can't see it.

PS C:\Users\efsub\source\repos\wgpu-openxr-example> cargo run -- xr
   Compiling wgpu-openxr-example v0.1.0 (C:\Users\efsub\source\repos\wgpu-openxr-example)
    Finished dev [unoptimized + debuginfo] target(s) in 3.70s
     Running `target\debug\wgpu-openxr-example.exe xr`
2022-11-05 10:47:14.1566522 INFO wgpu_openxr_example::xr - loaded OpenXR runtime: SteamVR/OpenXR 0.1.0
2022-11-05 10:47:14.2197756 INFO wgpu_hal::vulkan::instance - Instance version: 0x401000
2022-11-05 10:47:14.2197854 INFO wgpu_hal::vulkan::instance - Enabling device properties2
2022-11-05 10:47:14.2211452 DEBUG wgpu_hal::vulkan::adapter - Supported extensions: ["VK_KHR_swapchain"]

@philpax
Copy link
Owner

philpax commented Nov 5, 2022

Hm, that might be the key! Try enabling it by adding it to the array here:
https://github.com/philpax/wgpu-openxr-example/blob/main/src/xr.rs#L98

I'm guessing that the Vulkan device created for me includes the swapchain extension as a required extension, but yours doesn't. If that's the issue, then requesting it explicitly should fix it.

@schell
Copy link
Contributor Author

schell commented Nov 5, 2022

I've added it to #10 and now I'm seeing:

Error: XR error creating Vulkan instance

Caused by:
    the runtime failed to handle the function in an unexpected way that is not covered by another error result

@schell
Copy link
Contributor Author

schell commented Nov 5, 2022

I downloaded a release of the openxr sdk here, which includes the "helloxr" app. I ran it with .\hello_xr.exe --graphics Vulkan and .\hello_xr.exe --graphics Vulkan2 and it connected to SteamVR and ran with no errors, so I don't think it's the device or the vulkan driver situation. Maybe there are some other steps we're missing when using my hardware/software setup that are implicit in your setup (like the vulkan extension).

@schell
Copy link
Contributor Author

schell commented Nov 7, 2022

I've added a few more logs to #10 but still haven't been able to figure it out. OpenXR is erring with XR_ERROR_RUNTIME_FAILURE, which seems to be an error code for "some other unenumerated error".

@philpax
Copy link
Owner

philpax commented Nov 8, 2022

Hmm... this is so strange. Are you sure it's running on the correct device? What does your system configuration look like?

@schell
Copy link
Contributor Author

schell commented Nov 8, 2022

Windows stuff

Device name	{scrubbed}
Processor	Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz   3.60 GHz
Installed RAM	32.0 GB
Device ID	{scrubbed}
Product ID	{scrubbed}
System type	64-bit operating system, x64-based processor
Pen and touch	No pen or touch input is available for this display
Edition	Windows 10 Home
Version	22H2
Installed on	‎10/‎29/‎2022
OS build	19045.2130
Experience	Windows Feature Experience Pack 120.2212.4180.0

GPU stuff

NVIDIA GeForce GTX 1060 3GB
Driver version 526.47
Vulkan Instance Version: 1.3.224

Steam / VR stuff

SteamVR Version 1.24.6 (1664827616)
Steam:	Public (Public)
Tracking:	lighthouse
OS:	Windows 10 (10.0.0.19045)
Direct Mode Graphics:	NVIDIA (526.47)

System
Admin:	No
Async Reprojection:	Enabled
Performance drops:	7/1 1/2 0/3 0/4 925/935
User IPD (m):	0.0603

Displays - Direct Mode
Display 0: \\.\DISPLAY1 3840x2160 @ (0, 0) NVIDIA GeForce GTX 1060 3GB Primary 
Monitor 0: \\.\DISPLAY1\Monitor0 Generic PnP Monitor

Display 1: NvAPI 2160x1200 @ (0, 0) NVIDIA  Direct Mode
Device 1 - Headset Vive. MV HTC LHR-D061B9FE
Firmware:	1462663157 steamservices@firmware-win32 2016-05-08 FPGA 262(1.6/0/0) BL 0
Hardware Revision:	product 128 rev 2.1.0 lot 2000/0/0 0
Hardware Id:	0x80020100
Watchman Firmware:	1462663157 / 1462663157 (2016-05-08) 
Watchman FPGA:	262 / 262 (1.6) 
Dongle Version:	BD1FC2D02E Version: 1461100729 / 1461100729 (2016-04-20) 
Dongle Version:	9FB8181861 Version: 1461100729 / 1461100729 (2016-04-20) 
Camera Firmware:	8590262295 / 8590262295 (Version: 02.05.017 Date: 2016.Jul.19) 
Display Firmware:	2097504 / 2097504 
Display FPGA:	57 / 57 
Display Bootloader:	1048592 "0x0000000000100010"
Display HW Revision:	33 "0x21"
Audio Firmware:	3 / 3 
VSync to Photons:	0.0111111
Display Frequency:	90
User IPD (m):	0.0603
Current Universe ID:	1667013542
Previous Universe ID:	0
Device Path:	/devices/lighthouse/LHR-D061B9FE
Best Alias:	/user/head


Device 2 - Base Station HTC V2-XD/XE HTC LHB-6317D6C2
Firmware:	436
Hardware Revision:	0x09000009
Hardware Id:	0x09000009
Firmware Version:	436 / 436  
Radio Version:	211 / 211 
Mode:	B
FOV Left:	60
FOV Right:	60
FOV Top:	60
FOV Bottom:	60
Range Minimum (m):	0.5
Range Maximum (m):	5
Device Path:	/devices/lighthouse/LHB-6317D6C2


Device 3 - Base Station HTC V2-XD/XE HTC LHB-5F6FB97E
Firmware:	436
Hardware Revision:	0x09000009
Hardware Id:	0x09000009
Firmware Version:	436 / 436  
Radio Version:	211 / 211 
Mode:	C
FOV Left:	60
FOV Right:	60
FOV Top:	60
FOV Bottom:	60
Range Minimum (m):	0.5
Range Maximum (m):	5
Device Path:	/devices/lighthouse/LHB-5F6FB97E

I'm not sure how to find out if it's selecting the correct device, I just assumed that OpenXR and SteamVR would work that out! Please let me know if there are some steps or info I'm missing. I'm new to developing on Windows, so I'm not confident in what is relevant.

@philpax
Copy link
Owner

philpax commented Nov 12, 2022

Sorry, I've had a busy week! I don't see anything immediately strange there, but my current running theory is that Direct Mode (as used by your headset) produces a different Vulkan device as to what's used to render your desktop / windows.

Can you try disabling the swapchain extension and removing all of the windowing logic (you should be able to replace the winit loop with a loop)? If that works, then we'll need to think about how to properly decouple the window and XR rendering.

That might even clean up the initialisation logic - there can now be an unconditional creation of the WGPU state with winit - but device-to-device copies might be a bit of a headache. If you can confirm the no-window approach works, I'll see if I can sketch something out for decoupling it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants