Repository navigation
Conversation
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Reviewed and verified. Vital breakthrough for title instance culling and crash resolution (RT-TITLE-BUFFER-VIEWS, Issue #14). Extends Xbox device slots 70 (SRV) and 71 (UAV) to construct raw, structured, and typed buffer views from a buffer description Width and GPU address via write_buffer_srv_at / write_buffer_uav_at. Prevents device-loss crash on instance-culling dispatches. Verified in runtime/test/d3d12_set0_compute_test.cpp and xs_proxy_mock_test.cpp. 100% clean-room.
|
Tested
7 passed, 1 failed (88%). AI-assisted: yes |
|
measurement on the retail boot, #1160 on top of #1079 + #980 + #1028 (+ #1021 translated shaders, DadaCap prototype + #968): RTX 5070, Windows 11, NVIDIA 617.14
AI-assisted: yes (Claude Code, Sonnet 5.5) |
|
correction, please disregard the measurement above as a statement about #1160: my stack was wrong, not the PR. On my stack the buffer views go through I am re-running with the AI-assisted: yes (Claude Code, Sonnet 5.5) |
A raw shader-resource view of a live image used to return a null descriptor. Match the placement and resource description for SRVs and UAVs, retain the chosen image while creating its view, and remove its entry on final release. The placement ABI is also documented by VIctory. The default and rollback GPU tests each sampled 64 expected texels from a placed view. The default accepted two writable views and rejected two controls. The rollback returned four null UAVs. xs_proxy_mock's invalid environment-slot case used slot 71 as its forwarded PC slot. Slot 71 is routed now, so the case probes slot 72. All six CTest forms of the proxy test pass. AI-assisted (Codex and Claude Code agents). Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
result with
The checkpoint output comes from AI-assisted: yes (Claude Code, Sonnet 5.5) |
|
Also tested
AI-assisted: yes |
|
@madhyn @DesertGamer thank you both, that is exactly the check this needed.
The culling loss: DesertGamer's run says #1160 alone does not remove it on that stack (lost at 83.4 s in an instance-culling dispatch, read of |
…m a buffer description and its address DadaCap measured that slots 70 (SRV) and 71 (UAV) also make buffer views, and that the null descriptor they got left the instance-culling dispatches reading leftover memory as a V# until the device was lost (issue ProjectLeonida#14 comment 7140195321). A buffer description now reaches ProjectLeonida#1079's placed-view handler, which writes the V# of a view of Width bytes at the address (taken as a GPU address, as a CBV's BufferLocation is). The V# comes from the code CreateShaderResourceView / CreateUnorderedAccessView use for a buffer resource, factored out as write_buffer_srv_at / write_buffer_uav_at, so the view kinds and bounds are the PC methods'. A refused view or a UAV counter offset keeps the null view. d3d12_set0_compute_test compares six views with the PC methods' and checks three null controls.
d04e78e to
c4afec1
Compare
|
Recommendation: [WAIT] Reasoning: Xbox device slots 70/71 now write buffer SRV/UAV views from a buffer description and address. This targets a world-phase device-loss cause, a significant runtime change (+453/-113). The branch is built on #1079, which must land first. The retail-boot measurements from DesertGamer and madhyn depend on DadaCap's out-of-tree Impact level: 7/10 |
|
Ran this on Linux under Wine and Proton, as part of VERIFY-WINE-PROTON-GPU in #14. Your branch at c4afec1 as is, against its base #1079 at 99176da: both now conflict with main (
The same results on each host: WineHQ 11.22 (winewayland) and GE-Proton11-14 (winex11, with These tests are Windows-only, so nothing ran natively. Built with clang-cl and xwin in a container; not run on Windows or with the retail game. It will need a rebase onto main after #1079's. AI-assisted (Claude). |
Claimed in the coordination issue as: RT-TITLE-BUFFER-VIEWS (#14 (comment))
Depends on: #1079 (this branch is built on it; its last commit is this pull request)
What and why
@DadaCap measured that Xbox device slots 70 (SRV) and 71 (UAV) also make buffer views, and that the missing ones are a cause of the world-phase GPU fault: with the null descriptor, the instance-culling dispatches read leftover memory as a V# and the device is lost (issue #14, comment 7140195321). #1079 resolves the texture half of the same two slots; this is the buffer half, on top of it.
runtime/shims/d3d12_xs_device.cpp: a buffer description now reaches the placed-view handler too, not onlyTEXTURE1D..3D.runtime/shims/d3d12_vulkan_device.cpp,write_placed_view: a buffer description writes the V# of a buffer view of the description'sWidthbytes at the address (dwords 10–11 of the view words). The address is taken as a GPU address, asCreateConstantBufferViewtakesBufferLocation. The V# is built by the same code asCreateShaderResourceView/CreateUnorderedAccessViewfor a buffer resource, factored out aswrite_buffer_srv_at/write_buffer_uav_at(address and size in, no resource object), so raw, structured and typed views and their bounds checks are the PC methods' and are not copied.0x20004) needs no masking: onlyALLOW_UNORDERED_ACCESS(0x4) is read.docs/d3d12_vulkan.md, next to d3d12: resolve views of live placed textures (RT-TITLE-TEXTURE-VIEWS) #1079's paragraph on slots 70/71.Not measured here: whether the title's addresses for these buffers are ones the layer can read on every stack. They are used the way a CBV's address already is.
When stacked with DadaCap's
boot-prototype(or anything that addsarena_va()): the slot's address belongs to the same family as a CBV's or a vertex view's there, so translate it witharena_va()once inwrite_placed_viewbefore the two helpers are called. Takingwrite_buffer_srv_atwhole from this PR drops that call (DesertGamer's review, which re-ran with it kept).Retail result so far (DesertGamer, RTX 5070, with
arena_va()kept): the instance-culling device loss is still there at 83.4 s, so the null buffer views were at most one of its causes.Tested
d3d12_set0_compute_test(RX 9070 XT): through the real slot 70/71 entry points, with a buffer description carrying the retail flags0x20004, six views give exactly the descriptor the PC method writes for the same buffer: typedR32_UINT, structured stride 16 and 32 (UAVs); raw, structured, typed (SRVs). Three controls give the null descriptor: past the buffer's end, a counter offset, and a UAV of a description withoutALLOW_UNORDERED_ACCESS.99176da10):xs_proxy_mock*(6),d3d12_set0_compute,d3d12_placed_texture_uav_off: 8 of 8 pass,xs_proxy_mock_env_slots_invalidincluded now that d3d12: resolve views of live placed textures (RT-TITLE-TEXTURE-VIEWS) #1079 routes its example away from slot 71.ctest303 of 308 pass. The 5 failures fail the same way without this commit:xs_proxy_mock_env_slots_invalidon d3d12: resolve views of live placed textures (RT-TITLE-TEXTURE-VIEWS) #1079's previous head (passes on the current one, above), and the 4 already onmainhere (d3d12_clear,d3d12_execute_indirect_validation,d3d12_texture_tiles,d3d12_pipeline_library_host, reported in Coordinating who works on what #14).tests/test_docs_links.py,scripts/check_no_game_data.pyon every changed file.GPUs tested: AMD Radeon RX 9070 XT, AMD Adrenalin 26.11.2 (Vulkan 1.4.359), Windows 11
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.