diff options
| author | Rain156 <77776581+Rain156@users.noreply.github.com> | 2026-11-24 21:19:30 +0800 |
|---|---|---|
| committer | Rain156 <77776581+Rain156@users.noreply.github.com> | 2026-11-24 21:19:30 +0800 |
| commit | db19bbd3455a757c3fe986c6e6db36998f275150 (patch) | |
| tree | fc55054b03582969e5897c73a667cc4c8b44ad5a /runtime/test/device_proxy_test.cpp | |
| parent | e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b (diff) | |
runtime: connect native pipelines and title resources to the offline first-run UI
Build on the public frame-loop integration in #321. Carry the texture-view and depth work from #213 and #261, the layout provider from #461, the responsive window from #526, and the rectangle generator from #682. Integrate the Xbox constant-buffer row addressing measured in #513 and the draw-time rectangle selection in #722. Keep all fixtures synthetic.
The Windows GPU path resolves title-owned shader objects, retires geometry uploads per submission, materializes texture views on use, maps linear surfaces, and delivers completed GPU label writes. A first-run UI launch selects the tested settings for these paths.
Diffstat (limited to 'runtime/test/device_proxy_test.cpp')
| -rw-r--r-- | runtime/test/device_proxy_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/test/device_proxy_test.cpp b/runtime/test/device_proxy_test.cpp index f02d6cd02..08b34d8c9 100644 --- a/runtime/test/device_proxy_test.cpp +++ b/runtime/test/device_proxy_test.cpp | |||
| @@ -432,6 +432,22 @@ int main(int argc, char** argv) { | |||
| 432 | check(rt::d3d12_xs::device_slot_hits(76) == 2, "slot 76 hit counter is 2"); | 432 | check(rt::d3d12_xs::device_slot_hits(76) == 2, "slot 76 hit counter is 2"); |
| 433 | check(rt::d3d12_xs::device_slot_first_call_seen(76), "slot 76 first-call flag is set"); | 433 | check(rt::d3d12_xs::device_slot_first_call_seen(76), "slot 76 first-call flag is set"); |
| 434 | 434 | ||
| 435 | // A backend can run out of memory after allocating the native depth image. Slot 76 must propagate that | ||
| 436 | // failure without handing a depth-only resource to a caller that requested a working UAV. | ||
| 437 | { | ||
| 438 | auto ds_uav = xbox_texture; | ||
| 439 | ds_uav.Format = DXGI_FORMAT_R32G8X24_TYPELESS; | ||
| 440 | ds_uav.Flags = D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL | D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; | ||
| 441 | check(rt::d3d12_xs::set_depth_stencil_uav_provider(device.Get(), [](ID3D12Resource*, D3D12_HEAP_FLAGS) -> HRESULT { | ||
| 442 | return E_OUTOFMEMORY; | ||
| 443 | }), "install a failing Xbox storage-image provider"); | ||
| 444 | void* result = reinterpret_cast<void*>(1); | ||
| 445 | hr = create_resource(device.Get(), &heap_properties, D3D12_HEAP_FLAG_NONE, &ds_uav, | ||
| 446 | D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr, iid_resource, &result); | ||
| 447 | check(hr == E_OUTOFMEMORY && !result, "slot 76 propagates storage-image allocation failure atomically"); | ||
| 448 | rt::d3d12_xs::set_depth_stencil_uav_provider(device.Get(), nullptr); | ||
| 449 | } | ||
| 450 | |||
| 435 | // Xbox device slots from the public HLE. On the Vulkan device the PC entries at 78/79 are | 451 | // Xbox device slots from the public HLE. On the Vulkan device the PC entries at 78/79 are |
| 436 | // CreateReservedResource2/CreateSampler2 and 80 is past the 80-slot table, so success here can only come from | 452 | // CreateReservedResource2/CreateSampler2 and 80 is past the 80-slot table, so success here can only come from |
| 437 | // the routes: frame events return S_OK and a fresh token, CreateCommandQueueX returns a queue proxy and | 453 | // the routes: frame events return S_OK and a fresh token, CreateCommandQueueX returns a queue proxy and |