Repository navigation
Conversation
cc05866 to
0ffeeed
Compare
|
Native Windows check, AI-assisted (Claude Code). Windows 11, i9-13900K, 64 GB, RTX 4070 Ti 12 GB (NVIDIA 630.20), MSVC 2022 (VS 17 generator, Release), Vulkan. Head
7 passed, 1 failed. The same test passes on current |
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Reviewed and verified. Robust resolution of live slot-133 placed textures by address, format, and dimensions for Xbox device slots 70 (SRV) and 71 (UAV). Cleanly manages lifetime via TexturePlacements multimap under placement_mutex, returning null descriptors for unmatched placements or released resources. Includes LEONIDA_PLACED_TEXTURE_UAV=0 rollback and comprehensive tests in d3d12_set0_compute_test and xs_proxy_mock_test. 100% clean-room.
|
Independently reproduced on Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti (
7 passed, 1 failed (88%). AI-assisted: yes |
0ffeeed to
99176da
Compare
|
@Plaaasma @madhyn thank you, you were both right, and the diagnosis in the first report was exact. The branch is updated. The case now probes slot 72 and asserts that slot 72 is not overridden, which is what the integration branch (#984) already does. Run here on the new head (CachyOS, Proton Experimental, clang-cl + xwin, RTX 4070, NVIDIA 620.73.04): before the fix 🤖 Generated with Claude Code |
|
AMD run (the gap the description lists): RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (LLPC, Vulkan 1.4.359), Windows 11, MSVC 2022 RelWithDebInfo. Head
|
…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.
|
Ran this on Linux under Wine and Proton, as part of VERIFY-WINE-PROTON-GPU in #14. Your branch at 99176da, merged into main at 58be9cd (the merge is clean).
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. AI-assisted (Claude). |
99176da to
c8b2308
Compare
|
Rebased onto On the new head the three targets were rebuilt and all eight registered forms run again on an RTX 4070 (NVIDIA 620.73.04), this time under Wine 11.22 (distribution package): AI-assisted (Claude Code). 🤖 Generated with Claude Code |
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. Rebased onto main after #375: both sides of device_slot_overridden and of the proxy test's check list are kept. All eight registered forms of the two tests pass on the rebased head under Wine 11.22. 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> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c8b2308 to
0a92b13
Compare
Rebased diff at
0a92b139. Main already has the placed-texture SRV and UAV paths. This PR keeps regression coverage for choosing the right live array placement when two textures share an address, rejecting a view after that placement is released, and accepting a complete 3D mip while rejecting a partial view. CTest also runs the same fixture withLEONIDA_PLACED_TEXTURE_UAV=0. The test results below apply to earlier heads.Claimed in the coordination issue as: RT-TITLE-TEXTURE-VIEWS (claim).
Part of the split of #984 into small pull requests.
Depends on: none
Overlaps: #356 supplied the null SRV fallback for Xbox device slot 70. This child retains that fallback for missing images. #461 concerns CPU texture layout. The live-image path uses the Vulkan image already created by slot 133.
What and why
A shader-resource view of an existing GPU texture returned a null descriptor when the caller supplied the texture's placement address. The equivalent unordered-access call could reach an unrelated PC device method.
Slots 70 and 71 now resolve a live slot-133 texture by address, shape and format. When several images share an address, the most recent compatible image wins. The lookup holds a reference while writing the descriptor. Final release removes only that resource from the index. A UAV requires writable backing. A 3D UAV must span a complete mip. Unmatched views produce null descriptors. Set
LEONIDA_PLACED_TEXTURE_UAV=0to return null placed UAVs for comparison.CPU-source uploads and refresh belong to the separate RT-TITLE-TEXTURE-SOURCES topic.
Tested
Linux/Proton Experimental (Wine 11), GeForce RTX 4070 12 GB, NVIDIA 620.73.04. Release cross-build with clang-cl 23 and an xwin SDK. Each command below used the same configured build directory.
PROTON_WINEnames the Wine executable andWINEPREFIXselects the test prefix.All three targets built. The default and rollback runs each sampled all 64 expected texels through the placed SRV. Each also checked an ordinary SRV, a clamping sampler and a missing-descriptor fallback, for 256 texel checks per run. The default produced two valid UAVs (an array layer and a complete volume mip) and two null controls (released placement and partial mip). The rollback produced four null UAVs. The plain-device proxy test passed at both emulated device interface levels and checked both slots with and without destinations. The six ways CTest runs it (plain, three refused allocations, and the two environment-slot cases) all exit zero.
Fixed after the first version.
xs_proxy_mock --env-slots-invalidfailed on the first head. It used device slot 71 as its example of a PC slot that is forwarded unchanged, and this change routes slot 71 to the placed texture UAV. The first version ran only the plain form of the test, so it missed that. The case now probes slot 72 and asserts that it is not overridden. Reported by Plaaasma on native Windows and reproduced by madhyn on Wine; reproduced here before the fix (exit 1 at that line) and passing after it.Rebased onto
main9f25f1ef2. #375 (XMem hooks and console render-target sizes) changed the same two places as this change. Indevice_slot_overridden(runtime/shims/d3d12_xs_device.cpp) it adds slots 17 to 24 and 56 and this change adds slot 71; in the list of checks ofruntime/test/xs_proxy_mock_test.cppit adds five checks and this change renamescheck_slot70tocheck_placed_views. Both sides are kept, and nothing else conflicted. Slot 72, which the invalid environment-slot case probes, is still not routed. On the rebased head the three targets were rebuilt and all eight registered forms were run again:d3d12_set0_compute,d3d12_placed_texture_uav_off(LEONIDA_PLACED_TEXTURE_UAV=0) and the sixxs_proxy_mockforms. These runs used Wine 11.22 (distribution package, a prefix of its own) instead of Proton Experimental, on the same GPU and driver. All exit 0 with the results described above (2 matching UAVs and 2 null controls by default, 4 null controls in the rollback, 64 texels per sampled view), and the plainxs_proxy_mockrun includes the five checks #375 added.GPUs tested: NVIDIA GeForce RTX 4070. Native Windows, AMD, Intel and a game boot were not tested on this child by us; the reviewers' native Windows and Wine runs were on the first head. The cross-build omitted the optional XMA decoder because the Rust Windows target was unavailable.
AI-assisted: yes.
Checklist
3aa975421. Merges cleanly.scripts/check_no_game_data.py.🤖 Generated with Claude Code