Commit Graph

743 Commits

Author SHA1 Message Date
8550970f10 Merge upstream GPU fixture dependencies into the two-mip test
Preserve the cube test's isolated vertex shader and count the new upstream compute checks alongside the two-mip draw.
2026-11-22 00:28:50 +01:00
d937b7f092 vk_pipeline_check: read subgroup_size null (--wave64-emulate: any size) as no required size
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 18:26:07 -05:00
d7cbc3e7cb Translator: split a dispatch OpSwitch past SPIR-V's limits into two levels
With --wave64-emulate the two ScreenProbes compute shaders reach ~37k dispatch blocks: one OpSwitch of 74k
words, past the 65,535-word instruction limit (and spirv-val's 16,383-case cap). An outer switch on
pc / 16000 now picks a chunk; each chunk is its own selection construct whose blocks exit to its merge. All
26,503 shaders translate and validate with --wave64-emulate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 18:22:19 -05:00
3eb5ad9892 docs: drop the open-question rows the #284 merge duplicated again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 18:14:04 -05:00
dbc785f9e5 Merge pull request #332 from fearkov
# Conflicts:
#	tests/semantic/regen_fixtures.py
2026-11-21 18:09:52 -05:00
273e53c8fc Merge pull request #300 from FreddyxS
# Conflicts:
#	tests/semantic/regen_fixtures.py
2026-11-21 18:09:14 -05:00
9357f97f5f Merge pull request #316 from IAmNotSiob 2026-11-21 18:08:03 -05:00
03ff5f4bd8 Merge pull request #338 from mrb-eel 2026-11-21 18:08:03 -05:00
2f076083fe Merge pull request #327 from Parakeet-Wheat 2026-11-21 18:08:00 -05:00
b98068ea7c Merge pull request #318 from 73N1X 2026-11-21 18:08:00 -05:00
099a5c8848 Merge pull request #309 from Luis Baker 2026-11-21 18:08:00 -05:00
68ade67da9 Merge pull request #324 from Luis Baker 2026-11-21 18:07:59 -05:00
6eb245f59d Merge pull request #284 from S1m0ne1997
# Conflicts:
#	docs/d3d12_vulkan.md
#	tools/feature_scan.py
2026-11-21 18:07:59 -05:00
0d5ba399c0 Merge pull request #247 from crastinator
# Conflicts:
#	scripts/run_gpu_tests.py
2026-11-21 18:07:52 -05:00
7761916406 Merge pull request #303 from mrb-eel 2026-11-21 18:07:42 -05:00
0f50016a5f Merge pull request #304 from DiazE117 2026-11-21 18:07:41 -05:00
e2460bfbec Merge pull request #245 from DiazE117 2026-11-21 18:07:41 -05:00
30fae13fc2 Merge pull request #326 from FreddyxS 2026-11-21 18:07:40 -05:00
fcd980d3c4 Merge pull request #325 from dcastell1 2026-11-21 18:07:40 -05:00
77fb672cf2 Merge pull request #312 from Tim Elery
# Conflicts:
#	docs/textures.md
2026-11-21 18:07:40 -05:00
81d3776d90 Merge pull request #314 from FreddyxS 2026-11-21 18:07:38 -05:00
76add28b8a Merge pull request #315 from Vonsek 2026-11-21 18:07:38 -05:00
811ee91fea Merge pull request #337 from Ewann 2026-11-21 18:07:38 -05:00
97a76333b9 Merge pull request #336 from bbareth 2026-11-21 18:07:38 -05:00
1d2e9cc5ae Merge pull request #323 from Ayinaki 2026-11-21 18:07:37 -05:00
76d3449434 Merge pull request #321 from Jan Kříž 2026-11-21 18:07:37 -05:00
93953ebd75 Merge pull request #320 from Rayhan Robin 2026-11-21 18:07:37 -05:00
abef7cd401 Merge pull request #308 from NWX10 2026-11-21 18:07:37 -05:00
31e2c12bef Merge pull request #307 from NWX10 2026-11-21 18:07:36 -05:00
17072e2237 Merge pull request #322 from Koert Lichtendonk 2026-11-21 18:07:36 -05:00
a42b1990da Merge pull request #311 from Kam471 2026-11-21 18:07:35 -05:00
346552a171 Merge pull request #292 from Kam471 2026-11-21 18:07:35 -05:00
489258fda5 Resolve colour MSAA regions into destination offsets 2026-11-22 00:05:17 +01:00
c5dc2d0330 shader_carve.py: reject incomplete DXBC parts 2026-11-22 00:04:21 +01:00
77db72f602 run_gpu_tests: find the test programs in RelWithDebInfo/Release (TEST-38)
With the Visual Studio generator the test programs land in build/<Config>, and the runner only looked in the build
folder itself, so --build had to point at the subfolder (#166, RX 9070 XT entry). resolve_build_dir() looks in the
build folder first, then in RelWithDebInfo, Release, Debug and MinSizeRel, and takes the configuration that has all
three required programs and was built last. If none has them, the folder given is kept for the error message.
2026-11-22 00:04:20 +01:00
fe413a2f1c Cancel superseded runs and skip heavy CI on docs-only PRs 2026-11-21 23:59:08 +01:00
10d6d4b876 test(fuzz): differential coverage for the integer and bit VALU family
FUZZ-1: model the integer/bit VALU block in tools/cpu_ref.py and add
those ops to the shader_diff program table: v_add_nc_u32, v_sub_nc_u32,
v_subrev_nc_u32, v_mul_u32_u24, v_mul_i32_i24, v_mul_lo_u32,
v_mul_hi_u32/i32, v_mad_u32_u24/i32_i24, v_min_u32/u32, v_max_i32/u32,
v_bfe_u32/i32, v_bfi_b32, v_alignbit_b32, v_alignbyte_b32, v_perm_b32
and v_med3_i32/u32.

Pinned known-answer tests cover the boundaries: bfe width cut and zero,
perm selector ranges (bytes, sign bits, constants), align shift 0 and
24, signed mul_hi, 24-bit sign extension and mad wraparound.

The generator keeps integer ops away from registers last written by a
float op: Vulkan does not promise a NaN payload and the comparison
accepts both-NaN, so reusing those bits as an integer would compare an
unobservable payload. Unobservable as a float, not as an integer.

Verified CPU-only: 28 cpu_ref tests, 6 shader_diff tests, 423 semantic
tests, and 8000 seeded programs (8 seeds x 1000) with 0 mismatches and
0 skips. GPU confirmation on the 5090 is pending.
2026-11-21 23:57:59 +01:00
c17cdd8b6b Docs: point CONTRIBUTING.md and AGENTS.md at #313 for the D3D12 layer
The D3D12 -> Vulkan layer is tracked in #313 (critical path, who builds
what, open D3D12 methods); say so next to #156 and #166.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:57:45 +01:00
1186f99340 Merge updated Leonida GPU runner into class compare fix 2026-11-21 23:57:44 +01:00
437081fdb6 Runtime: parse version 1.2 root signatures, and read RTS0 table ranges from their offset
parse_rts0 refused D3D_ROOT_SIGNATURE_VERSION_1_2 blobs. 1.2 is 1.1 plus
D3D12_STATIC_SAMPLER_DESC1::Flags: the PC serializer writes RTS0 version 3 with
14-dword static samplers (13 before). The model gains Version::V1_2 and
StaticSampler::flags. The canonical codec writes the flags only for 1.2, so 1.0/1.1
encodings are byte-for-byte unchanged.

Checking it against the real serializer found an older bug: a descriptor table's
payload is {num_ranges, ranges_offset} with the ranges at that offset, but the
parser read them inline after the count. Every table came back with a wrong range
type and count. The oracle test only covered constants and a CBV, so it never saw it.

root_signature_oracle_test now serializes 1.0, 1.1 and 1.2 signatures with a
two-range table, a root SRV and two static samplers (1.2 with a UINT border colour,
then non-normalized coordinates). Every sampler field, the ranges and the canonical
round trip must match. root_signature_test adds hand-built 1.2 and table payloads
and their truncation controls.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:57:07 +01:00
eb629d41a8 Decode BVH4 header and node pointer fields
The indexer treated the pre-header wrapper words as the root and labelled the real header fields as counts. Parse the documented XboxBvh4Header fields, decode root node pointers, and document the runtime node and leaf layouts while keeping the dehydrated packed stream open.
2026-11-21 22:55:52 +00:00
257e3856cc Runtime: GetResourceAllocationInfo on the Vulkan device (D3D-23)
GetResourceAllocationInfo, GetResourceAllocationInfo1 and
GetResourceAllocationInfo2 were generated stubs. Buffers take their width
rounded up to 64 KiB. A texture's size is what its VkImage needs
(vkGetDeviceImageMemoryRequirements, or a throwaway image without it),
rounded up to its D3D12 alignment: 64 KiB, 4 MiB with MSAA, or the small
alignment the description asks for. A 4 KiB request that doesn't qualify
is invalid, as on the PC runtime; the MSAA 64 KiB one has no size limit
there. Texture creation and these queries share one VkImageCreateInfo.

d3d12_vulkan_device_test compares buffer sizes, alignments and invalid
descriptions with the host PC runtime, and checks the per-resource layout
of the Device4/Device8 variants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:55:11 +11:00
dd4c763c11 Docs: the SCC row covers s_min_i32 and s_max_i32 2026-11-21 18:54:42 -04:00
adbe6fd42e Tests: ps_scc_minmax checks SCC of s_min and s_max on a tie 2026-11-21 18:54:42 -04:00
9ef27a9059 Translator: s_min_i32 and s_max_i32 leave SCC at 0 on a tie 2026-11-21 18:54:33 -04:00
ff45269e68 tiny_game: _CRT_SECURE_NO_WARNINGS for its plain fopen (MSVC C4996) 2026-11-21 23:54:13 +01:00
02c89a380b bink_index.py: one line end per CSV row on stdout; a missing target is an error, not a traceback
The CSV written to stdout (the default output) used csv's "\r\n" on a text stream
that already turns "\n" into the platform line end, so every row ended "\r\r\n" on
Windows and a redirected index read as one blank row after each row. The stdout writer
now uses lineterminator="\n", as awc_manifest.py does; --out files were already right.

A target that does not exist ended in a FileNotFoundError traceback from
os.path.getsize; it now prints an error and exits 2, as awc_manifest.py does.

Tests: a stdout stream that writes "\r\n" like Windows' (so the check also runs on
Linux CI) and the missing-target exit code; both fail without the fix.
2026-11-21 23:54:13 +01:00
fe8cd6bc72 Tools: reject out-of-range --start/--limit in RPF index tools
Adds the #283 argparse validators to anim_index, rbf0_index, restofworld_index and rpf9_carve: --start >= 0, --limit >= 1 (decimal or 0x hex), and --max-inflate >= 1 in restofworld_index. Bad ranges now exit 2 before any scan or output instead of silently scanning everything, less, or nothing. Synthetic CLI tests in all four test files; docs notes for each tool.

