upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorthibaut <thibaut-leaux-angeli@live.fr>2026-11-23 17:33:52 +0100
committerthibaut <thibaut-leaux-angeli@live.fr>2026-11-23 17:33:52 +0100
commit588ef0b5ebfd77a475c77e46acd4e7e3b039c7ea (patch)
tree946b0b0f4f22031eaf196bd1194f3b6804b26da6 /runtime
parent2b584ec2b5babcbe2961cea82f184a5893f080a2 (diff)
d3d12: slot 133 falls back to an ordinary buffer when the driver will not import the title's pages
RADV under Wine refuses to import a view of a pagefile-backed section (E_OUTOFMEMORY on an RX 9070 XT, found in review), which is the form xmem's physical pages take, so the retail boot stopped at the first 174 MiB placement. An import failure other than a misaligned VA now gives an ordinary DEFAULT buffer of the same description, as #6915's stand-in did, logged once: the boot goes on, and the title's writes at that VA don't reach it on such a driver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/shims/d3d12_vulkan_device.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/runtime/shims/d3d12_vulkan_device.cpp b/runtime/shims/d3d12_vulkan_device.cpp
index ce89acff0..ab51e9c27 100644
--- a/runtime/shims/d3d12_vulkan_device.cpp
+++ b/runtime/shims/d3d12_vulkan_device.cpp
@@ -6917,11 +6917,24 @@ public:
6917 auto* resource = new Resource(state_, desc, heap, D3D12_HEAP_FLAG_NONE); 6917 auto* resource = new Resource(state_, desc, heap, D3D12_HEAP_FLAG_NONE);
6918 resource->attach_device(identity()); 6918 resource->attach_device(identity());
6919 const HRESULT hr = resource->create_host_buffer(address); 6919 const HRESULT hr = resource->create_host_buffer(address);
6920 if (FAILED(hr)) { 6920 if (hr == E_INVALIDARG) {
6921 log_once("a title-placed buffer (device slot 133) could not import its pages; HRESULT", int(hr));
6922 resource->Release(); 6921 resource->Release();
6923 return d3d12_trace::result(method, hr); 6922 return d3d12_trace::result(method, hr);
6924 } 6923 }
6924 if (FAILED(hr)) {
6925 // The driver would not import these pages: RADV refuses a view of a pagefile-backed section, the form
6926 // xmem's physical pages take (found in review on an RX 9070 XT under Wine), and a device without
6927 // VK_EXT_external_memory_host has no import at all. The boot goes on with an ordinary DEFAULT buffer
6928 // of the same description, as #6915's stand-in did: the title gets a resource, but its writes at
6929 // `address` do not reach it.
6930 resource->Release();
6931 log_once("a title-placed buffer (device slot 133) could not import its pages, so it is an ordinary buffer "
6932 "the title's writes do not reach; HRESULT",
6933 int(hr));
6934 const D3D12_HEAP_PROPERTIES fallback{D3D12_HEAP_TYPE_DEFAULT};
6935 return d3d12_trace::result(method, create_committed(&fallback, D3D12_HEAP_FLAG_NONE, &desc,
6936 D3D12_RESOURCE_STATE_COMMON, 0, nullptr, riid, out));
6937 }
6925 return d3d12_trace::result(method, hand_out(resource, riid, out)); 6938 return d3d12_trace::result(method, hand_out(resource, riid, out));
6926 } 6939 }
6927 6940