D3D12.X: coordinate view texture creation by cache key #2802
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2812"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T14:07:41Z.
Stacked on #2762. Part of #2743.
The view-resource cache now shares one pending placement per normalized address and description. Concurrent callers for that key receive the completed resource. Lookups for other keys can proceed during creation.
What is in it
Tested
ab169f5396bda3df5a48497e668f49a99192e892, based on #2762 head496ef5780a4549fc3f15bc65340deb1db4794d6b. RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC, DXC 1.8.2502.11.cargo build --workspace --locked -j 4andcargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputpassed 1,437 passed, 0 failed, 47 ignored across 37 harnesses, including 29 capability skips.Regression run
Independent retail smoke by Anon64 compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 103.0% of the baseline frames and used 104.6% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code.
main:
PR:
Not tested
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-26T14:44:16Z.
Regression run of
ab169f5on a newer retail title: no device removal, no crash, frames and commit within the limits.Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main
b49be18(this PR's base) and of this PR's exact head,scripts/smoke.ps1 -Game <title>for 60 s withXCL_NETWORK=0and A pressed every 4 s from 20 s. Main ran before and after a batch of 11 PRs and peaked at 23,855 and 23,844 MB, so the baseline held steady over the batch.main:
this PR:
103 % of main's frames, 104 % of its peak commit. One run each.
Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-26T17:32:43Z.
RX 9070 / Wine concurrent native
resource_atcheck ofab169f5396bda3df5a48497e668f49a99192e892: eight same-key callers share one creation on head and on its current-main integration. Current main creates eight distinct resource objects under the same controlled overlap.Tested
Compared exact head, current main
8b957bec6f82495aec940944c6bf47faa02db590, and current main with this PR's full diff applied. Head is stacked on #2762 commit496ef5780a4549fc3f15bc65340deb1db4794d6b; the PR's upstream base isb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. The integration applied without conflicts; additions/deletions and surrounding diff context matched independently. The padding result below includes the parent change; this was not a runtime comparison against the direct parent.RX 9070 16 GB, PCI
1002:7550, RADV GFX1201 / Mesa26.3.1-arch3.5(mesa/vulkan-radeonpackages3:26.3.1-5), Ryzen 7 7700, CachyOS7.3.0-5-cachyos, GE-Proton11-12 Wine 11.0 Staging with ntsync. Native d3d12/d3d12core/dxgi, vkd3d-proton8293130ebe370b1+with local assertions-disabled build, Rust1.97.1, releasex86_64-pc-windows-gnu.Source copies received reversible
cfg(test)observation immediately before/after the existing native creation call and a local fixture. The actualcreate_placed_resource_xcall, arguments and cache decisions were retained; the factory was not substituted. Removing test additions reconstructs every original source hash. These were instrumented source copies, not clean Git checkouts.XCL_NETWORK=0,XCL_ADAPTER="AMD Radeon RX 9070",XCL_REQUIRE_GPU=wave64, native DLL overrides, private enabled caches. Native probes ran withXCL_VRAM_ARENASunset and withXCL_VRAM_ARENAS=1, three fresh processes per source/configuration, alternating source order.N=1andN=4: exact head and integrated head each 4 passed / 0 failed / 0 ignored per invocation; current main 2/0/0. Main has no newview_key_testsmodule. The head module includes the cached-zero/independent-key CPU check.one creation per normalized keyafter all native creation, identity and descriptor checks completed.The native fixture uses small RGBA8 render targets, with a 192 KiB owned synthetic address range. It holds creation for the first address until all eight callers are observed: eight caller references to the pending entry on head, eight factory entrants on main. A different address completes while that first creation remains held. After release, every head caller receives the same pointer; main returns eight distinct pointers. An exact repeat uses a previously returned pointer on all three source variants.
Per-process outcomes were identical in every repetition and both placement configurations:
Across 24 harness invocations: 0 ignored, 0 capability skips. The 18 native probes created 102 real resources. Independently checked saved pointer sets, creation counts, joins and native descriptors; each resource's device matched the selected RX 9070 LUID. Default placement mapped one tile per resource; arena mode had no page mappings. Shared page/heap backing means these object counts do not establish VRAM savings. Creation references and synthetic address identities remain valid until process exit, matching the cache's lifetime.
Not tested
Texture drawing, shader dispatch or pixel readback, native driver failures during concurrent creation, other formats or multiple devices, long-running cache lifetime, whole workspace suite, native Windows, other adapters, retail data,
scripts/smoke.ps1, FPS, allocation latency or measured RAM/VRAM reduction.AI use
OpenAI Codex (GPT-6; exact serving variant not exposed) audited the diff, wrote local test-only observations/fixture, ran all source variants, independently verified raw logs/source/executable hashes, and drafted this report. Publication authorized by the account owner.
Pull request closed