Commit Graph

5744 Commits

Author SHA1 Message Date
5f5d6d1949 xgameruntime: serve XNetworkingImpl (IXNetworkingImpl2) through QueryApiImpl
- QueryApiImpl hands out XNetworkingImpl (IXNetworkingImpl2, slots 3-20)
  for its class GUID {37e56907-2f10-41e8-b72f-36edb185331a}.
- Serves the slots XCurl.dll calls:
  * Slot 15: XNetworkingGetConnectivityHint reports an initialized network
    with unrestricted internet access offline.
  * Slot 14: XNetworkingVerifyServerCertificate returns S_OK.
  * Slots 16 & 17: XNetworkingRegisterConnectivityHintChanged and
    XNetworkingUnregisterConnectivityHintChanged manage registration tokens.
  * Slots 11-13: Async UTF-16 security information query stubs.
- Updated docs/runtime_imports.md layout table.
- Extended runtime/test/xgameruntime_test.cpp and tiny_gdk_load.cpp
  to verify XNetworkingImpl resolution and slot execution.
2026-11-22 21:28:40 +05:30
1e4a3de85a design.md: 16-bit min3/max3/med3 measured on RDNA2; test with the measured words
v_min3/v_max3/v_med3 on f16, i16 and u16 were 'Not GPU-verified'. 6,092
cases run natively on gfx1036 (tools/hw_oracle, IEEE 0, f16 denormals
kept) give the translator's word except src0's NaN payload when all three
operands are NaN, which the row already lists as not modelled for the
32-bit ops. The new test holds 540 of the measured words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:58:39 +01:00
a93da2c185 buffer_format_fuzz: distinct y and w in the store probe; count the (x, w) routing apart
store_inputs() gave y and w the same value for two-component formats, so run_stores could not
tell the translator's (x, y) from the Radeon 880M's (x, w) for buffer_store_format_*; the zero
mismatches did not validate the second component. The probe now uses a different value in every
register and also runs _xy stores. The hardware model routes a two-component
buffer_store_format_* to (x, w) (_xy: (x, 0)); tbuffer_store_format_* takes (x, y) like the
translator. Those stores are counted as known-difference elements, outside the validated count:
1,330,469 validated elements, 0 mismatches, plus 26,523 known-difference elements.

The translator is unchanged (RDNA2 unmeasured); the difference is pinned as an expectedFailure
in test_buffer_formats_all.py. docs/buffer_formats.md and the design.md row say so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 16:58:26 +01:00
52c55184d5 Docs: the 64-bit exchange rows say a split exchange can tear 2026-11-22 11:58:26 -04:00
91b53e294b GPU test cs_fmt_int_narrow: 8/16-bit UINT/SINT typed buffers, words from gfx1036
A compute fixture loads through the nine narrow integer formats (DST_SEL
XYZW, X011 and d16) and stores edge values through each with the
runtime's selectors. check.py's 136 expected words are the same program's
output run natively on gfx1036 (tools/hw_oracle, wave32 and wave64), and
the interpreter test runs the fixture against them too.

