Commit Graph

18350 Commits

Author SHA1 Message Date
46d3093d61 shader_profile: report per-stage register pressure; add --per-shader
profile_shader() and register_footprint() were only called from the tests.
main() now runs profile_shader() on every shader and adds a "registers"
section to profile.json: per stage, the max and mean VGPR/SGPR count and a
VGPR histogram (<=32/64/128/256). --per-shader also lists each shader's
instruction count and VGPR/SGPR footprint. Existing output is unchanged.

Tested with hand-written disassembly only (tests/test_shader_profile.py).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011jW1LkcxdgoMR14Ng7tzCo
2026-11-21 22:19:36 +00:00
0397a7e4cc tests: follow this round's merges (preflight's reworded .NET message, #230's ps_tex in the checks' total and fake run)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:19:25 -05:00
6de5bd46b4 run_gpu_tests: run cs_wavemask on any subgroup size with LEONIDA_W64_EMULATE=1
check.py drops --require-wave64 for cs_wavemask when wave64 is emulated; run_gpu_tests.py always passed it,
so on a 32-wide GPU the emulated suite skipped cs_wavemask. The check moves into wavemask_check(), which
asks for a 64-wide subgroup (and confirms it) only for the native build. test_run_gpu_wavemask covers both
paths with a fake vk_compute_test.

NVIDIA GeForce RTX 4070 SUPER (subgroup 32), driver 610.88, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8 in WSL:
LEONIDA_W64_EMULATE=1 run_gpu_tests.py 48/49 (was 47/49; ps_vcc_x2 skips), cs_wavemask 0 mismatches.
Native: 29/49, cs_wavemask still skips. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:19:14 -06:00
27d1b11b64 Runtime: register each mapped image's x64 unwind table (.pdata) with RtlAddFunctionTable
Images the loader maps by hand are unknown to the system unwinder, so an exception raised in or passing through one couldn't be dispatched and killed the process. load() now validates the exception directory (entries in bounds, sorted, non-overlapping; zero-length entries allowed, as in System32's symcryptk.dll) and registers it; the loader removes it before freeing the image. Rules measured over 3,780 x64 System32 images (5,023,071 entries) and the 16 package DLLs.

Tests: loader_test covers registration, removal and six corrupt tables on hand-built images; pe_loader_test checks a fixture SEH fault is caught by the image's own handler (fails without registration) and, with LEONIDA_GAME_DIR, every package DLL's table.

AI-assisted.
2026-11-21 23:18:59 +01:00
9fcf3d88f7 run_gpu_tests: judge the compute dumps like check.py does (eight decimal words, 64-wide confirmation)
run_gpu_tests.py parsed only the expected prefix of the out[0..7] line, so "55 48 BAD 0 0 0 0 0" passed
cs_wm_scc_rfl and text inside the prefix raised a ValueError that aborted the whole run. It also never looked
for the "compute subgroup size: 64" line for the dumps run with --require-wave64, so a vk_compute_test that
ignores the flag could pass.

