d3d12_xs tests: size the non-oversize test textures from GetResourceAllocationInfo #322
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!322
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/322/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?
@GDAgent on GitHub · 2026-11-23 19:02 UTC · original
GDAgent:fix/d3d12-tests-alias-amd-oversize→main· +15 −9 · 3 files · 1 commits · closed without mergingWhat
Tests only (
alias.rs,placed_offset.rs,title_shadow_tests.rs). No runtime change, no exports change.Three
d3d12_xs --libtests fail on every run on an RDNA2 GPU (gfx1032), single-threaded or not:alias::tests::msaa_depth_with_a_larger_pc_layout_never_overlaps_the_next_title_placementplaced_offset::tests::uneven_views_get_exact_helpers_and_msaa_shares_the_alias_heaptitle_shadow::tests::buffer_then_texture_migrates_to_one_local_heap_and_keeps_bytesThe three tests now query
GetResourceAllocationInfofor the textures that are meant to be ordinary placements and passmax(PC size, console size)as the title layout (0x4_0000for the 256x256 RGBA8 targets,0x40_0000for the 4x MSAA target inplaced_offset). On an adapter whose PC layout fits the console size nothing changes. The deliberately oversize cases (the MSAA depth inalias, the 64 KB-step MSAA target inplaced_offset) still pass the console size, sooversize_spanstays covered.Why
A bisect puts the first bad commit at
aa14bfa, which addedoversize_span: a placed texture whose PC layout is larger than the title layout gets its own heap, so its PC tail never overlaps the next title placement. Each of the three tests places a 256x256R8G8B8A8_UNORMrender target and passes0x4_0000(the console size) as the title layout. On this adapterGetResourceAllocationInforeturns0x5_0000for that texture (0x4_0000for the same texture without the render-target flag). The texture is then oversize, lands in its own heap at offset 0, and the sharing assertions fail:The placement code does what
aa14bfaintends: a title that tells us 256 KiB for a texture the PC needs 320 KiB for must not share its tail with the next placement. The tests meant these textures to be non-oversize, and on this adapter they were not.Tests
RDNA2 gfx1032, debug build,
TOMBOX_REMOVED_EXIT_MS=off, native Windows 11; not run under Proton.mainon this GPU).cargo test -p d3d12_xs --lib -- --test-threads=1: 667 passed, 1 failed, 71 ignored. The failure isxs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xs, which needs a consoled3d12_xs.dllfixture that is not available here; not touched.pr_gate.py --base origin/main: 0 problems.Not verified
0x4_0000, which leaves the arguments exactly as before.@omonkeyz on GitHub · 2026-11-25 13:49 UTC · original
Applied on main in
a1d913d(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed