D3D12.X: CreatePlacedResource converts the clear value of a console format #1150
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1150
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1150/head"
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?
@emirduran707 on GitHub · 2026-11-24 12:34 UTC · original
emirduran707:placed-clear-value→main· +44 −0 · 1 files · 1 commits · merged 2026-11-24 15:58 UTCCreatePlacedResourcefor console code (dev_create_placed_resource_x) makes the resource from the PC's description (pc_resource_desc: console format 118 becomesR24G8_TYPELESS, 116/117R10G10B10A2, 86/115R8G8B8A8), but passed the title's optimized clear value on in the console's format. D3D12 requires the clear value's format to fit the resource's and refuses the call withE_INVALIDARGon every route: memory of its own, the retry with the PC's description, and the committed fallback.CreateCommittedResourceandCreatePlacedResourceXalready convert the clear value withpc_clear; this path now does the same, once, for all its routes.What is in it
crates/xcl/src/hle/d3d12x/real.rs: convert the clear value withpc_clearbefore the routes. GPU testgpu_placed_console_depth_target_with_clear_value: a 256x256 depth target in console format 118 with a clear value.Tested
cargo test --workspace -- --test-threads=4onf4bbf26: 742 passed, 0 failed, 41 ignored; no SKIPPED GPU testsR24G8_TYPELESSRegression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
@thehollowedone on GitHub · 2026-11-24 12:41 UTC · original
Independent NVIDIA check of
f4bbf26against47efa2e. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug.Tested. On the baseline, both the stock format-118 depth fixture and a scratch format-115 color fixture returned
0x80070057from resource creation. On the PR, both succeeded. The color target wasR8G8B8A8_UNORMand all 4,096 pixels matched after a native D3D12 clear, copy and readback. The device stayed healthy. Commands usedcargo test --offline --locked -p xcl --lib <filter> -- --nocapture --test-threads=1, with filtersgpu_placed_console_depth_target_with_clear_valueandscratch_console_format_115_color_clear_and_readback.With Graphics Tools enabled for the color fixture, the baseline logged 599 on the initial format-115 attempt and 817 on each fallback. The PR removed both 817s. It still logged 599 because the initial attempt uses the console resource description, which native D3D12 interprets as
B4G4R4A4_UNORMwithout render-target support on this device. The translated retry succeeded and the subsequent clear and copy added zero InfoQueue messages.Not tested. Retail rendering and other formats.
AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch test and drafted this report.
@DavidM1911 on GitHub · 2026-11-24 12:50 UTC · original
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
cargo test -p xcl --lib placed: 3 passed, 0 failed —placed_title_textures_share_vram_and_preserve_pixelsand friends cover the placed-resource path on the real backend.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@JoaoPauluu on GitHub · 2026-11-24 14:21 UTC · original
A regression run under Wine on Linux, on a retail title.
Tested
x86_64-pc-windows-gnu.f4bbf26as it is (merge base47efa2e) andmain47efa2e, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Twelve runs in a row,mainfirst and last, other PRs in between.Regression run
main (first run):
this PR:
The last
mainrun: 1425 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use