Depends on #1871.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:58:11 +01:00
88215f92ee D3D-275: typed RTV draws into typeless families, compared with the host
- d3d12_typeless_families_test also draws a full-screen pass (GLSL stand-ins of translated shaders found by FSSM
  hash; the host's HLSL through d3dcompiler_47) into R16G16B16A16_UINT/FLOAT/UNORM, R32_UINT/FLOAT,
  R10G10B10A2_UINT/UNORM and R8G8B8A8_UINT RTVs of TYPELESS textures, PSO RTVFormats naming the typed format:
  8 of 8 equal the host D3D12 on the same adapter, no validation error.
- Draws need no layer change: the replay's draw attachment view already takes the PSO's RTVFormats[slot]
  (GraphicsPipeline::color_formats), which D3D12 requires to equal the RTV's; the same draws matched before the
  clear fix too.
- test/glsl/ps_typeless_float.frag, ps_typeless_uint.frag; docs/d3d12_vulkan.md typeless RTV section.

AI-assisted.
2026-11-22 16:57:47 +01:00
425b9a772a test_buffer_format_narrow_int: measured d16 stores (review: d16 SINT path untested)
buffer_store_format_d16_xyzw into every narrow UINT/SINT format, read back
from gfx1036 (wave32 and wave64 alike): a SINT half is sign-extended before
the clamp. Dropping the signed d16 source for sint now fails 10 rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:55:45 +01:00
4d9ef4eb27 wave64-emulate: add acyclic single-write folding and structured inline/hybrid emulation (#884) 2026-11-22 11:54:15 -04:00
c2033d219b docs/design.md: s_bfe past bit 31, s_cmov(_b64) and s_pack measured on RDNA2 gfx1036
Hardware oracle on a gfx1036 iGPU (Windows, driver 26.10.1): salu_diff
--oracle translator,hw --bfe-any, 8,000 programs pass; int_hw_probe's
salu_cmov_pack and salu_bfe_past31 cases match in wave32 and wave64; 14
s_cmov_b64 cases match the translator. The row no longer says s_cmov_b64
stays Unsupported, since the translator supports it.

AI-assisted.
2026-11-22 16:54:13 +01:00
d91bdcf8e0 docs: record the story000 negative and the Mandy 0/18 hashes 2026-11-22 15:53:10 +00:00
9d7ec302f6 docs: merge repeated table rows in design.md, README.md and testing.md (PROC-106)
Merge all 27 repeated table-row topics flagged by tests/test_docs_design_rows.py (24 in docs/design.md, 1 in docs/README.md, 2 in docs/testing.md) while keeping every unique hardware measurement, PR reference, test name and caveat. Verified tests/test_docs_design_rows.py, test_docs_links.py, test_docs_list_items.py and test_docs_repo_paths.py all pass.
2026-11-22 16:52:38 +01:00
935edd4f97 docs: dedupe merged contract rows 2026-11-22 15:51:08 +00:00
76262214e8 PresentX planes (M7): compose 1-2 planes on Vulkan with placement, filter, alpha overlay and HDR10/SDR conversion
A plain single plane keeps the old blit. A plane with pDestPlacementBase, a point/linear
ScaleFilter, the HDR10 colour space, or a second overlay plane goes through
VulkanPresenter::present_planes: a compute pass (present_compose.comp, SPIR-V embedded)
into an RGBA16F image that is copied to the swapchain. HDR10 uses an ST.2084 swapchain
when the surface lists one, else is clipped to SDR. An SDR plane 1 next to an HDR10 plane 0
is the GameDVR copy (public HDR sample) unless flagged an overlay. The layouts, flag values
and alpha convention are ours; xbox_present_test checks every case against a CPU model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:51:05 +01:00
dc93ca88fd rpf9_carve: --until-adat ends the scan at the first AWC bank (audio config carve)
docs/audio_config.md carves audio.rpf's zlib-compressed audio config (the
music/radio record table) with --limit 0x129B000, the offset where the raw
AWC banks start on the measured package, and its Limits note that a
different build can put the banks elsewhere: use the first ADAT bank as
the boundary. --until-adat does that: the scan ends at the first raw
little-endian ADAT whose header parses as a bank
(rsc8_audio.parse_adat_header_bytes), not at the bytes alone, which also
occur inside METADATA and compressed data. index.json's summary records
first_adat_bank (null when the window has none, which is then scanned
whole); a --limit before the bank still wins.

Tests: a synthetic archive with two config streams, a raw METADATA decoy,
a zero-stream bank and a stream after it: --until-adat carves the two and
stops at the bank; without it, three; no bank: the whole window and null;
--limit short of the bank: the limit. docs/audio_config.md and
docs/radio_stations.md use the option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:50:58 +00:00
ce4660c3b0 docs: one row per topic again in design.md, README.md and testing.md (PROC-106)
tests/test_docs_design_rows.py failed on main again: merges after
64ece042 and abbb3dce kept both sides of rows two branches had edited.
design.md had 24 topics repeated (two to five rows each), README.md one
and testing.md two.

Each group is now one row at the first copy's place, keeping every fact
any copy stated. Where copies disagreed, the newer wording (by git blame
and the commit that wrote it) wins: for example, the --f16-interp-fallback
row no longer also gives the pre-SHADER-291 locations 29 - 2N / 30 - 2N,
the "Not GPU-verified" notes give way to the SHADER-137 hardware results
added to the same rows, and "tbuffer_store_format_* is not translated"
gives way to the paragraph describing how it is translated.

A sentence-by-sentence check of every copy against the merged row finds
only those deliberately replaced. The four docs tests pass.

AI-assisted.
2026-11-22 16:50:02 +01:00
09c3394b0c docs: measure VOP3 output modifiers on RDNA2 (gfx1031) (SHADER-353)
tools/f32_fuzz.py --oracle hw, seeds 1 to 6, on an RX 6700 XT (gfx1031,
AMD Windows driver 26.11.2): 39,101 programs, 0 mismatch, 66 omod -0 -> +0
deviations. mul:2/mul:4/div:2 behave as measured on gfx1150: applied with
IEEE off and f32 denormals flushed (a -0 result becomes +0), ignored by the
ALU ops with denormals kept (the transcendental and cube ops still apply
them), ignored with MODE.IEEE = 1.

- docs/design.md: merge the two duplicated "Output modifiers on hardware"
  rows (one said RDNA2 was unmeasured, the other cited gfx1036) and add the
  gfx1031 numbers.
- docs/shader_validation.md: the gfx1031 run and its omod table.
- tools/f32_fuzz.py: omod_label no longer counts a -0 result that the omod
  cannot change as "applied" (65 such programs showed up as "applied" in
  the ieee column); widen the table's label column; drop "RDNA2 unmeasured".
- tests/test_f32_fuzz.py: the omod_label labels, the -0 case included.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:48:49 +01:00
c48a39d2d0 D3D-275: typed RTVs of every typeless color family
- ColorViewFormat now holds the view's VkFormat number (the RGBA8 names keep their values), and
  CreateRenderTargetView accepts any typed format of a TYPELESS color texture's family (B8G8R8A8 and
  B8G8R8X8 kept apart), not only RGBA8.
