38531 Commits
Author SHA1 Message Date
iChris4 3ddf87e56e Updated VRPane UI & Settings 2026-07-25 18:53:44 +02:00
iChris4andClaude Opus 5 05d91da8bf Fixed Vulkan VR crash when opening a second game in one process
Opening a game, closing it, and opening another crashed or device-lost on
the Vulkan backend with VR enabled. D3D11 and D3D12 both restart cleanly,
so this was Vulkan-specific rather than an OpenXR runtime limitation.

Root cause, proven with VK_EXT_device_fault plus
VK_EXT_device_address_binding_report: the fault is a write-invalid at a
page-aligned address that the binding tracer reports as not owned by the
second game device. The OpenXR compositor still references resources that
lived on the first game VkDevice; destroying that device frees the memory
and the compositor later writes into the freed page. The D3D backends are
immune because their shared compositor resources are COM ref-counted,
while vkDestroyDevice frees unconditionally.

Fix: persist and reuse the VulkanContext (VkInstance and VkDevice) across
VR games, so vkCreateDevice/vkDestroyDevice run once per process and those
pages are never unmapped. Per-game objects are still fully recreated,
including the surface, swapchain, object cache, command buffers, and the
OpenXR session and XrInstance. A device-lost context is never persisted. A
non-VR launch, or a runtime requiring a device extension the persisted
device lacks, discards it and initializes fresh.

Two problems that persisting exposed:

- InitBackendInfo() creates and destroys a temporary VkInstance on every
  game boot and then calls UnloadVulkanLibrary(), which nulls every global
  Vulkan function pointer. Reuse now re-resolves the instance and device
  dispatch for the persisted handles.

- That same UnloadVulkanLibrary() unmaps vulkan-1.dll on runtimes that do
  not otherwise pin it, invalidating the persisted handles. This is why
  VDXR still failed after SteamVR worked. Added KeepVulkanLibraryLoaded()
  so unloading is suppressed while a device is persisted.

Also removes the XR_KHR_vulkan_enable2 path. Creating a second device
against a retained XrInstance crashes inside the runtime in a way SEH
cannot catch. The backend now always uses legacy XR_KHR_vulkan_enable,
where Dolphin owns instance and device creation and the runtime binds at
xrCreateSession.

Supporting changes: ordered OpenXR session teardown (ShutdownSession and
DestroySession), a device-lost guard in CommandBufferManager that stops
emulation instead of resubmitting to a dead device, synchronous release of
Dolphin views and framebuffers before xrDestroySwapchain, and the two GPU
fault diagnostics. Note that vkGetDeviceFaultInfoEXT must be called with
vendorBinarySize zeroed on the second call, or the driver writes the
vendor blob to a null pointer.

