Repository navigation
Sync with upstream omonkeyz/xbox-emulator main (f89e410) - #33
Open
fffluffy-dev wants to merge 148 commits into
Open
fffluffy-dev wants to merge 148 commits into
fffluffy-dev wants to merge 148 commits into
Conversation
…al device is created
…fore the first test device Fixes the 22-29 single-process d3d12_xs --lib failures from omonkeyz#157 (DXGI_ERROR_DEVICE_RESET after four tests created a device without D3D12EnableExperimentalFeatures). Confirmed 512 passed / 1 fixture-only failure with and without --test-threads=1 by MeNoSkills (RTX 4070 Ti) and on an RTX 5070. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…up); first-call logs for CL 70/74/85/86/101; cbv_raw TOMBOX_CBV_RAW auto|on|off (alias TOMBOX_CBRAW, omonkeyz#164 by GDAgent Team) + root_from_shaders through patch_blob; shared prelaunch/runtime pack key (KEY_VERSION 2, one-time recompile) + translator tag stale check; frame CSV timed flush; res_pool (TOMBOX_RES_POOL=1, default off); f861 hang capture tooling
…W-verified on 3 GPUs, no title call in fast_20261122_120610_fortnite_fn_r25_slots); Device 44 stays partial (two PC-observable placement gaps in BLOCKERS)
…s, XVMAudioService round 7, pixrt10 slots 7/8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1 outputs Xbox Series mesh shaders can launch up to 256 threads per threadgroup and export per-primitive attributes declared in PSG1 on parameter targets following the vertex OSG1 slots. Virtualize even 129..=256-thread non-LDS mesh shaders onto two passes of a 128-thread PC ms_6_5 threadgroup, parse PSG1 into ShaderExtract::prim_sig, emit per-primitive fields into SPrim, and refuse >128-thread LDS shaders and per-primitive system values.
…n Scarlett static path
…d mesh shaders with PSG1 per-primitive outputs; root Constants user SGPRs on the static Scarlett path Both change translator output only for shaders that were refused or zero-initialised before; Durango (Xbox One) translation is unchanged. omonkeyz#170's offsets come from root_param_at(), with mixed-layout and multi-parameter WARP exec tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ISA and LLVM evidence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…listeners reported Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…RIMITIVE_TOPOLOGY from mesh PSO streams; buffer atomics with SOFFSET and IDXEN+OFFEN Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…z#172 256-thread mesh, omonkeyz#176 mesh topology drop, omonkeyz#177 buffer-atomic SOFFSET); command-list PC-slot fixes (omonkeyz#175 + 37 more sites via cmdlist_wrap::pc_method); driver PSO library (TOMBOX_PSO_LIBRARY=0 off); Device 44 placement fixes (exact view copies, tiled MSAA aliasing); net_guard socket/WFP hooks; d3d12x 200/200 Co-authored-by: GDAgent Team <gdagent@protonmail.com>
…gacy stages On PC D3D12, ID3D12Device2::CreatePipelineState rejects a mesh shader PSO stream with E_INVALIDARG (error #673, CreateMeshShader_TopologyMismatch) when PRIMITIVE_TOPOLOGY (subobject 14) is UNDEFINED (0) or missing, instead of matching the mesh shader's declared output topology. Extract the output topology from the mesh DXIL PSV0 chunk (MeshInfo::topology: 1=line -> LINE (2), 2=triangle -> TRIANGLE (3)) and populate or append SUB_PRIMITIVE_TOPOLOGY (14), drop empty VS/HS/DS/GS subobjects when SUB_MS is present, and log a compact subobject summary when the PC driver rejects a stream.
…SV0, drop empty legacy stages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…z#176 update); 16 more Xbox-vtable mis-slot fixes in injected compute paths (sys_ts, ts99, cl2_state predication); PSO library totals every 10 s, worker events on the title frame, 250 ms CSV flush
…65e01 AV on module unload race) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted sessions 0x77/0x78 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the Xbox Series D3D12XBOX pipeline-stream ABI, subobject 23 is the amplification shader (24B) and 24 is the mesh shader (24B), shifted down by one from PC d3d12.h (AS=24, MS=25), while types 25..=30 are Xbox-only extension descriptors (40, 32, 64, 16, 32, 16 bytes). Normalize streams in xbox_to_pc_stream only when clearly console-numbered (containing 23, any of 26..=30, or 24 without 25); pass through PC-numbered (both 24 and 25) and basic (<=22) streams unchanged; refuse and log ambiguous streams mixing 25 with 23 or 26..=30. Log the raw subobject type list for the first 8 console stream PSOs.
…cts 25-30 from the console parse table Classify a CreatePipelineState stream as console-numbered only when it parses with the console record-size table and not the PC one (type 23, or console sizes for 25-30); a stream that parses both ways is console only when its type-24 shader is a mesh shader by PSV0 stage, PC when it is an amplification shader, and refused otherwise. PC Agility types 26-29 (DEPTH_STENCIL2, RASTERIZER1, RASTERIZER2, SERIALIZED_ROOT_SIGNATURE) now have PC layouts and pass through untouched. Each console extension subobject is handled from the console runtime's behaviour: 25 pixel-shader options and 28 tessellation parameters are dropped only when default and refused otherwise; 26 DEPTH_STENCIL_OPTIONS is mapped (STENCILOPVAL 0 turns INCR/DECR into KEEP, BACKFACE_ENABLE 0 copies the front-face state, differing back-face masks become DEPTH_STENCIL2 when IndependentFrontAndBackStencilRefMaskSupported) and refused for colour-on-depth bits, non-zero stencil test refs or other op values; 27 and 29 CU/wave scheduling limits and the never-read 30 pointer are dropped with that reason in the log.
… decisions; BLOCKERS for omonkeyz#168 25-30 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…size, map console subobjects 25-30 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SENT tracking; xbtp console host 169.254.66.1 local Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ested ranges, netview/WFP + socket hooks, xmem sweep race fix, msimg32 test fix, res_pool cfg
v_rcp_f32, v_rcp_iflag_f32, v_rsq_f32 and v_sqrt_f32 were lowered to host math (1.0 / x, rsqrt, sqrt) and the ISA sweep accepted them within 1 ulp. They now return what RDNA2 hardware (gfx1036) returns on every input that was recorded: every mantissa of [1, 4) and a 2^20-input sweep over the whole 32-bit range, in both denormal modes. v_rcp_f64 / v_rsq_f64 / v_sqrt_f64 expose the transcendental unit's internal value before rounding, and the f32 result is that value minus 2^-27 rounded to 24 bits. From those outputs the datapath was recovered exactly: per table segment a cubic c0 + c1 t + S (c2 + c3 t) with S = ((t >> k)^2) >> 10, c1 t held with a 24-bit significand, the coarse sum rounded to 2^-29, c3 t quantized in steps of 2 and H S held with a 24-bit significand, all ties to even. 32 / 64 / 32 table rows (rcp / rsq / sqrt) reproduce every f64 and f32 output. Denormal inputs and results are flushed whatever MODE says; NaNs pass through unchanged. crate::trans32 holds the integer model and emits the same algorithm as HLSL (tb_t32, int64 only). trans32::tests checks the model against digests of the recorded hardware results; exec_mem::trans32 runs the translated shaders on WARP over every mantissa of [1, 2) (rcp) or [1, 4) (rsq, sqrt) plus the whole-range sweep; the ISA sweep compares these mnemonics exactly. TOMBOX_XS_F32_NATIVE=1 restores the host math, like TOMBOX_XS_F16_NATIVE. tools/rdna2-hwprobe/trans32_solve.cpp derives the tables from probe data and trans32_gen.py writes them with the digests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xsrj8HzdWhzzYYavNNpHjk
v_log_f32, v_exp_f32, v_sin_f32 and v_cos_f32 were lowered to host math (log2, exp2, sin/cos of 2*pi*x) and accepted within 2-4 ulp. They now go through tb_t32 like rcp/rsq/sqrt and return what RDNA2 returns. The models are ported from AMD rocjitsu (ROCm/rocm-systems, MIT, notice in trans32/LICENSE-rocjitsu.txt), which was fitted to RDNA3/4 captures. Compiled unchanged, those models reproduce every gfx1036 result recorded here: 25 complete 2^23-input ranges chosen to reach every branch (near one for log, the small-input sine path, large arguments, both signs) and the 2^20-input whole-range sweep in both denormal modes. Denormal mode 0 equals mode 3 with inputs and results flushed, which the existing MODE wrapper already applies. trans32::tests now checks all eight ops against digests of 41 recorded ranges and 16 whole-range sweeps; exec_mem::trans32 runs the translated shaders for all eight on WARP; the ISA sweep compares them exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xsrj8HzdWhzzYYavNNpHjk
v_rcp_f64, v_rsq_f64 and v_sqrt_f64 were host double math (1 / x, 1 / sqrt, sqrt) and the ISA sweep accepted them within 2^29 ulp. On RDNA2 they are the f32 transcendental unit's ~35-bit internal value, written to the double unrounded, so they differ from host math in almost every bit below 2^-35. They now go through tb_t64 and return what gfx1036 returns on every recorded input. The unit reads the top 29 mantissa bits, so the f32 datapath sees a 24-bit t: the linear term uses all of it (except rsq table entry 31, which ignores the top two extra bits), the cubic coefficient its top 20 bits as rne(M * (TH + 1) / (4 Dn)) (2 Dn for sqrt), the square term the same 17 bits as f32. That cubic form is also exact for f32, so the tables drop the per-row phi of the old floor form. Denormal inputs are normalized and results exact in mode 3 (flushed in mode 0, by the existing MODE wrapper); rcp and even-exponent rsq return the power of two minus one ulp when only the ignored low mantissa bits are set, and rcp the power of two plus one ulp for an all-ones mantissa; exact powers of two are exact for rcp/rsq and one 2^-26 step high for sqrt. The model reproduces 723,517,440 recorded f64 results (whole-range sweeps in both modes, every [1, 4) mantissa for all 32 values of the low-word bits that reach the datapath, both mantissa corners for every low-bit pattern). trans32::tests checks digests of 78 of those records; exec_mem::trans32 runs the translated shaders on WARP over 45 cases of 2^20 inputs; the ISA sweep compares both dwords exactly; vector_f64 now expects the hardware's sqrt of powers of two. TOMBOX_XS_F64_NATIVE=1 restores the host math. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xsrj8HzdWhzzYYavNNpHjk
…ffsets; ww_heap 4-slot limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…z#225, XGameSave slot logging) The code of these commits shipped in the r32g release commit 6a1a4b1. This merge keeps the original commits and their authors in history; the tree is unchanged. Known test-order issue on this tree: xmem hooks::ww_heap_tests::title_heap_imports_serve_large_blocks_from_watched_memory fails under --test-threads=1 because it reads HeapAlloc through an IAT slot an earlier heap test patched. Fixed in r32h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An added line in crates/compat/**/*.rs that declares a usize or u64 const from a hex literal with 6 or more significant digits is rejected, matching the push_status publish gate. Unit tests cover the RVA rule and the existing Rust comment-line rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leading zeros are ignored. 16-digit magics, masks and handle tags pass; title RVAs below 4 GB are still rejected. Matches the push_status rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Fortnite section still headed 'System functions: 33 of 671 unfinished' with the run-35 list. tools/progress/summary.json now reports system_functions 671/671, and every entry in that list has an implemented or forwarded row in the generated docs/LIBRARY_MAP.md: xmem XMemTransferMemory and XMemFreePhysicalPages (xmem.dll 36 console-only exports, 36 covered), d3d12_xs D3D12XboxSetProcessDebugFlags (implemented 0x1010 semantics, 7b2f86d), XAudio2_9 ordinals #1/#2/#4/#5/#6 (map_exports.txt, 7b2f86d), AcpHal 6/6, MFPlat.DLL and MFReadWrite.dll through the compat forwarders (7b2f86d). Not re-verified: no title run was made, so the run-35 note that 14 MFPlat source-reader functions have no in-game call yet is kept. The compat crates cannot be built on this host (no dlltool), so their tests were not re-run; the test names cited are greps of the current source. (cherry picked from commit 93451a0)
…SV0 v1 gap stays open The 'RDNA2 instructions held at yellow' section said the 4 amp.rs tests fail because the as3/ms3 fixtures carry PSV0 v1. Since 1fc8683 all four are gated with #[cfg_attr(not(tombox_fixtures_console_xsc), ignore = ...)], and build.rs sets that cfg only when analysis/shaders/console_xsc/ {as2,as3,ms3}.dxbc exist, so on a tree without the fixtures they are ignored, not failing: `cargo test --locked --release -p tombox-xshader --test amp` prints "test result: ok. 0 passed; 0 failed; 4 ignored". Dropping the cfg_attr from console_as_fixture_uses_the_decoded_ring_abi makes the same command fail with "missing fixture ...as3.dxbc". The entry is marked UPDATE, not closed: where the fixtures are present the PSV0 v1 thread-group-size gap is unchanged (not re-verified here, no dump), and the original remedy is kept. (cherry picked from commit 19da731)
…system-function list and tests/amp.rs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…act values kept in local notes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts moved to local JSON, MUBUF d16 (omonkeyz#235)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sus, Symbols.bin resolution for GDK hooks, XAsync return codes (omonkeyz#266)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ios) The emulated XAsync now returns the same HRESULTs as Microsoft's libHttpClient AsyncLib.cpp (MIT), and the six scenarios below are removed from the DIFFERS table of gdk_xtaskqueue_conformance. - verify_global_queue: XAsyncBegin on a block with no queue while no process queue is set returns E_NO_TASK_QUEUE and leaves that status in the block (AllocStateNoCompletion / AllocState). - verify_begin_after_terminate: XAsyncBegin on a queue whose termination has started returns E_ABORT, as XTaskQueueSuspendTermination does in AllocStateNoCompletion (TaskQueue.cpp SuspendTermination / VerifyNotTerminated). - verify_failed_begin_completes: when the provider's Begin op fails, XAsyncBegin completes the call with that HRESULT and returns S_OK, so the completion callback runs (XAsyncBegin). - verify_cant_schedule_twice: a second XAsyncSchedule before the worker callback has run returns E_UNEXPECTED; the flag is cleared when the worker runs (XAsyncSchedule workScheduled, WorkerCallback). The worker only acts on the call it was scheduled for. - verify_failure_in_do_work: DoWork returning a success code without XAsyncComplete completes the call with E_UNEXPECTED (WorkerCallback). XAsyncRun's provider now calls XAsyncComplete with the work result itself, as the reference XAsyncRun does. - verify_result_buffer_checks: XAsyncGetResult with a null buffer for a call with a payload returns E_INVALIDARG, checked before the size (XAsyncGetResult); XAsyncGetResultSize writes 0 for a pending or failed call (XAsyncGetResultSize). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit d85b9fd)
The code shipped in r32i (377a22a), which passed its full-boot Trackmania gate; this merge adds the commit with its author and the THIRD_PARTY/CREDITS line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rst-use log, per-mip pass capture, exact-start alias census, XAsync pending-Begin fix, full-boot harness offline handling
…4 redirected file APIs, v_fract special values
The RDNA2 GDS wave-ops entry still listed ds_gws_init, ds_gws_sema_v and ds_gws_sema_br as translator refusals. They were lowered in 9584ffa (2026-11-22). Each is one wave-uniform counter update in hlsl/gds.rs emit_gws_counter: the first active lane per guest wave (InterlockedMin over the thread id) does one InterlockedExchange (init, S1) or InterlockedAdd (sema_v +1, sema_br +S1) at M0[31:16] + simm in the 64-resource GWS table, masked to 12 bits (gfx103 register definition, Mesa, credited in THIRD_PARTY/CREDITS for omonkeyz#134). Non-compute stages, groups that are not wave32, more than 64 z groups, control flow and a simm outside 6 bits are named refusals. ds_gws_sema_p, ds_gws_sema_release_all and ds_gws_barrier still refuse with the cross-group wave-sync text; the entry now separates them. tools/progress/data/mnemonics.txt still has 0 uses of any ds_gws_*. Tests, WARP, 2026-11-23: cargo +stable-x86_64-pc-windows-gnu test --locked --release -p tombox-xshader --test exec -- --exact exec_mem::gds::<name> --nocapture, 1 passed each: ds_gws_counter_updates_once_per_guest_wave, ds_gws_concurrent_posts_preserve_all_increments, ds_gws_bulk_post_uses_first_active_lane_in_each_group, ds_gws_counter_boundaries_across_rows_and_partial_waves, ds_gws_refuses_unsupported_group_and_wait. Docs only; no code changed. (cherry picked from commit 128338f) (cherry picked from commit 7f87c8f0a139f0b1f0606773e47ab0b0c2c494ff)
…landed The CPU-writes-into-title-memory entry still said the xmem MEM_WRITE_WATCH patch was handed over, and that stage B (a dirty check at ExecuteCommandLists) was not done. Both are in 6a1a4b1. xmem now reserves XMemAllocDefault, pool granule and XMemVirtualAlloc memory through write_watch::reserve and exports TomboxWriteWatchOwner (write_watch.rs, alloc.rs, pool.rs; e67e3d4 extends it). present.rs exec_lists_x calls upload::submit_hook before the title submission; the pump re-entry guard is a thread-local, the upload work uses a ring of 16 fence-tracked allocator/list pairs with a 2 s fence wait, and another queue gets a Wait on the upload fence. Ring exhaustion re-queues the dirty subresources and logs once. TOMBOX_WW_SUBMIT=0 restores the old path. Docs only. The d3d12_xs GPU tests for this (hw_cpu_write_between_record_and_submit_reaches_that_submit_linear/_tiled, hw_a_dirty_page_with_unchanged_texels_is_not_re_uploaded) cannot link on this machine (dlltool / version.lib missing), so they were not re-run and the entry says so; the change is verified from the current source and the merged commit. (cherry picked from commit 7b12f3b) (cherry picked from commit ee16f088bac575ce7c11efadfe3f16834a6c9e65)
…nter ops and the write-watch submit hook Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/BLOCKERS.md
…scap 3D/cb dumps, XUser change/device/audio registries with real unregister-wait, gdk_multi_dll test staging fix
147 upstream commits since 1e77fcc: D3D12.x 200/200, RDNA2 813/820, console libraries 2147/2155, Trackmania boots and plays on the upstream PC, Terraria reaches its world, GPU and CPU profilers, pack keys, 64-bit image atomics, far-jump resolution, multi-pass mesh output, MUBUF d16, XUser registries. Conflicts, resolved: - hlsl.rs: Translated keeps both sides' fields (mem_user_data, mem_desc_table, uses_typed_atomic64, cb_limits, fmask); the global wave64 check runs after upstream's resolve_far_jumps; uav_ty takes upstream's uint64_t / uint element rule. - mesh.rs, gcn.rs: upstream's code, with the fork's FSSM wave size (wave_size(insns, fssm)) on the mesh paths. - gcn.rs: buffer_wbinvl1_vol now follows upstream's gl0_inv + gl1_inv lowering (the fork's gl0-only early return removed; its test updated), which upstream's isa_table test checks. - tests/opcodes.rs: the fork's image_atomic_64bit_forms_are_refused is gone; upstream translates 64-bit image atomics and tests them. - progress.json: upstream's (it lists the same 16 newly verified mnemonics) plus ds_gws_init / sema_v / sema_br, which do have passing WARP tests; gen.py regenerated the map, badges, MILESTONES, LIBRARY_MAP. - README: the fork's, with upstream's title results and numbers. - Linux portability (#1): pack_key, tests dxc_host / dxc_host_crash / msaa_dim and two DXC calls in synthetic.rs are cfg(windows); tombox_dxc_host has a non-Windows main that exits with a message. cargo test -p tombox-xshader passes on Linux; tombox-xshader and compat-common check for x86_64-pc-windows-gnu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vTZArnDeG1xtBcLprpoCq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
147 upstream commits since the last sync (
1e77fcc). Upstream's history continues from that commit, so this is an ordinary merge. Highlights:Conflict decisions
Translateduint64_t/uintelement rule, in the fork'suav_tyhelper (memdesc uses it too)buffer_wbinvl1_volgl0_inv + gl1_inv; the fork's gl0-only shortcut removed, its test updatedprogress.jsonds_gws_init/sema_v/sema_br, which have passing WARP tests. Regenerated withgen.pytombox_dxc_hostbin arecfg(windows)CI notes
d3d12_xs/src/cmdlist_wrap.rsand 8 others), as on Sync with upstream omonkeyz/xbox-emulator main (1e77fcc) #27. None come from the fork's side of the merge.rust-workspace-check: Clean clone does not build on Windows: unpublished modules, console data blobs and libopus sources #14, as before.Test plan
cargo test -p tombox-xshaderon Linux: all pass.cargo check --tests --target x86_64-pc-windows-gnufor tombox-xshader and compat-common.Generated by Claude Code