- ResourceBinding::rgba8_typeless becomes typeless (any TYPELESS color resource); color_view_format accepts a
  format of the resource's family (typeless_view_family, R8 included for when it is mapped), so clears go
  through a view in the RTV's format. Attachment views of every typeless image ask for color-attachment usage
  only.
- d3d12_typeless_families_test: every typed RTV format of each family, two clear values, bytes compared with
  the host D3D12 on the same adapter (LUID) and reported against WARP.
- docs/d3d12_vulkan.md: the typeless RTV section.

AI-assisted.
2026-11-22 16:48:45 +01:00
3e384c2c86 fix(shader): place f64 literal words in the upper half
RDNA2 reads the literal dword of a double as its high word. Preserve LLVM's distinction between a printed literal and an inline integer so conversions and adds receive the encoded value.
2026-11-22 16:48:29 +01:00
69c96fa641 docs: the body is 874 v, and list the denser garment rows 2026-11-22 15:47:49 +00:00
56998dcd23 TEST-319: GPU fixtures for wave64 graphics permutes; lane-id bpermute addresses are tier A
ps_w64_a_permlane, ps_w64_a_swizzle and ps_w64_a_bpermute check v_permlane16/x16, ds_swizzle
(quad-permute, swap, broadcast) and ds_bpermute in a wave64 pixel shader with words that only
depend on the 2x2 quad layout of fragment lanes. They give the derived words on an RTX 5070.

wave64_halves.py called a ds_bpermute/ds_permute whose address comes from the lane id tier C
(lane-id). The id is 0..63 in the wave and 0..31 in a half, equal modulo 32 lanes, and a wave64
permute uses address bits 2..6 of its half only, so an address that is the same modulo 128
bytes reads the same lane. The classifier now tracks that modulus through sums, differences,
bitwise ops with invariant values and left shifts; shifts by less than 2, right shifts and the
low count alone stay tier C. Classification and wave-interpreter tests (64 lanes against two
waves of 32) cover the rule and its near misses.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:45:05 -05:00
8564110ab3 docs/design: quadmask/bitreplicate and s_cmov_b32/s_pack_lh rows name the GPU tests that already cover them
Both rows still said not GPU-verified. cs_w32_new_ops, cs_w32_salu64 and cs_w32_int_ext
are on main and pass exactly on an AMD Radeon RDNA2 iGPU and an RTX 5080.

AI-assisted.
2026-11-22 16:44:18 +01:00
71f6358186 rdna2spirv: buffer_load_{u,s}{byte,short}, GFX10_FORMAT_8_UINT, global_atomic_fmin/fmax 2026-11-22 16:42:30 +01:00
4949c204c8 docs: XboxBvhBuilder only takes destination addresses below 2^40
The builder's validation function at 0xc8f0 checks the build's
DestAccelerationStructureData twice: the low byte must be 0 (256-byte
alignment, the public D3D12 rule) and the address must be below 2^40
(cmp with 10000000000h). On failure it prints a "D3D12 XDXR Error"
message through OutputDebugStringW and throws E_INVALIDARG as a C++
exception. The 40-bit rule has no PC counterpart. Arena VAs (32-bit)
pass; a VA biased from outside the arena, such as the negative upload-heap
VAs D3D-53 measured, does not. Added next to that measurement.
2026-11-22 15:42:26 +00:00
c9fbc9d07e gta6rt: GAME: paths for folders, moves, copies and attributes (RT-97 follow-up)
The calls docs/runtime_imports.md listed as not mapped now follow the RT-97
rules, under kernel32, kernelbase and the api-ms-win-core-file-* sets:

- CreateDirectory/CreateDirectoryEx make the folder in the overlay; a name the
  title can already see, package-only folders included, is ERROR_ALREADY_EXISTS.
