D3D12.X: format queries about the console's own formats (116–120) ask about their PC formats #210
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!210
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/210/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?
@RemingtonWilcox on GitHub · 2026-11-23 21:04 UTC · original
console-depth-format-queries→main· +194 −4 · 3 files · 1 commits · merged 2026-11-23 21:24 UTCA retail title asks
CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)about DXGI_FORMAT_D16_UNORM_S8_UINT (118). The PC has no such format, the answer was "unsupported", and the title stopped on its assertion (+0x14a6390, after the allocation-info assert at+0x344196had been patched around; #159, #173).CheckFeatureSupport: FORMAT_SUPPORT, MULTISAMPLE_QUALITY_LEVELS, FORMAT_INFO and PLACED_RESOURCE_SUPPORT_INFO about 116–120 ask the PC aboutdevice_x::pc_view_format's format (D24_UNORM_S8_UINT for D16S8, R24_UNORM_X8 / X24_G8 for its views, R16G16B16A16_FLOAT for the 7e3/6e4 floats). The caller's format field is put back.Tests (no game data): the format swap; on the GPU, FORMAT_SUPPORT / MULTISAMPLE_QUALITY_LEVELS / FORMAT_INFO for 118 (and FORMAT_SUPPORT for 116–120) succeed with the PC format's support and keep the caller's format; D16S8's XG planes (HTILE, 2-byte depth, 1-byte stencil); sane allocation sizes for 116–120.
Not yet checked against the console's
xg_xs.dllfor 116/117 (XCL_SAMPLE_XG). Not yet run with the title.Full
cargo test --workspaceon an RTX 3090 (driver 616.92): 577 passed, 0 failed, 39 ignored.🤖 Generated with Claude Code
@mastrr9 on GitHub · 2026-11-23 21:11 UTC · original
Independent static code audit of
31635bd10(code inspection only —cargo testnot run on macOS; no game files):Summary: Looks solid
CheckFeatureSupportformat translation (real.rs:89-118): All four gated features (FORMAT_SUPPORT,MULTISAMPLE_QUALITY_LEVELS,FORMAT_INFO,PLACED_RESOURCE_SUPPORT_INFO) haveDXGI_FORMAT Formatat byte offset0. Swapping todevice_x::pc_view_formatbeforecheck_feature_support_pcworks cleanly across both the direct call and the console-struct-size retry path, and the caller's original console format is restored unconditionally even on failingHRESULTs.xg.rs:118,title_textures.rs:79-83): Adding116 | 117 => (2, 1)matches 32-bitR10G10B10A2layout, and rejecting116 | 117intitle_textures::registerprevents 32-bit console texels from being uploaded raw into 64-bit PCR16G16B16A16_FLOATresources.title_textures.rs:78-82; keeping this PR's116 | 117guard above #211'ssmall_targetcheck ensures small 116/117 render targets stay excluded from CPU texture sync.(AI-assisted)
@Kalmarv on GitHub · 2026-11-23 21:17 UTC · original
I tested
31635bdmerged ontomain6da33fa.It doesn't merge cleanly.
real.rsconflicts becausemain(#193'ssrv_tests) and this PR both add a test module at the end of the file. Keeping both resolves it. I tested that local merge,f2b8ffa.Every query the PR rewrites gives the same answer as asking about the PC format directly. A test-only probe, not part of the PR, compared two calls for each of 116–120:
check_feature_support_x;pc_view_formatformat, sent straight to the PC device.The queries covered were:
E_FAIL(0x80004005) with no support bits.0x3110b0), and the console's extra 4 bytes are zeroed, as the doc comment says.Tested
f2b8ffa(31635bdonto6da33fa).console_formats_are_asked_as_the_pcs,d16s8_is_planar_depth_and_stencil,console_floats_are_32_bitsandmain'sa_cube_view_becomes_the_cube_array_of_one_cube: 4/4 pass.hle::xg::andtitle_texturestests: 3/3 and 3/3 pass.gpu_console_depth_formats_are_supportedandgpu_console_format_allocation_info_is_sane2/2 pass; the probe agreed on 75 of 75 queries.Not tested
xg_xs.dll;38b05b7(I tested only the merge).AI use: Claude Code, Claude Opus 5.5
@ivall on GitHub · 2026-11-23 21:24 UTC · original
Merged (main
d4f17ca). Checked on an RX 9070 (RDNA4) with 11 PRs merged together on mainaf20b4b:cargo build --workspace && cargo test --workspace -- --test-threads=4- 605 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed; and the retail game still reaches its first menu at 30 fps (720 draws per 2 s). The merge conflicted with #211 intitle_textures::register(your 116 / 117 refusal is kept before #211's small-target check) and with #149's test module inreal.rs(both kept).