New item claimed in #156. AI-assisted (OpenCode).
2026-11-21 16:53:41 -06:00
75e666e615 Runtime: convert UINT render-target clear values numerically 2026-11-21 18:53:21 -04:00
6005d7e2f0 tests: eight more wave64 mask and vote GPU tests across 64 lanes on the CPU
run_workgroup now steps every invocation one instruction per round, so a
load after a store sees all lanes' stores as in a SIMD wave (cs_w64x_load_
ballot_load read a later store before), allows a partial last subgroup, and
answers OpGroupNonUniformAny, All and BitwiseOr Reduce; BallotFindLSB,
IAddCarry and UGreaterThan are per lane. A shuffle from a lane that is not
running is an undefined value.

test_wave64_subgroup_ops runs cs_w64x_ballot, _readfirstlane,
_load_ballot_load, _partial, cs_wave64_ballot, cs_wm_bfm64, cs_wm_half_cmp
and cs_wavemask without --wave64-emulate:
- one 64-wide subgroup: every word equals check.py (cs_wavemask: all 64 lanes);
- two 32-wide subgroups: the pinned words equal what an RTX 4070 SUPER
  (driver 610.88) wrote, three runs each; cs_wavemask 64 mismatches with
  lane 0 = 0x00081021 on both;
- removing 21cef25's ballot guard makes cs_w64x_partial use an undefined value.

403 semantic tests pass (397 before). AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:53:07 -06:00