Verify RGBA8 render-target readback from a launched D3D12 guest #59
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!59
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/59/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?
@philip-roy-jones on GitHub · 2026-11-21 21:56 UTC · original
philip-roy-jones/graphics-guest-readback→main· +231 −0 · 2 files · 1 commits · closed without mergingLibrary / area:
d3d12_xsand themdbgtitle launcher. Adds a source-built x64 guest and its runner undertools/verify/.Exports changed (exports.txt rows): None. The guest imports the existing
D3D12XboxCreateDeviceexport from the stagedd3d12_xs.dll.Source of the behaviour: The guest uses the Scarlett command-list creation, descriptor handle, clear and copy signatures from
device_wrap.rs,heap_wrap.rsandcmdlist_wrap.rs. It clears a 4×4R8G8B8A8_UNORMtarget, transitions it toCOPY_SOURCE, copies it into a readback buffer with a 256-byte row pitch, waits for fence value 1, then maps the four bytes at (2,1). Direct3D 12 readback documentationWindows x64 verification
Tested with MSVC Rust 1.100.0 and Windows SDK 10.0.26100.0. The guest build uses an x64 Visual Studio developer shell.
Baseline on upstream main (
0fc72956f9ff742a275534c27d9e5a7a9886a0c3)The clean build passed with
compat-common/backend_dataabsent. Main already gates that dependency, so the historical 28-file failure in #31 did not reproduce. The unfiltered unit suite had 408 passes, 2 failures and 37 ignored tests.Branch (
7752a682e0ac1bdf39d0c109a850aa3fbc8417a3, same SDK and DXC)The
xhost --load-onlydiagnostic in #12 covers DLL loading. This runner builds the DLL, the tracer and the guest, then launches a fresh guest process for each color. Both runs selected Microsoft Basic Render Driver (1414:008c) through the runtime's default adapter path. The compatibility logs recorded the same device adapter LUID (0x136f5), a wrapped command list andCopyTextureRegionX. The import table identifiedd3d12_xs.dll!D3D12XboxCreateDeviceas the guest's only graphics import.ff 00 00 ffff 00 00 ff00 ff 00 ff00 ff 00 ffIn an isolated copy I forced the clear arguments to
{1.f, 0.f, 0.f, 1.f}and reranpython tools/verify/run_d3d12_guest.py. Red passed. The green guest measuredff 00 00 ff, exited 1, and the runner exited 1.The unfiltered crate suite reproduced both baseline failures. FXC rejected
uint64_tinlowered_pixel_shader_compiles_with_fxc_in_both_variants. The per-sample pixel-shader test counted 4,160 base invocations against an expected 4,096. Filtering those two tests passed 408 unit tests and both process-debug integration tests.git diff --checkpassed.cargo test -p d3d12_xspasses (two failures on both the baseline and branch, detailed above).Pull request closed