Commit Graph

5744 Commits

Author SHA1 Message Date
62b410e756 gta6rt: emulate the Zen 2 instructions a desktop CPU may lack (INSERTQ/EXTRQ, CLZERO, MONITORX/MWAITX, CLWB)
The executable uses SSE4a INSERTQ, CLZERO and MONITORX/MWAITX (AMD only) and CLWB (Intel since Ice Lake)
without asking CPUID (docs/cpu_features.md). A host without one raises #UD there. src/cpu_emulation.h adds
a vectored handler that recognises those encodings at the faulting RIP, does the same work on the CONTEXT
and steps past the instruction; gta6rt installs it before any image code runs, after the startup trace's
handler so it runs first. One [rt] line names what the host lacks, one more per instruction on first use.

cpu_emulation_test checks the decoder on hand-written encodings, the bit-field helpers and apply() on a
synthetic CONTEXT, then runs every form for real from an executable buffer: natively on a Zen host,
through the handler on an Intel one, with the same expected values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:57:59 +01:00
e22994464b d3d12_xs: Xbox device slot 61 is CreateSamplerX, routed to the PC CreateSampler
The retail title calls device slot 61 as CreateSamplerX(desc, dest handle), once
per sampler, after its descriptor heaps exist (stop 20 of the RT-5 boot
measurements in the coordination issue). The generic thunk forwarded it to the
PC slot 61, which is CreateMetaCommand, so the sampler was never written.

Slot 61 now has its own handler, like 62 and 67. It passes the description's
PC D3D12_SAMPLER_DESC prefix and the handle to the PC CreateSampler (slot 22).
That was enough to get the title past this call under Wine. Whatever follows
the prefix in the console description is not known and is not read. A null
description is skipped and logged once. A handle in the title's own heap range
is #7021's translation.

