Commit Graph

5744 Commits

Author SHA1 Message Date
175dc3f2da Merge branch 'pr2490' into ladder
# Conflicts:
#	runtime/shims/d3d12_xs_device.cpp
#	runtime/test/xs_proxy_mock_test.cpp
2026-11-23 18:52:49 +01:00
ec75996541 Merge branch 'pr6954' into ladder
# Conflicts:
#	runtime/shims/d3d12_xs_device.cpp
#	runtime/test/xs_proxy_mock_test.cpp
2026-11-23 18:52:17 +01:00
08a2d84d10 Merge branch 'pr6964' into ladder 2026-11-23 18:52:03 +01:00
68fc04b6d7 Merge remote-tracking branch 'origin/main' into ladder 2026-11-23 18:52:02 +01:00
5b400fead0 docs/audio_hal_exe_calls: audio init failures are fatal, and XApuConnect takes three pointers (RT-5)
A static read of the retail executable (not run). The audio init function checks ApuCreateHeap, a HAL init
routine and XApuConnect, and any failure goes to one int3: there is no path without audio. The HAL init needs
AcpHalAllocateShapeContexts to fill the fifth context pointer, ApuAlloc to give real memory, and the AcpHal
object's slots 0 and 2 to succeed. The XApuConnect row said no argument was loaded; it takes three addresses
of globals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:40:45 +00:00
eaeee26b39 xapu/chad shims: XDspActivate writes its outputs, open and close commands give results, XApuConnect leaves the title's block alone 2026-11-23 18:37:42 +01:00
2ae6fde163 Merge origin/main into fix/fma-exact-sticky
docs/design.md: main's floating-point row gained the f64 v_div_fmas_f64 sentences; this branch's tie-break,
infinite-addend and test-count edits are applied to that row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:35:03 +00:00
5734bcf840 Merge origin/main into fuzz/cvt-diff
docs/shader_validation.md: keep main's division fixup section and this branch's conversions section, one after the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:34:10 +00:00
18b0bfbaf1 d3d12: an A8 render target's castable list takes its own format and refuses the others
castable_view_formats() mapped every castable format through vulkan_format(), which has no
A8_UNORM case, so CreateCommittedResource3/CreatePlacedResource2 with castable={A8_UNORM}
failed with E_INVALIDARG ("castable format not supported yet: 65"). The resource's own format
is always viewable (create_texture adds the image's format), so naming A8_UNORM on an A8
texture is now a no-op.

An A8 render target's VK_FORMAT_A8_UNORM_KHR image is in a compatibility class of its own,
so an R8_UNORM castable entry (same texel size) would have reached its
VkImageFormatListCreateInfo. Any format other than A8_UNORM is now refused with E_INVALIDARG
before Vulkan.

The A8 gate (runtime and vk_test_device.h) also requires TRANSFER_SRC/DST, since every
texture is created with transfer usage.

d3d12_draw_test runs the A8 clear/draw/blend cases on a second target made through
CreateCommittedResource3 with castable={A8_UNORM}, and checks castable={R8_UNORM} returns
E_INVALIDARG. Without the shim change it fails with the reported message.

Reported by tupacfan04 on #7403.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:32:40 +01:00
952be9b046 d3d12: A8_UNORM textures in 1D and 3D, as the host makes them
texture_format refused every A8_UNORM texture that was not 2D, so GetResourceAllocationInfo answered
UINT64_MAX for a 1D one (a title's boot sizes a 128-texel 1D A8_UNORM texture and asserts on that size).
The host accepts A8_UNORM in 1D, 2D and 3D (the gap is listed by #4533's host sweep). They are R8_UNORM
images like the 2D ones; the SRV's alpha-only swizzle does not depend on the dimension. Format support
now names TEXTURE1D and TEXTURE3D too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:30:31 +01:00
ab03d8dd12 make_game, runtime: translate and load game_scarlett_master.exe embedded shaders 2026-11-23 18:28:36 +01:00
77fa308f9a ps_sweep: reject incomplete readbacks in cross-GPU comparisons (#6586)
Squash-merged after diff review of PR #6586
2026-11-23 11:22:49 -06:00
3ae065426b BUILD-2172: check development CLI flags against each producer (#6590)
Squash-merged after diff review of PR #6590
2026-11-23 11:21:40 -06:00
5074124359 docs/movies: keep one Audio association bullet (EGEN-MOVIES-AUDIO-DUP) (#6593)
Squash-merged after diff review of PR #6593
2026-11-23 11:20:47 -06:00
249ebb0b9a docs(i18n/es): sync index marker and disk-size notes with main 2026-11-23 11:20:29 -06:00
acccd0f1eb docs/testing: name tools/pc_checker.py as the CPU/GPU/RAM report for #166 (EGEN-PCCHECKER-DOC) (#6594)
Squash-merged after diff review of PR #6594
2026-11-23 11:20:29 -06:00
603d53eb36 ASSET-539: Preserve extra UV sets during ped assembly (#6604)
Squash-merged after diff review of PR #6604
2026-11-23 11:18:11 -06:00
57b88dec13 Merge branch 'r6582' into base-stack 2026-11-23 18:17:52 +01:00
1e03b40435 Merge branch 'pr4348' into rebase/4348-on-main
# Conflicts:
#	docs/README.md
#	runtime/CMakeLists.txt
2026-11-23 18:17:51 +01:00
028548ace5 navmesh_nodes: refuse a --out it cannot write before either archive is read (EGEN-NAVMESH-NODES-OUT) (#6608)
Squash-merged after diff review of PR #6608
2026-11-23 11:17:01 -06:00
ef9d0759d2 d3d12_xs: route console list slot 139 (Reset) to PC slot 10
Pipodi measured the retail title calling console list slot 139 with
(allocator proxy, pso) before recording — Reset, at PC slot 10. Map it
and unwrap the allocator (and a pipeline state the same way); the
unwrap now keys on the PC slot so console-10 and console-139 both land
on the real Reset.

xs_proxy_mock: PASS under Wine

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-23 10:14:43 -07:00
34969aa207 bcpack_tool: name the paths in the decode refusal as given, not their repr (EGEN-BCPACKTOOL-PATHREPR) (#6618)
Squash-merged after diff review of PR #6618
2026-11-23 11:14:33 -06:00
7761680eac audio_config: read the --names pool as latin-1 bytes, the hash joaat uses (EGEN-AUDIOCONFIG-POOL-LATIN1) (#6619)
Squash-merged after diff review of PR #6619
2026-11-23 11:14:15 -06:00
242968218a docs/testing: note KosmicKrisp nir_to_msl NaN canonicalization in cs_bvh (#6627)
Squash-merged after diff review of PR #6627
2026-11-23 11:12:31 -06:00
f6a00fc4d8 rdna2spirv: --fma khr covers the f64 FMAs (v_div_fmas_f64) with OpFmaKHR on doubles (#6635)
Squash-merged after diff review of PR #6635
2026-11-23 11:10:12 -06:00
c29ad552fb docs/fssm_crosscheck: the repro runs six tests, not four with an expected failure (#6648)
Squash-merged after diff review of PR #6648
2026-11-23 11:06:46 -06:00
0dc7f58e5e d3d12: B5G5R5A1 UAV textures are mutable R16_UINT images where A1R5G5B5 has no storage
A B5G5R5A1_UNORM texture with ALLOW_UNORDERED_ACCESS was refused on a GPU whose
VK_FORMAT_A1R5G5B5_UNORM_PACK16 has no STORAGE_IMAGE (NVIDIA): GetResourceAllocationInfo answered
UINT64_MAX and creation failed. A title's boot creates a 2560x1440 render-target + UAV one and
asserts on that size.

The R9G9B9E5 route generalizes: Format::r9g9b9e5_as_r32_uint becomes Format::uint_backed, the format
a UAV texture stored as a mutable unsigned image is viewed in (E5B9G9R9 for R32_UINT, A1R5G5B5 for
R16_UINT). For B5G5R5A1 the image is R16_UINT with {R16_UINT, A1R5G5B5} listed; its storage view is
R16_UINT in the uint class, SRVs are A1R5G5B5 sampled views, and RTVs and clears go through an
A1R5G5B5 attachment view (ResourceBinding::uint_backed lets replay's color_view_format take it). The
SRV and UAV T#s keep the 1_5_5_5_UNORM format. A shader store still needs the translator to pack
the bits for that view, so CheckFeatureSupport does not advertise the typed UAV yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:06:24 +01:00
ff686dfe84 docs/textures: name tools/tex_mode_probe.py as the swizzle-mode and top-mip placement probe (EGEN-TEXMODEPROBE-DOC) (#6673)
Squash-merged after diff review of PR #6673
2026-11-23 11:00:30 -06:00
17cc9a7a92 d3d12: validate and track SetDescriptorHeaps and directly-indexed root flags (#6674)
Squash-merged after diff review of PR #6674
2026-11-23 11:00:10 -06:00
b93ffa5617 shaders: translate the pipeline library's compute pipelines, which the executable creates with slot 67 (RT-5)
The retail executable calls Xbox device slot 67 (DeserializeComputePipelineStateX) itself during boot, and every
call fails with "no translated compute shader": the build only translates the FidelityFX DLL's 29 FSPX programs.
The programs come from the pipeline library in shaders.rpf (docs/shader_library.md), which the title reads through
DirectStorage zlib requests: a compute record's state blob, blob, program and layout blob are FSPX kinds 0, 1, 6
and 7, the four pairs of the slot-67 description.

- tools/shader_library.py writes each compute program's record state blob as fspx/<name>.state, so the index gets
  fspx_state_sha256 (slot 67 always passes kind 0). In 1.0.2.1 each of the 2,684 compute programs has one.
- make_game.py's shaders stage gets library_shaders(): shader_library.py --stages cs --disasm --carve into
  <work>/shaders/library, rdna2spirv.py into <work>/shaders/spirv/library, with the stage's wave64 and fallback
  flags, the FSPX step's key-clash check and its own library_build.json for reuse.
- ShaderLibrary::load also reads <dir>/library/index.json; its entries are found by the same two keys.

Tests: test_library_shaders_stage.py (tool calls, reuse, invalidation, empty index, key clash),
test_shader_library.py (.state contents and both keys), shader_library_test (library entries found by code and
state key, a broken or missing index leaves the others).
2026-11-23 17:59:53 +01:00
921fa7772a docs/runtime_imports.md: move our paragraph into the RT-5 section so it merges with main's xmem notes 2026-11-23 17:59:27 +01:00
bb938f6395 ttpf_assets: the BCPack pass stamp hashes the decoder modules, so a fixed decoder completes old pools again (#6678)
Squash-merged after diff review of PR #6678
2026-11-23 10:59:15 -06:00
28f013c2ff docs/runtime_imports.md: move our paragraph into the RT-5 section so it merges with main's xmem notes 2026-11-23 17:59:12 +01:00
a3da5122fd d3d12: checkpoint slow compute pipeline compiles
Depends on: #7384
AI-assisted: yes (Codex)
2026-11-23 17:59:05 +01:00
c4c51dc3af docs/runtime_imports.md: move our paragraph into the RT-5 section so it merges with main's xmem notes 2026-11-23 17:58:59 +01:00
9177299c7f TEST-1576: classify coplanar winding on XY-ambiguous navmesh links (#6682)
Squash-merged after diff review of PR #6682
2026-11-23 10:58:20 -06:00
cc7f9e3db1 Include shader test helpers in dashboard freshness checks (#6683)
Squash-merged after diff review of PR #6683
2026-11-23 10:58:02 -06:00
242a5dbf14 runtime: serve XboxBvhBuilder.dll with the layer's XDXR builder (RT-5, boot stop 18)
The package's XboxBvhBuilder.dll creates 52 console compute programs as
pipelines in its constructor, on the title's thread. Translated, they take
25-60 s to compile on a cold driver cache (#7231/#7049: 31.2 s for one on
an RTX 4080, 59.5 s for all 52 on an RX 9070 XT), longer than the title's
~30 s startup watchdog, so a first boot ends at the builder.

runtime/shims/xbox_bvh_builder.cpp serves the seven exports the executable
imports (measured statically on 1.0.2.1: constructor 1 call site,
destructor 1, Set64BitMortonCodes 8, GetRaytracingAccelerationStructure-
PrebuildInfo 3, BuildRaytracingAccelerationStructureBatched2X 6,
CopyRaytracingAccelerationStructure 2, RehydrateRaytracingAcceleration-
StructureBatched2X 4) with the layer's own XDXR builder (D3D-178). The
loader binds imports to a shim before a bundled module, so the DLL is not
loaded and its programs are never created.

- each BATCHED_DESC2 element (docs/xdxr.md §1) is one layer build with its
  postbuild descriptions; the offline-statistics type (0x10), which the DLL
  refuses by throwing, skips the element instead (a shim must not throw);
- XDXR stream records and Set64BitMortonCodes tune the console builder's
  heuristics and are ignored (logged once);
- prebuild sizes and copies are the layer's;
- the builder's state is kept in a table keyed by `this`: nothing is
  written into the title's object, whose size isn't known;
- rehydration answers E_NOTIMPL for now (stage 2);
- LEONIDA_BVH_BUILDER=console keeps the bundled DLL.

xbox_bvh_builder_test (12 checks) calls the exports through the shim
registry as the title binds them; xdxr_bvh.py check-build validates the
BLAS, TLAS and compacted BLAS it builds (0/1000 rays differ on each).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:57:27 +01:00
c8a102d0cf vk_pipeline_check: match three device features to the runtime so its cache can hit
On an RX 9070 XT (driver 32.0.32029.2010) robustBufferAccess, scalarBlockLayout
and robustImageAccess are each part of the driver's pipeline cache key. The
runtime's device enables none of them, so the checker's no longer does.

New ctest pipeline_cache_seed: the checker compiles one synthetic compute
shader, then the same pipeline is created on the runtime's device from the
saved cache and the creation feedback has to report a hit.

AI-assisted.
2026-11-23 17:55:22 +01:00
5e54bda2e6 tools/div_fixup_diff.py: generate the f16 and f64 output multipliers (#6314) (#6698)
Squash-merged after diff review of PR #6698
2026-11-23 10:55:11 -06:00
897b2cb897 docs/navmesh: restore the dashes and signs a double encoding garbled (#6713)
Squash-merged after diff review of PR #6713
2026-11-23 10:53:16 -06:00
0433058a14 rdna2spirv: plain LDS loads and stores are Volatile (cs_w64x_lds_raw/war fail on AMD 24.30.46) (#6714)
Squash-merged after diff review of PR #6714
2026-11-23 10:52:57 -06:00
9ce9a7923e docs(i18n): find llvm-mc with where.exe in the de, fr and zh-CN quickstarts (EGEN-I18N-WHEREEXE) (#6717)
Squash-merged after diff review of PR #6717
2026-11-23 10:52:35 -06:00
cd51a43d63 docs: record RX 9070 GRE (RADV) GPU test results (#6720)
Squash-merged after diff review of PR #6720
2026-11-23 10:52:16 -06:00
04fdf377f0 Refresh the Xbox fence value after a rewind
Refresh the slot 12 mirror when the completion wait times out. Keep the existing pending fence event so a rewind cannot accumulate duplicate registrations.

The mock test covers a CPU rewind followed by progress below the old threshold and a rewind from outside the proxy. Original fails and patched passes in five runs each on Wine 11.20. AI-assisted.
2026-11-23 16:52:09 +00:00
07d04de54e docs/d3d12_xs_surface: drop the stale-doc limitation that names two pages never in the tree (#6721)
Squash-merged after diff review of PR #6721
2026-11-23 10:51:55 -06:00
51e7c9dc8e ASSET-565: export one static navmesh tile as ordered OBJ boundaries (#6725)
Squash-merged after diff review of PR #6725
2026-11-23 10:51:18 -06:00
e76640014a docs: the AMD driver took 34 minutes on LeafRehydration's dispatch-loop module; the current translation compiles in 3 s (SHADER-995) (#6739)
Squash-merged after diff review of PR #6739
2026-11-23 10:49:09 -06:00
6b40d2221c docs(i18n): the es and pt-BR quickstarts need 400 GB for the full build and ~370 GB for assets (EGEN-I18N-DISK-ES-PTBR) (#6745)
Squash-merged after diff review of PR #6745
2026-11-23 10:48:28 -06:00
a6b31d51ac d3d12: rectangle list stage emits (v1 v2 v4) (v1 v4 v3) with capability Geometry, log cut-off quads (review fixes) 2026-11-23 17:48:05 +01:00