The judging of a dump moves into judge_cs_dump(): the line must be eight decimal words (dump_words(), also used
by cs_bounds), and the dumps run with --require-wave64 must print the confirmation, as in check.py. The skip on
exit 77, the partial-group skip and the emulated and cs_store paths (#152) are unchanged; the run_suite block
only calls it.

tests/test_run_gpu_tests.py exercises this without a device, including the emulated and partial paths.
2026-11-22 00:17:56 +02:00
fece829131 docs: measure TTPF array and volume layouts (ASSET-18) 2026-11-21 22:17:49 +00:00
edbef47811 Docs: census other world archives for placement maps 2026-11-21 22:16:20 +00:00
fdf4d29955 Translator: use the FSSM pixel-input table in the PS input path (SHADER-15)
AI-assisted (fixer lane, orchestrated). tools/fssm_header.py already decoded the pixel-input table; rdna2spirv.py ignored it.

- PS translate() reads the fssm/<name>.fssm sidecar (same convention as CS) and declares every table position 0..count-1 as a fragment input at that Location, including positions the code never reads.
- A 32-bit v_interp read (p1/p2/mov) of a 16-bit-flagged position (flag bit 4) is rounded f32->f16->f32; *_f16-opcode reads already narrow and are unchanged; reads past the table still declare; no sidecar (or empty table) is byte-identical to the old path.
- shader_meta() records ps_interpolants (count) and ps_fp16_interpolants (flagged positions).
- docs/design.md: contract-table row with corpus measurements and the fixture confirmation (synthetic + mini_interp, no GPU).

Verified: tests/test_rdna2spirv_pixelinput.py 9 passed (synthetic FSSM blobs + hand-written listings, empty DXBC; no llvm-mc/spirv-tools/GPU/game data); full suite 1066 passed + 366 subtests on the dev branch; compileall + make_game --help green. Claimed as SHADER-15 in #156 before starting.
2026-11-21 19:15:52 -03:00
c56589c91b SHADER-30: emit CullPrimitiveEXT as Block+bool for old spirv-val
Array-of-bool is legal (VUID-07036) but SPIRV-Tools <=2025.1 rejects it (#5980).
The Block member form matches glslang and passes both old and new validators.
2026-11-21 19:14:58 -03:00
798f4f6933 Rebuild ci.yml on current main; pin setup-node.
Updated CI workflow to include tests directory in Python compilation and added viewer tests for chunk streaming.
2026-11-22 01:13:55 +03:00
bafda15ae0 runtime/CMakeLists: register root_sig_test with CTest
Since #106, root_sig_test is built from a plain shell too, but it had no add_test, so ctest never
ran it (noted by @TricksterG on #106). Register it next to device_proxy, under the same
if(TARGET) guard, so builds without d3d12.lib are unchanged.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:13:41 +01:00
909fd0ec5d README: update the shader item in Want to help?
Compute, mesh and geometry system-value layouts are implemented and all
26,503 shaders translate (docs/design.md translator contract). Point
contributors at what is still open: the unverified VS input layout (NGG)
and wave64 cross-half code in VS/PS/GS on 32-wide subgroups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011jW1LkcxdgoMR14Ng7tzCo
2026-11-21 22:13:11 +00:00
95be10b52c Merge branch 'ItsNotRexed:main' into ci/harden-workflows 2026-11-22 01:13:00 +03:00
c8081eb0ba Cancel distant viewer chunk downloads after camera moves 2026-11-21 23:12:33 +01:00
052cc571d0 feature_scan: count s_getpc_b64 kept for code-embedded data per stage; d3d12_vulkan.md: answer §8.2 #10, per-stage counts for #14, tiled resources for #18
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:12:07 +01:00
8bec4de069 Audio: isolate ffmpeg worker temporary WAVs from final outputs 2026-11-21 15:10:41 -07:00
409f702bbb Tools: feature_scan.py, a corpus scan for D3D12-layer features (SHADER-16)
Counts, from what the shaders stage leaves in <work>/shaders, the features docs/d3d12_vulkan.md
§8.2 #10 and #14 ask about: the DXIL program kind of every shader (hull, domain, amplification),
the SFI0 D3D_SHADER_REQUIRES_* flags (values from the Windows SDK's d3d12shader.h, among them
WAVE_MMA and SHADING_RATE), output-signature streams other than 0, native v_mfma/v_wmma and
GDS/ordered-count instructions in the disassembly, and uses_code_base per stage from
spirv/index.json. Prints counts only. tests/test_feature_scan.py checks it on a synthetic work
folder (hand-built DXBC parts, listings and index).

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:10:38 +01:00
6d3f80a0ff GPU tests: skip bitmask_perm on unknown width, carry the harness skip reason
Decide ps_bitmask_perm from the reported subgroup width before the
pixel count, skip when the width line is missing, and include the
harness's unsupported reason in the GPU runner skip.
2026-11-21 22:10:27 +00:00
c9a3798c5f Docs: put the measured levels census in the archive row 2026-11-21 22:10:11 +00:00
553f0df328 docs: drop the Byte permute row the #222 merge duplicated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:09:57 -05:00
cc1f4d3597 Merge pull request #230 from Jan Trencansky
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-21 17:09:46 -05:00
01bc91eb2c Merge pull request #222 from simonbronk
# Conflicts:
#	docs/design.md
#	tests/semantic/regen_fixtures.py
#	tests/semantic/spirv_mini_interp.py
2026-11-21 17:09:28 -05:00
ca27646115 Merge pull request #234 from Luiz Neves
# Conflicts:
#	tests/semantic/spirv_mini_interp.py
#	tools/rdna2spirv.py
2026-11-21 17:09:08 -05:00
63ae33a3cf Merge pull request #252 from Luiz Neves
# Conflicts:
#	tests/semantic/spirv_mini_interp.py
#	tests/semantic/test_interp.py
2026-11-21 17:08:47 -05:00
78bac0ead5 Merge pull request #235 from shuv-amp
# Conflicts:
#	tests/semantic/regen_fixtures.py
#	tests/semantic/spirv_mini_interp.py
2026-11-21 17:08:27 -05:00
f2fead895a tests/semantic: run unordered float compares in the interpreter, and test v_cmp_*_f32/f16
spirv_mini_interp.py had the ordered float compares and OpFUnordNotEqual only,
so v_cmp_lg/nlt/ngt/nle/nge could not run, and neither could the
OpIsNan/OpIsInf checks in v_cvt_pkrtz. It now has OpFOrdNotEqual, every
OpFUnord* compare, OpIsNan and OpIsInf: an ordered compare is false and an
unordered one true when either operand is NaN.

test_float_compares.py checks v_cmp_{lt,le,gt,ge,eq,lg,neq,nlt,ngt,nle,nge} for
f32 (e32 and e64) and f16 (with high-half noise) on 0, -0, +-1, 2.5, +-inf and
NaN against Python's own comparison, plus e64 neg/abs source modifiers.
test_interp.py tests the new ops directly.
2026-11-21 19:08:00 -03:00
345465a2d6 Merge pull request #257 from IAmNotSiob 2026-11-21 17:07:42 -05:00
5773165b67 Merge pull request #241 from 0xTehuti 2026-11-21 17:07:42 -05:00
b80e3baddf Merge pull request #228 from Jan Trencansky 2026-11-21 17:07:41 -05:00
77c466c5b5 Merge pull request #224 from 0xTehuti 2026-11-21 17:07:41 -05:00
01e23b6175 Merge pull request #208 from dcastell1 2026-11-21 17:07:41 -05:00
fdaf5e402e Merge pull request #246 from LuanFreitas 2026-11-21 17:07:40 -05:00
9abc65ca81 Merge pull request #227 from Luiz Neves 2026-11-21 17:07:39 -05:00
d5123aad14 Merge pull request #226 from Luiz Neves 2026-11-21 17:07:39 -05:00
c1686b84e0 Merge pull request #223 from Alex Collini 2026-11-21 17:07:38 -05:00
20fd0dec5f Merge pull request #218 from Luiz Neves 2026-11-21 17:07:38 -05:00
3d58d99468 Merge pull request #186 from Diesel 2026-11-21 17:07:38 -05:00
919599b17c Merge pull request #256 from Luiz Neves 2026-11-21 17:07:37 -05:00
5a3aa74e3e Merge pull request #250 from Luiz Neves 2026-11-21 17:07:37 -05:00
e555237b31 Merge pull request #255 from SuarezPM 2026-11-21 17:07:37 -05:00
9c7573078d Merge pull request #248 from Ayinaki 2026-11-21 17:07:37 -05:00
645f52d3c6 Merge pull request #244 from nicolas 2026-11-21 17:07:37 -05:00
5367c61752 Merge pull request #242 from Jonathan 2026-11-21 17:07:36 -05:00
5a7d97f8ad Merge pull request #236 from intelshadow 2026-11-21 17:07:36 -05:00
e5026783ac Merge pull request #231 from mrb-eel 2026-11-21 17:07:36 -05:00
24eef8378c Merge pull request #260 from NWX10 2026-11-21 17:07:36 -05:00
2185d5ac0b Merge pull request #249 from NWX10 2026-11-21 17:07:36 -05:00
356bd7b190 Merge pull request #239 from NWX10 2026-11-21 17:07:36 -05:00
8361fec6e3 Merge pull request #232 from bbareth 2026-11-21 17:07:35 -05:00
3176cecd72 Merge pull request #251 from Kam471 2026-11-21 17:07:35 -05:00