D3D12.X: XCL_CAST_LIST=1 gives R32_UINT volumes the cast list too #3491
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3491"
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 KDenKC on 2026-11-30T02:44:16Z.
Stacked on #3340 (and #3281 under it); the two top commits belong here.
The title packs bounced light into a 128x128x8 R32_UINT volume its compute programs write, and samples it as R9G9B9E5 at the same address, as it does its 2D light textures. #3340 gives only 2D writers a cast list, so this volume stays on the stale side: with
XCL_CAST_LIST=1the character the room lights stays black, where the copy route (#3094, which covers that pair) lights it (#505, 7266197025).This gives R32_UINT volumes the cast list too, where the device samples R9G9B9E5 volumes. Off by default, as #3340 (
XCL_CAST_LIST=1).Related: #505, #3094.
What is in it (two commits)
hle/d3d12x/cast_list.rs:for_writergives a TEXTURE3D R32_UINT UAV writer [R32_UINT, R9G9B9E5_SHAREDEXP] where the device samples R9G9B9E5 volumes (FORMAT_SUPPORT1_TEXTURE3DandFORMAT_SUPPORT1_SHADER_SAMPLE, queried only after the R32_UINT/UAV checks and cached by adapter LUID, including unsupported results).keep_readerkeeps 3D readers;whole_viewmakes a TEXTURE3D view. A 2D array of the same size is another shape and is not matched. Reserved writers are created in the title's initial layout, while page mappings use the existing mapping path; a refused create (reserved volumes require tiled resources tier 3) falls back to the original resource path.cast_list: a volume reader at a volume writer's address gets a whole-volume view on it; a 2D array of the same size is not matched.samples_volumesquery gating and adapter-cache behavior are covered byvolume_support_is_only_queried_for_r32_uav_volume_writersandvolume_format_support_is_queried_once_per_device_including_failure.gpu/recomp/runner/cast_tests.rs: the GPU route test also runs a 128x128x8 volume, committed and reserved, written as R32_UINT through a 3D UAV and read through an R9G9B9E5 3D SRV, every texel compared with a CPU decode. A device that cannot make such a texture says so and skips that route.cast_list.rs, 209 in the GPU route test.Tested
76756152ba5fbe6d1783563cf76ffe3c2e59e201, based on main1c8b551475e1e7bfe48f94448492a4c3544a2e0f, with current #3281 and #3340 commits beneath #3491.76756152, RTX 3090 VM, driver 621.24,XCL_NETWORK=0:cargo test -p xcl --lib -- volume_support --nocapture --test-threads=1passed 1/1;cargo test --workspace --no-fail-fast -- --test-threads=4(with the runner's threeuma_driverskips) reported 2,922 passed, 5 failed, 51 ignored; the lib binary completed without a crash. The five failures also fail on main1c8b5514(main 2,901/5/51):placed_title_textures_share_vram_and_preserve_pixels, the threestream_recheck_*tests, andtest_title_runs_and_game_folder_is_untouched. The 28 capability skips were 22 no wave64, 2 no heap windows, and 4 no debug layer.f55b4698, the focused R32_UINT/R9G9B9E5 route test passed 1/1 andcast_testspassed 2/2 on the same VM.5e4becfb(before this rebase):cast_tests2/2; 2D and 128x128x8 volume routes were bit-exact for committed and reserved resources, with no debug-layer errors or device removal.5e4becfb, not this rebased head. No retail-title smoke has run on76756152; the blocks below are from5e4becfb.Regression run
The smoke blocks below are from prior head
5e4becfb, before the rebase. Both runs leftXCL_CAST_LISTunset; no retail-title smoke has run on final head76756152.RTX 5090 32 GB, driver 621.40, the retail title, 600 s each,
scripts/smoke.ps1with preparation off (XCL_PREPARE=0), each run starting from its own copy of the same translated cache (made bymain). Both runs used this machine's usual settings (XCL_UMA_WINDOWS=16,XCL_UMA_DRIVER=mixed:1536:1792,XCL_COHERENT_MB=4095,XCL_HUGE_PSO_CONCURRENCY=3) and leftXCL_CAST_LISTunset (off, as by default), so this pair shows the default path unchanged.Neither run reached the world in its 600 s (shader compiles ran to the end): the pair shows boot and loading with no device removal and a peak commit at 104.0 % of
main's; its frame counts are presents of the title's first screens and say nothing about speed.main9dfbe3ea:this head
5e4becfb:Not tested
XCL_CAST_LIST=1: whether the character is lit with this (not run yet).AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:12:35Z.
Review (head
5e4becfb, diff read, not a merge-check; draft, stacked on #3340 -> #3281, so this covers5e4becfb):d427662e,7233f964), while #3281 is now050e44a3/ddd5c6ca, which addplacements::current(); #3340 and this PR need rebasing.for_writer(cast_list.rs~157),samples_volumes(dev)(a CheckFeatureSupport call) runs for every TEXTURE3D before the format and UAV checks; checking R32_UINT and UAV first would make it ask only for writers, as its doc says.standin::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, which the description lists as failing on main too.Fine: this commit is about 186 lines and does nothing without
XCL_CAST_LIST=1. A volume writer is made with CreateReservedResource2 with [R32_UINT, R9G9B9E5_SHAREDEXP] in layout COMMON after relaxed casting and ID3D12Device10 are checked; a refused create falls back.Shapeincludes the dimension, so a 2D array of the same size isn't matched. There's a unit test and a texel-exact GPU test.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:04:08Z.
Triage (#1607) – head
5e4becfStacked on #3340 (and #3281 under it); its own commit only extends
cast_list.rsto TEXTURE3D writers and readers, plus the GPU route test. The overlap with #3340, #3281 and #3282 comes from that stack.No problems found in the top commit:
for_writerchecksFORMAT_SUPPORT1_TEXTURE3Dfor R9G9B9E5 first,keep_readerkeeps 3D readers, andwhole_viewmakes a Texture3D SRV, with a unit test that a 2D array of the same size is not matched. CI is red on this head.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T00:35:53Z.
Follow-up review (head
f55b4698, since5e4becf, diff read, not a merge-check; draft, checks red):b8b634e7,3a4b971f) and #3340's commit (010007f2, same patch as #3340's8a2d7518); onlyf55b4698belongs here. #3340's own branch still sits on #3281's old commits.samples_volumesasked for every TEXTURE3D: still open.cast_list.rs~182 still calls it before theR32_UINTand UAV checks, with no per-device cache, though its doc (~164) says it is asked only at a volume writer's creation.CreateReservedResource2fails, a warning is logged and the texture is made as onmain(vram.rs~2533-2548), so the volume never gets the cast list there.New:
5e4becfb, whose base made the writer in layout COMMON and settled it on the tile queue. At this headvram.rs~2533 creates it directly inlayout_of(state)(e.g. UNORDERED_ACCESS), and the GPU test makes it in UNORDERED_ACCESS (cast_tests.rs~236), the setup the previous head's own notes said gives debug-layer error 1350 and a hung device on the 5090 (5e4becfbcast_list.rs~14-16). Nothing was run onf55b4698, andPR descriptionis red for the missing smoke block.5e4becfb"this head".cast_tests.rs~236-368 changes the 2D texture's creation layout from COMMON to UNORDERED_ACCESS, drops the COMMON-to-UNORDERED_ACCESS barrier and adds later unbarriered reads; that tests #3340's behaviour, not volumes.move_tex(~185-196) says it sends states "throughcast_list::widen_state" but has its own copy of that logic, so it will not follow the runtime ifwiden_statechanges.Fine: the own commit is about 250 lines and changes nothing without
XCL_CAST_LIST=1;Shapeincludes the dimension, so a 2D array of the same size does not match a volume;whole_viewmakes a Texture3D SRV with the writer's mip count; the volume GPU test's indexing is consistent and it skips devices without R9G9B9E5 volume sampling or tier 3.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-02T01:10:40Z.
@Foniass thanks for the follow-up. Fixed on
76756152ba5fbe6d1783563cf76ffe3c2e59e201:samples_volumesis now reached only for R32_UINT UAV Texture3D candidates, and its positive or negative result is cached by adapter LUID. The unit tests cover both the eligibility gate and cached failure/success.Tested (RTX 3090 VM, driver 621.24,
XCL_NETWORK=0):The five suite failures are the same as main on this VM:
placed_title_textures_share_vram_and_preserve_pixels, the threestream_recheck_*tests, andtest_title_runs_and_game_folder_is_untouched. Reserved-volume behavior on devices below tiled-resources tier 3 is unchanged and remains a separate limitation.AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T01:16:14Z.
Follow-up review (head
76756152, sincef55b4698, diff read, not a merge-check; draft, checks red):samples_volumesasked for every TEXTURE3D: fixed.light_writer(cast_list.rs~181-189) checks R32_UINT and the UAV flag before asking about volumes, andcached_volume_support(~175) keeps the answer per adapter LUID, negative ones included, with two unit tests.76756152, but the smoke pair is still from5e4becfb(whose base made the writer in COMMON), soPR descriptionstays red; the only debug-layer-clean run of the UNORDERED_ACCESS-layout path is still none on this head.5e4becfb.vram.rs~2535-2549 falls back as onmain).cast_tests.rs~236-368;move_tex~185-198 keeps its own copy ofwiden_state).New:
76756152only reworks the volume checkf55b4698added; it should be squashed into it, orf55b4698lands with the uncached query before the format checks.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.