- RemoveDirectory needs the folder empty in the title's view. An overlay folder
  is removed; a package folder is hidden by a .gta6rt-dir marker file inside its
  marker folder and stays on disk (deleted() now also checks that file, on top
  of the regular-file rule from 3f26a95a).
- MoveFile/MoveFileEx write the destination in the overlay; a moved package file
  is copied there and its old name deleted by a marker. MOVEFILE_WRITE_THROUGH
  flushes that copy and the marker before returning (review on #1742). Package
  folders are not moved (ERROR_ACCESS_DENIED), GAME: <-> host is
  ERROR_NOT_SAME_DEVICE and MOVEFILE_DELAY_UNTIL_REBOOT is ERROR_INVALID_PARAMETER.
- CopyFile/CopyFileEx/CopyFile2 read like a read and write a GAME: destination
  in the overlay; fail-if-exists counts names only the package has.
- SetFileAttributes sets the overlay copy (copy-up or folder mirror first).

file_system: 123/123 checks. No game files.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:42:08 +03:00
483396190d design.md: list the run-time table border colour among the gather approximations (SHADER-348)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:41:52 +03:00
b6453fe24c docs: the delivered GLBs are static, not identity-IBM skinned 2026-11-22 15:41:10 +00:00
cce1757c2a Merge pull request #2029 from Youssef Rahmouni
# Conflicts:
#	docs/design.md
2026-11-22 10:40:36 -05:00
741ae3ed43 Merge pull request #2028 from Bora Sevim
# Conflicts:
#	docs/design.md
2026-11-22 10:40:35 -05:00
8b11bc8166 Merge pull request #2026 from Vonsek 2026-11-22 10:40:32 -05:00
40b1290e2a Merge pull request #2025 from undeadhuman37 2026-11-22 10:40:31 -05:00
81c6cfe4fd Merge pull request #2021 from jaybeebabageyus 2026-11-22 10:40:29 -05:00
c4f6e3b975 Merge pull request #2014 from Leonardo Guimaraes 2026-11-22 10:40:26 -05:00
9ffe000919 docs: replace the duplicated hair claims with the measured census 2026-11-22 15:40:21 +00:00
b75c154b0a Merge pull request #2000 from SweatierKey
# Conflicts:
#	docs/design.md
2026-11-22 10:40:19 -05:00
a47749b8de Merge pull request #1996 from Joao vitor alves
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 10:40:16 -05:00
92800c634f Merge pull request #1993 from Ayinaki
# Conflicts:
#	docs/design.md
2026-11-22 10:40:13 -05:00
222321b4e8 Merge pull request #1983 from Tim Elery 2026-11-22 10:40:07 -05:00
8b310b2092 Merge pull request #1977 from Douglas Sposito 2026-11-22 10:40:03 -05:00
41caa0bbae Merge pull request #1975 from tboris
# Conflicts:
#	docs/design.md
2026-11-22 10:40:03 -05:00
71ec5de3ef Merge pull request #1974 from Luiz Neves
# Conflicts:
#	docs/design.md
2026-11-22 10:40:01 -05:00
0fe4e452ea rdna2spirv: v_floor/ceil/fract_f32 read a denormal as zero, as RDNA2 does in the game's MODE
Measured natively on gfx1036 (IEEE 0, f32 denormals flushed): floor(-1e-45)
is -0, ceil(+1e-45) +0 and fract of either 0, where a translation that keeps
the denormal (any driver that keeps f32 denormals) gives -1.0, +1.0 and
0x3f7fffff. fract(+-inf) is exactly 0xffc00000 and a NaN operand passes
through unchanged. The new test holds 75 measured words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:39:59 +01:00
58cc88f5dd Merge pull request #1971 from Jolymmiles 2026-11-22 10:39:58 -05:00
0d06dec75b Merge pull request #1969 from Youssef Rahmouni
# Conflicts:
#	docs/design.md
2026-11-22 10:39:57 -05:00
cc71595325 Merge pull request #1968 from SweatierKey
# Conflicts:
#	docs/design.md
2026-11-22 10:39:55 -05:00
213276d8ef Merge pull request #1967 from fearkov
# Conflicts:
#	docs/design.md
2026-11-22 10:39:53 -05:00
8af79aaf65 Merge pull request #1962 from abilliontokens 2026-11-22 10:39:50 -05:00
4e477e98ab Merge pull request #1959 from SHAFAY04
# Conflicts:
#	docs/design.md
2026-11-22 10:39:49 -05:00
e52eb24aa8 Merge pull request #1958 from Capital 2026-11-22 10:39:46 -05:00
989b133143 Merge pull request #1954 from Luiz Neves
# Conflicts:
#	docs/design.md
2026-11-22 10:39:44 -05:00
66bfad8e1f Merge pull request #1950 from CLHelper 2026-11-22 10:39:41 -05:00