Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/152"
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 omonkeyz/xbox-emulator. Originally posted by QuentinDanblon on 2026-11-22T16:18:37Z.
Library / area: tombox-xshader, d3d12_xs, compat-common (GameInput)
Exports changed (exports.txt rows): none
Source of the behaviour: RDNA2 ISA, LLVM AMDGPU (gfx1013), AMD machine-readable ISA specification, Mesa and LLPC (reference only), measurements on an RTX 5090, and results measured on AMD RDNA hardware published by the Leonida project (facts only, no code).
THIRD_PARTY/CREDITSis updated in the last commit.Thanks for merging #36 and #61. This carries four of the pull requests you asked me to resubmit (#47, #49, #55, #58), rebased on
f10db75with your requests applied, plus one new change. It is a single pull request with one commit per change, so that you have one place to look. If you prefer separate pull requests, say so and I will split it. #48 is left out, the reason is at the end.No comment lines are added (PR gate run locally: 25 files checked, 0 problems). No commit message or code names a title, a game corpus or a GPL-2.0 project.
Commits
c0ebb9dtests/isa_table.rs): 17 decoder names and 5 GFX7 lowerings correctedtools/progresschange, comment lines removed. Ingcn.rstheimage_atomic_rsubrefusal sits next to the R128 / TFE / LWE refusals ofd585b947f9c1d60b726e7merged_wave_infoin s3,GS_ALLOC_REQfield widths per the ISA3526327(local allocation counts), both changes keptf14fbeedevice_wrap.rs(keepstitle_layout_sizeandres3d::note_create)560c8e7TOMBOX_PAD_XINPUT/pad_xinput,TOMBOX_PAD_KEYS/pad_keys)gamepad.rs: host changes go through the new reading history, soGetNextReading/GetPreviousReadingsee them like scripted ones (one test added). Comment lines removed,tools/dev/pad.ps1not touched2f1cfd0THIRD_PARTY/CREDITS: LLVM and AMD ISA specification lines for the opcode tables, Leonida line extended to the new vectors. Kept apart so that the code commits do not conflict on that fileFiles:
0b726e7touches onlyhlsl/mesh.rsandtests/mesh.rs,f14fbeeonlyd3d12_xs,560c8e7onlycompat-common.c0ebb9dand7f9c1d6both touchrdna2.rsandtests/exec.rs.Notes per commit
7f9c1d6(new). The vectors are results an RX 6800 (gfx1030) returned, published in the comments of Leonida's GPU test programs (GPL-3.0). Its NaN vectors were taken with the hw-oracle tool of the AnyPS5 project. Only facts are used (instruction, input bits, measured bits); encodings come fromllvm-mc -mcpu=gfx1013. 46 of the 60 cases already passed on main. The 14 others:getLit16Encoding).v_pack_b32_f16andv_cvt_f32_f16read the f32 bit pattern, OPSEL on a constant read the constant again instead of +0.0, and 1/2pi is the f160x3118.v_med3_f32with a NaN operand is MIN3 with the NaN ignored (RDNA2 ISA):med3(NaN, 7, 5)is 5, was 7.isInt<21>on GFX9+), and soffset and the immediate are each truncated to a multiple of 4 before they are added. A negative immediate without SOFFSET is refused.f14fbee(#55). The failure was first documented by the americas-recomp project (GPL-2.0). Only the behavioural fact is used, the code is independent; #55 has the context. The hardware test for your side:cargo test -p d3d12_xs --release --lib hw_rgb9e5 -- --ignored. It skips on WARP, which supports the format natively.560c8e7(#47). The one change #47 made totools/dev/pad.ps1, for when you regenerate it, was a line in the help output:host input (a real XInput pad, keyboard WASD/arrows/Space... while the title window is focused) feeds the same pad; a running script, or a scripted 'down' not yet released, masks it (compat-common pad_host.rs).Results
Run on
2f1cfd0(this branch onf10db75), Windows 11, RTX 5090,--release.TOMBOX_EXEC_HW=1)cargo test -p tombox-xshader, all targets--test exec--test isa_sweep--test mesh/centroidcompat-commonlib 33 passed (filtered on the pad, GameInput and host input tests),gameinput_ext3 passed.d3d12_xshardware tests (hw_, ignored by default): 39 passed,hw_rgb9e5_typed_uav_texture_is_substitutedincluded.d3d12_xs --lib: 482 passed, 2 failed, 40 ignored. The same two tests fail onf10db75without this branch (471 passed, 2 failed, 39 ignored):xs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xsanddevice_console_fix::tests::console_heap_properties_create_on_pc_through_every_wrapped_path. On9ab6f59, in a debug build, the first failed and the second passed, with and without this branch.Not included
#48 (XTaskQueue / XAsync conformance tests). I reran it as you asked, on
9ab6f59. The 24DIFFERSentries still hold, each run in its own process (22 fail, one does not return, one fails only under load). But the default run is not stable: with that commit alone on9ab6f59, 1 of 12 serial runs and 1 of 12 parallel runs failed, inverify_async_block_reuseorverify_simple_async_call, becauseXAsyncGetStatus(wait)returned before the completion callback had run.verify_no_write_after_get_status_racealso failed in 2 of 5 runs of the whole suite, with the async block written after the wait returned.gdk/rt.rsis unchanged since6741468. I will resubmit it when the default run is deterministic.#72, to resubmit after #41 as you said.
cargo test -p tombox-xshaderpasses on WARPNo game or console files and no binaries included
No fake success; anything not possible is left
missingwith a note🤖 Generated with Claude Code
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T16:26:19Z.
Thanks for resubmitting all of this on current main, and for the hardware-measured vectors! At about 4,800 lines across compat-common (pad host), d3d12_xs (UAV substitution, upload.rs, device_wrap) and the shader translator, it's too large to review and land as one change. Please split it into small PRs of a few hundred lines each, one topic per PR, each with its own tests:
isa_tablevectors that check them. The largegfx1013.txt/gfx7.txttables can go in with the first translator PR that uses them.uav_substchange on its own. It touches the d3d12_xs hot path, so please include its cost on a draw-heavy workload or a micro-bench.upload.rschanges on their own. Note that #146 just landed there and #153 is under review.Please keep each new THIRD_PARTY/CREDITS line with the PR that uses it.
Imported from omonkeyz/xbox-emulator. Originally posted by MiguelMatMar on 2026-11-22T17:57:07Z.
Ran this on Windows 11, MSVC, NVIDIA Ada / RTX 40-series (a second NVIDIA generation besides your RTX 5090), each tree with its own target dir.
On the branch itself (
2f1cfd0) everything passes:TOMBOX_EXEC_HW=1)--test exec--test isa_sweepcargo test -p tombox-xshader, all targetsd3d12_xs hw_rgb9e5_typed_uav_texture_is_substitutedSupport1=0x8013f0), so the substitution path really ranMerged onto main
0a9ebcd(only conflict: the Leonida / TomBox lines inTHIRD_PARTY/CREDITS, keeping both sides' additions),exec(99 passed) andisa_sweep(541) still pass on WARP and hardware, butisa_table::gcn_lowering_keeps_instructionfails:Those are the intended lowerings from #140 and #141, which landed after this branch was cut. Adding them to
gfx7_equivalentintests/isa_table.rsfixes it:With that,
isa_tablepasses 3/3 and the rest of thetombox-xshadersuites pass too (16 suites, 213 tests, 0 failed).Heads-up: against the newest main (
1e77fcc) the branch now also conflicts incrates/compat/d3d12_xs/src/device_wrap.rsandupload.rs, so it will need a rebase anyway.Imported from omonkeyz/xbox-emulator. Originally posted by QuentinDanblon on 2026-11-23T01:16:56Z.
Split as you asked, one topic per PR, each with its tests:
merged_wave_infoin s3,GS_ALLOC_REQwidths (was #58), written for the two-pass path of 256-thread shadersv_med3_f32with a NaN operandisa_tablefailure this PR had after #140 and #141. Thanks to MiguelMatMar for the run on a second NVIDIA generation and for the three equivalence lines, they are in #201 and the commit message names the source.smem_bounds.rs. Main now truncates soffset and the immediate, so that part is dropped and only the signed immediate is left: three of the RX 6800 vectors still return 0 on2eda8b0.THIRD_PARTY/CREDITSline is in the PR that uses it (#201 and #206). #202 and #203 put their tests intests/exec_vop/leonida.rs, which the existing Leonida line already covers.Still to come, as separate PRs:
uav_subst(was #55) with its cost on a draw-heavy workload or a micro-bench, then theupload.rschange on its own. Both need the GPU.Closing this one in favour of the PRs above.
Pull request closed