xs_proxy_mock_test: slot 61 reaches the mock's slot 22 with the same two words
and never its slot 61; a null description reaches nothing. With main's
d3d12_xs_device.cpp the new check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:57:30 +01:00
802ed3caa7 docs/testing.md: which Known problems rows the game's shaders reach (op_reach --fssm, name patterns) (#6818)
Squash-merged after diff review of PR #6818 - docs/testing.md: which Known problems rows the game's shaders reach (op_reach --fssm, name patterns)
2026-11-23 09:57:25 -06:00
c7ca0f2d1c d3d12_xs: device slot 25 gives the PC device clean resource descriptions (RT-5 stop 16)
The title's descriptions carry the Xbox layout word and flag bits above the PC ones. Slot 25 now passes a copy with PC flags and a PC layout; the title's array is not written. Depends on #7078.
2026-11-23 16:56:52 +01:00
28a35da41d awc_shorts: reject banks that share an export folder (#6775)
Squash-merged after diff review of PR #6775 - awc_shorts: reject banks that share an export folder
2026-11-23 09:56:30 -06:00
513294b80b shader_ir: read LLVM 23's lit(V) operand as the constant V (#6808)
Squash-merged after diff review of PR #6808 - shader_ir: read LLVM 23's lit(V) operand as the constant V
2026-11-23 09:56:26 -06:00
f20e99a528 Merge main 108c36ef7 into #6954
Slot 48 goes through proxy_create_command_queue_xbox (filtered 16-byte prefix) via main's
queue_x route; the explicit slot 48 branch and the duplicate note_slot are gone. The
slot-48 header, slot name and tests follow, and device_proxy_test passes a 32-byte desc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:56:08 +01:00
3e25531253 docs/README: index modding.md, ped_catalogues.md and strand_grooms.md (#6826)
Squash-merged after diff review of PR #6826 - docs/README: index modding.md, ped_catalogues.md and strand_grooms.md
2026-11-23 09:55:40 -06:00
4074b209c7 docs/saves: the import line names --with-packed, which imports the packed SLAYER1 copy too (#6848)
Squash-merged after diff review of PR #6848 - docs/saves: both import usage lines name --with-packed, the flag that imports the packed SLAYER1 copy (EGEN-SAVES-WITHPACKED-DOC)
2026-11-23 09:54:22 -06:00
5c8da784be docs/pipeline_check: the checker times each pipeline, so a stall is measured, not a lower bound (#6811)
Squash-merged after diff review of PR #6811 - docs/pipeline_check: the checker times each pipeline, so a stall is measured (EGEN-PIPECHECK-SLOW-TIMER)
2026-11-23 09:53:32 -06:00
44aae3e172 docs/design: name the opt-in --opt pass, tools/spirv_opt.py, and its measured size drop (EGEN-OPT-DOC) (#6831)
Squash-merged after diff review of PR #6831 - docs/design: name the opt-in --opt pass, tools/spirv_opt.py, and its measured size drop (EGEN-OPT-DOC)
2026-11-23 09:52:57 -06:00
e1b51bf95c Exercise bounded integer 2D texel fetches in the pixel sweep (#6785)
Squash-merged after diff review of PR #6785 - Exercise bounded integer 2D texel fetches in the pixel sweep
2026-11-23 09:52:44 -06:00
3e5596bf4b Convert exported music cue sheets to per-channel Audacity labels (#6819)
Squash-merged after diff review of PR #6819 - ASSET-576: Convert exported AWC music cues to per-channel Audacity label tracks
2026-11-23 09:52:32 -06:00
8897855399 d3d12_xs: device slot 25 pads a render target to whole console tiles (RT-5 stop 17)
The retail title asserts when its first full-screen render targets leave more than 2 MiB of a fixed budget unused (docs/retail_boot_chain.md, #6982). The PC size is about width x height x element bytes; the console takes whole RDNA2 SW_64KB tiles. Slot 25 adds the difference per render target description and never lowers a size. Depends on #6973.
2026-11-23 16:52:16 +01:00
05b8a67a96 spirv_gs_to_compute: reject OpEmitVertex in a loop header before OpLoopMerge (SHADER-617) (#3319)
Squash-merged after diff review of PR #3319
2026-11-23 09:52:12 -06:00
5dc7bb38be rdna2spirv: global_atomic_csub and buffer_atomic_csub (#3193)
Squash-merged after diff review of PR #3193
2026-11-23 09:51:49 -06:00
ee56bf9335 runtime: a timed condition-variable wait releases its mutex on Wine 9 (#6847)
Squash-merged after diff review of PR #6847 - runtime: a timed condition-variable wait releases its mutex on Wine 9
2026-11-23 09:51:06 -06:00
e0a8293fa7 rdna2spirv: s_bfm_b64 in wave32 code is 64-bit data, not a lane mask (#6809)
Squash-merged after diff review of PR #6809 - rdna2spirv: s_bfm_b64 in wave32 code is 64-bit data, not a lane mask
2026-11-23 09:50:13 -06:00
77247b699a docs: clarify AWC manifest duration units (#6854)
Squash-merged after diff review of PR #6854 - docs: clarify AWC manifest duration units
2026-11-23 09:49:10 -06:00
9f0ebbb3c8 docs/design.md: drop merge leftovers in two contract rows (#3145)
Squash-merged after diff review of PR #3145
2026-11-23 09:49:01 -06:00
0a8a5522f9 Invalidate previous music cue regions before a bank re-export (#6867)
Squash-merged after diff review of PR #6867 - Invalidate previous music cue regions before a bank re-export
2026-11-23 09:48:53 -06:00
e929f531fc docs/design.md EXEC row: one copy of each measurement sentence, not three (#6893)
Squash-merged after diff review of PR #6893 - docs/design.md EXEC row: one copy of each measurement sentence, not three
2026-11-23 09:48:32 -06:00
2c76ce6e3e shader_validation: name tools/spirv_asm.py, the stdlib SPIR-V assembler (EGEN-SPIRVASM-DOC) (#6888)
Squash-merged after diff review of PR #6888 - shader_validation: name tools/spirv_asm.py, the stdlib SPIR-V assembler (EGEN-SPIRVASM-DOC)
2026-11-23 09:47:43 -06:00
b721585aae Merge remote-tracking branch 'origin/main' into exe/import-fail-fast
# Conflicts:
#	docs/README.md
2026-11-23 15:47:22 +00:00
12a8a7adee psin_data: a lone file without the PSIN magic is refused, not reported as 0 files (EGEN-PSINDATA-NOT-PSIN) (#6841)
Squash-merged after diff review of PR #6841 - psin_data: a lone file without the PSIN magic is refused, not reported as 0 files (EGEN-PSINDATA-NOT-PSIN)
2026-11-23 09:47:16 -06:00
07f1d7e8d8 world_lights_paths: compare duplicate light definitions by value (#6887)
Squash-merged after diff review of PR #6887 - world_lights_paths: compare duplicate light definitions by value
2026-11-23 09:46:27 -06:00
7c8aa0c0b0 shader_link_check: select entry points for individual stages (#6857)
Squash-merged after diff review of PR #6857 - shader_link_check: select entry points for individual stages
2026-11-23 09:46:11 -06:00
a3db25c749 docs/shader_validation: name tools/f64_omod_probe.py and its measured omod gate (#6904)
Squash-merged after diff review of PR #6904 - docs/shader_validation: name tools/f64_omod_probe.py and its measured omod gate (EGEN-F64OMOD-DOC)
2026-11-23 09:46:07 -06:00
e6515ea41d runtime: xapu.dll and chad.dll shims, connections that succeed with an empty result queue
The executable's ten APU and audio DSP imports (one call site each, four for XApuEnqueueCommand) now bind to runtime/shims/xapu_chad.cpp instead of the unimplemented thunk. Both connects return a handle; the APU connect also returns a zeroed shared buffer. Commands are accepted and dropped, the result count is 0 and dequeuing fails. xapu_chad_test calls all ten in the call-site shapes.
2026-11-23 16:45:35 +01:00
103e464415 navmesh_index: count each path once for recursive globs (#6890)
Squash-merged after diff review of PR #6890 - navmesh_index: count each path once for recursive globs
2026-11-23 09:45:34 -06:00
1e431dfa94 runtime: AcpHal.dll shim, the audio heap with a 32-bit address mapping and a no-op hardware object 2026-11-23 16:45:34 +01:00
cc26796455 xg_xs: serve XGCreateTextureComputer and XGSuggestSwizzleMode as traced E_NOTIMPL 2026-11-23 16:45:24 +01:00
bc773d3073 rdna2spirv: v_pk_mul_lo_u16 forms each half as ((x << 16) * y) >> 16 (#6836)
Squash-merged after diff review of PR #6836 - rdna2spirv: v_pk_mul_lo_u16 forms each half as ((x << 16) * y) >> 16 (AMD driver drops the mask)
2026-11-23 09:45:17 -06:00
5f47ed2b39 docs/audio: document hashdict.py --lookup, the reverse name lookup (#6912)
Squash-merged after diff review of PR #6912 - docs/audio: document hashdict.py --lookup, the reverse name lookup (EGEN-HASHDICT-LOOKUP-DOC)
2026-11-23 09:44:48 -06:00
cb168f4647 rbf0_tree: identify source files in the flat node CSV (#6886)
Squash-merged after diff review of PR #6886 - rbf0_tree: identify source files in the flat node CSV
2026-11-23 09:44:43 -06:00
85daaa1bb1 cpu_feature_scan: list the CPU instructions an x64 image needs that a desktop CPU may lack
The runtime runs the Xbox Series (Zen 2) executable natively, so an instruction the host CPU lacks raises #UD
where it is reached. tools/cpu_feature_scan.py streams dumpbin /disasm like inline_scan.py, maps each
instruction to its CPUID feature or privilege class (AMD-only, newer-Intel-only, not on Zen 2, privileged,
kernel call, host query, baseline), and splits the counts by .pdata range.

docs/cpu_features.md records the 1.0.2.1 result (counts only): 19 SSE4a, 10 CLZERO and 4 MONITORX/MWAITX
sites (AMD only) and 8 CLWB sites, all real code; the privileged hits are jump-table data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:44:42 +01:00
413ffd6eb2 test(image-fuzz): exercise noncontiguous masks by default (#6894)
Squash-merged after diff review of PR #6894 - test(image-fuzz): exercise noncontiguous masks by default
2026-11-23 09:44:21 -06:00
4ce16cd58e rdna2spirv: a wave32 pixel shader reads its descriptor index from a running lane of its half, not lane 0 (SHADER-1016, the #4225 RDNA1 regression) (#6898)
Squash-merged after diff review of PR #6898 - rdna2spirv: a wave32 pixel shader reads its descriptor index from a running lane of its half, not lane 0 (SHADER-1016, the #4225 RDNA1 regression)
2026-11-23 09:44:13 -06:00
ea43b08265 docs/design: drop the extra copies of two d16/f16 sentences (merge splice) (#6920)
Squash-merged after diff review of PR #6920 - docs/design: drop the extra copies of two d16/f16 sentences (EGEN-DESIGN-D16-DUP)
2026-11-23 09:43:35 -06:00
a66e6e30d3 docs/shader_validation: f32_fuzz has no Vulkan oracle, so drop it from the --oracle hw,vk section (EGEN-DOCS-F32-FUZZ-VK) (#6911)
Squash-merged after diff review of PR #6911 - docs/shader_validation: f32_fuzz has no Vulkan oracle, so drop it from the --oracle hw,vk section (EGEN-DOCS-F32-FUZZ-VK)
2026-11-23 09:43:28 -06:00
b90a2ce741 docs/audio: the naming table's second column is what awc_names counts, distinct bank/ID pairs (#6906)
Squash-merged after diff review of PR #6906 - docs/audio: name the naming table column for what awc_names counts (EGEN-AWCNAMES-ID-PAIRS-DOC)
2026-11-23 09:43:16 -06:00
23e9c9535d d3d12_xs: say what is known about slots 25 and 43
AI-assisted.
2026-11-23 16:42:53 +01:00
2dbcb882c9 d3d12_xs: route the public HLE's Xbox device slots 48/73/78/79/80 (#6935)
Squash-merged after diff review of PR #6935 - d3d12_xs: route the public HLE's Xbox device slots 48/73/78/79/80
2026-11-23 09:42:42 -06:00
167feec512 mission_tables: refuse a single named file that is not a PSIN container (#6926)
Squash-merged after diff review of PR #6926 - mission_tables: refuse a single named file that is not a PSIN container
2026-11-23 09:42:37 -06:00
c6920fe155 shader_link_check: read the batch manifest as utf-8-sig, so a Windows BOM is not a JSON error (EGEN-SHADERLINK-MANIFEST-BOM) (#6881)
Squash-merged after diff review of PR #6881 - shader_link_check: read the batch manifest as utf-8-sig, so a Windows BOM is not a JSON error (EGEN-SHADERLINK-MANIFEST-BOM)
2026-11-23 09:42:14 -06:00
f1d5105e8b saves: verify every file in a batch after individual failures (#6889)
Squash-merged after diff review of PR #6889 - saves: verify every file in a batch after individual failures
2026-11-23 09:41:50 -06:00
c6f15b1628 RT-5: import_fail_fast.py lists where the retail executable stops itself on an import's result
From the file alone, per import: the call sites that test the returned value and branch to int3, ud2,
int 29h or a call that does not return, with the value that takes that side. Call sites come from
import_call_sites.py's thunk calls plus `call [rip+slot]` for the api-ms-win-* imports; the result is
tracked through mov/movzx/movsx copies and cdqe, and each side is followed through up to two jumps.

On the retail 1.0.2.1 executable: 515 imports called, 27 with a fatal result check, 78 sites.
docs/exe_fail_fast.md groups them by how main binds each import: XMemVirtualAlloc stops on NULL at 14
of its 23 sites, and the unbound xmem physical-page imports stop on the default return of 0 at 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:41:05 +00:00
74eb264a79 RT-5: the retail executable maps under gta6rt --dry-run, with 30 unimplemented imports in seven Xbox-only DLLs (#6715)
Squash-merged after diff review of PR #6715 - RT-5: the retail executable maps under gta6rt --dry-run, with 30 unimplemented imports in seven Xbox-only DLLs
2026-11-23 09:40:32 -06:00
936675b975 d3d12_xs: appendix A.4 names the one claim from the executable; wrap two comments
AI-assisted.
2026-11-23 16:40:19 +01:00
399fa98016 docs/design.md: one copy of the Mesa llvmpipe out[5] sentence in the Float controls row (#6852)
Squash-merged after diff review of PR #6852 - docs/design.md: one copy of the Mesa llvmpipe out[5] sentence in the Float controls row (EGEN-DESIGN-FLOAT-DUP)
2026-11-23 09:40:18 -06:00