Verified on SteamVR/PSVR2, VDXR/Quest 3, and Meta Link over repeated
open/close cycles.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-25 15:43:14 +02:00
iChris4 b38bebb869 Added semantic family scheme to the shader hunter 2026-07-24 17:41:25 +02:00
iChris4 0b3f728999 Removed Debug Logs 2026-07-24 16:56:48 +02:00
iChris4 1d807900ff Moved "Debug Log Draws" to the VR Pane 2026-07-24 16:50:43 +02:00
iChris4 39b0718a3c Updated UI 2026-07-24 16:35:55 +02:00
iChris4 56261dca10 Added "preserve_stereo_efb" to Fullscreen override 2026-07-24 16:28:46 +02:00
iChris4 c42e41c88e Added Global Flag Override and "Flag" type to Texture Override 2026-07-24 04:00:51 +02:00
iChris4 6814e0b955 Updated Hide Object UI 2026-07-24 03:07:44 +02:00
iChris4 a39dce8432 Added right-click menu for Overrides sorting 2026-07-24 01:39:02 +02:00
iChris4 5a01a4a673 Adjusted Texture Element Override Layout 2026-07-24 01:18:33 +02:00
iChris4 655b65af7a Added drag and drop support for PNG/DDS from File Explorer onto the Texture Override Tool 2026-07-24 01:06:50 +02:00
iChris4 a409877f3d Added texture override parser support for tex1_WxH_m_<hash> 2026-07-23 23:59:02 +02:00
iChris4 6ff81b072f Added Screen Pane Depth options type "Original, Physical, Flat" 2026-07-23 23:40:13 +02:00
iChris4 a5f7dd1084 Screen_pane depth fix (MKDD) 2026-07-23 20:12:02 +02:00
iChris4 d85e292b12 Presentation-stage fix & Added screen_pane type override 2026-07-23 17:45:43 +02:00
iChris4 f3d3975fe2 Improving OpenXR Wii pointer aim during fast wrist motion 2026-07-23 01:52:28 +02:00
iChris4 b4796daa35 Added Frame Size from XFB Copy, Small 3D Viewports and Detect Render-to-Texture Viewports 2026-07-23 00:14:58 +02:00
iChris4 fc00505bab OpenXR Wii Remote Absolute pointing and Motion fixes 2026-07-22 18:32:55 +02:00
iChris4 095656b05b Added one-time Quest controller prompt 2026-07-22 17:08:20 +02:00
iChris4 f4c435dc3b Fixed "Configure in VR" on Quest 2026-07-22 14:57:59 +02:00
iChris4 a72e99fd4b Updated VR-Config to match Game Config behavior 2026-07-22 05:24:01 +02:00
iChris4 ba2baf3a52 VR Config UI Tweaks 2026-07-22 04:51:53 +02:00
iChris4 e9da12534f Removed (VR) after Vulkan and Direct3D 11 2026-07-22 04:36:13 +02:00
iChris4 d52a468f14 Added the default Reset VR Position binding @(Shift+R) 2026-07-22 04:27:33 +02:00
iChris4 3f7bab1a03 Added new Hotkeys for the Texture Override Tool and Anchor Overrides 2026-07-22 04:23:19 +02:00
iChris4 e963819d00 Added "Configure in VR" for Hotkey Settings 2026-07-22 03:37:00 +02:00
iChris4 8a6747efdd Updated VRPane layout 2026-07-22 03:23:59 +02:00
iChris4 1793f16d6d Removed Element Depth 2026-07-22 02:52:37 +02:00
iChris4 5f651538d3 Removed depreciated Auto Layer and Layer Offset 2026-07-21 21:01:36 +02:00
iChris4 a5d08016a4 Added Controller Anchor to Shader and Texture Override Tool 2026-07-21 19:51:32 +02:00
iChris4 eca3105a0b Added Camera Anchor to Shader and Texture Override Tool 2026-07-21 18:36:46 +02:00
iChris4 8aa116d0e2 Added Custom FPV UPM Value 2026-07-21 17:49:31 +02:00
iChris4 e7662f3c8b Removed "LockHeadPosePerFrame " and "AutoImmediateXFB "in VR Hacks 2026-07-21 17:06:40 +02:00
iChris4 7ba102775f Added "Configure in VR" to the GameCube bindings 2026-07-21 15:12:49 +02:00
iChris4 d94a5a0cfe Updated "Configure in VR" Wii Remote OpenXR controller bindings 2026-07-20 02:53:55 +02:00
iChris4 2aa5f3b2ca Added "Controller Anchor" type to the group elements override 2026-07-19 17:56:55 +02:00
iChris4 b44ac1f850 Added "Camera Anchor" type to Group Element Override 2026-07-19 04:51:48 +02:00
iChris4 405f30d211 Added "Auto-Exclude EFB Effects" to 2D Virtual Screen 2026-07-19 01:29:05 +02:00
iChris4 e77555d766 XFB pose stamps & EFB clear moved off the present path 2026-07-18 23:24:17 +02:00
iChris4 4825e49442 Added "Exact Screen Depth" mode 2026-07-18 16:47:07 +02:00
iChris4 63a8bf0714 Vulkan Multiview Fixes for Ubershaders and EFB clears 2026-07-18 00:02:36 +02:00
iChris4 a77f7c85d3 D3D12 Texture2DArray OpenXR swapchain 2026-07-17 04:33:48 +02:00
iChris4 e61053a0ba Added Semantic VS/GS family signatures 2026-07-17 04:06:11 +02:00
iChris4 053caf07ce Fix Vulkan Virtual 2D Screen Clamping 2026-07-16 22:57:22 +02:00
iChris4 cad9760185 Updated "Pink" Hunting Mode 2026-07-16 22:37:18 +02:00
iChris4 dbafa8bdf4 XR CPU Thread affinity 2026-07-16 17:32:10 +02:00
iChris4 a4a4eec869 Defer eye blit to submit time 2026-07-16 15:38:48 +02:00
iChris4 3bfa9ad3ec Improved passthrough & Added XRPacingThread 2026-07-12 01:32:52 +02:00
iChris4 490695d83f Added foveated rendering 2026-07-11 04:16:02 +02:00