Commit Graph

9534 Commits

Author SHA1 Message Date
dc0e3d4923 Merge pull request #60 from slopgobblercobbler 2026-11-21 13:45:51 -05:00
3c99a9d5c0 Merge pull request #59 from slopgobblercobbler 2026-11-21 13:45:51 -05:00
b8ec1ef46e Merge pull request #58 from slopgobblercobbler 2026-11-21 13:45:51 -05:00
f9c630cba2 Merge pull request #57 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
6e5b4597a0 Merge pull request #56 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
433f5c9ab2 Merge pull request #55 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
8f03582716 Merge pull request #54 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
370e1596bf Merge pull request #53 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
c2305ecd78 Merge pull request #52 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
68a793b872 Merge pull request #50 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
0816ea9664 Merge pull request #49 from slopgobblercobbler 2026-11-21 13:45:50 -05:00
d635cb78d9 Merge pull request #48 from slopgobblercobbler 2026-11-21 13:45:49 -05:00
ebaf583aab Merge pull request #46 from slopgobblercobbler 2026-11-21 13:45:49 -05:00
c2a9a82273 Merge pull request #45 from slopgobblercobbler 2026-11-21 13:45:49 -05:00
903b849196 Merge pull request #44 from slopgobblercobbler 2026-11-21 13:45:49 -05:00
8d6f3d66d5 Merge pull request #43 from slopgobblercobbler 2026-11-21 13:45:49 -05:00
0979e54af9 Merge pull request #40 from slopgobblercobbler 2026-11-21 13:45:49 -05:00
acddb5eefc Merge pull request #77 from andretuta 2026-11-21 13:45:48 -05:00
bc7761ca36 Merge pull request #76 from andretuta 2026-11-21 13:45:48 -05:00
3358caf2af Merge pull request #83 from SuarezPM 2026-11-21 13:45:48 -05:00
0f81dbe1f5 Merge pull request #80 from eIBart0 2026-11-21 13:45:48 -05:00
ba6dd8b97c Merge pull request #41 from Kam471 2026-11-21 13:45:46 -05:00
34d4559d17 Merge pull request #81 from Kam471 2026-11-21 13:45:46 -05:00
9925be3225 Merge pull request #86 from Kam471 2026-11-21 13:45:46 -05:00
87ff57a65f Merge pull request #75 from Kam471 2026-11-21 13:45:46 -05:00
4f27dd076c Carve: advance by the bytes actually read, not the 1 MiB request
A short final slice made p overshoot EOF; used = p - s - unused_data
then exceeded the real stream size, so the walker jumped past the end
and skipped every trailing zlib/Bink stream. Advance by len(chunk).
Adds a synthetic two-stream regression test (1 file before, 2 after).
2026-11-21 18:42:49 +00:00
bbd15cf20d Tools: clean-room FSSM pixel input table decoder 2026-11-21 18:38:26 +00:00
319f984226 docs: measured animation archive composition and container index 2026-11-21 18:30:05 +00:00
4dc2f597a4 lane_masks: a separate write to vcc_hi ends vcc's lane-mask tracking 2026-11-21 15:27:29 -03:00
caa767d8d0 Translator: shader index identity (src/fssm hashes, ISG1 signature, wave64_emulated) + Turing atlas
- shader_meta: src_sha256, optional fssm_sha256 (--fssm-dir), full
  vertex_input_signature, wave64_emulated (VS/PS/GS), dynamic_format /
  fixed_format_codes; unknown static formats raise Unsupported with code.
- tests/test_shader_index.py: 10 tests (stdlib only, no llvm-mc needed).
- tools/turing_atlas.py: vulkaninfo matrix + spirv-as/val at vulkan1.4,
  5 synthetic cases for the Turing bring-up report.
- docs/design.md: contract table documents the new index fields.
2026-11-21 15:26:31 -03:00
b406270b53 Docs: measured d3d12_xs surface from SCARAB
Records the 116-export contract (23 functions + 93 GUIDs), the 28 D3D12 IIDs and the 10 console-only IIDs from SCARAB, with per-item provenance and file:line references. The IID block ordinals 72-99 are derived from the alphabetical export order anchored by IID_ID3D12Debug @76. Includes a checker/test that re-verifies the 116-slot arithmetic and the 83 standard GUIDs against the Windows SDK.
2026-11-21 18:23:05 +00:00
74e188c8a0 Translator: cache descriptor lookups per basic block
Each image instruction called %desc_lookup_fn for its T# and S#, so a shader sampling the same texture
many times in a block called it many times. The call count is what the driver's compile time follows
(ShadowRenderTiledCascades: 1550 static calls on main). desc_lookup_sgpr remembers the result per
(first SGPR, dwords) for the rest of the basic block.

- store_reg drops the entries overlapping the SGPR it writes; every write to %sgpr goes through it
  (64-bit writes are two calls), apart from the function prologue, which runs before any block.
- translate() clears the cache when a basic block starts.
- Only lookups at the top level of the block are remembered (desc_cache_ok): an id made inside an op's
  selection construct would not dominate the code after its merge.
- image_load passes its image index to image_load_typed instead of looking the T# up a second time.
- tests/test_desc_cache.py counts the calls.
2026-11-21 15:19:09 -03:00
f980852e23 movies: index Bink 2 streams and document the container 2026-11-21 18:14:41 +00:00
1a7ca71f97 Tests: add per-file mattr directive, restore wave64 cs_wave64_ballot, register in run_gpu_tests.py
- Support '; mattr: ...' header directives in runtime/test/shaders/build.py,
  scripts/run_gpu_tests.py, and tests/conftest.py.
- Restore runtime/test/shaders/cs_wave64_ballot.asm to wave64 v_cmp_*_e64
  s[4:5] / s[6:7] / s[10:11] form using '; mattr: +wavefrontsize64,-wavefrontsize32'.
- Register cs_wave64_ballot and cs_wm_* in scripts/run_gpu_tests.py.
2026-11-21 18:11:52 +00:00
2151d4ef47 Translator: map vcc_lo/vcc_hi halves, use wave_lane() in s_bfm_b64, update docs/tests
- Map vcc_lo -> MASK_LO and vcc_hi -> MASK_HI in lane_masks.kind() when vcc
  holds a lane mask, and support wave64 vcc_hi mask reads in rdna2spirv.py.
- Use wave_lane() instead of %sg_lane in s_bfm_b64 so wave32-in-subgroup64
  lane positions match wave_mask().
- Strengthen test_translate.py half-compare checks to assert the exact
  lane < 32 / lane >= 32 SSA guard pattern feeding OpGroupNonUniformAll/Any,
  and add vcc_lo/vcc_hi half-mask tests in test_lane_masks.py and test_translate.py.
- Update lane_masks.py docstrings, docs/design.md (OpGroupNonUniformBitwiseOr
  and known remaining gaps), and blank-line formatting in test_lane_masks.py.
2026-11-21 18:11:52 +00:00
d9db324af6 Docs+tool: add CPU reference for differential shader validation
Add docs/shader_validation.md describing why spirv-val is not enough, the CPU/GPU differential model, test-program construction with llvm-mc, the harness design, coverage plan, limits, and prior art.

Add tools/cpu_ref.py, a standard-library interpreter for a small straight-line RDNA2 subset from a shader_ir listing. It models SGPR/VGPR state, VCC/EXEC/SCC, one or 64 lanes, inline constants and literals, exact f32 FMA and the requested integer/float ops. Anything outside the subset raises Unsupported.

Add tests/test_cpu_ref.py with hand-written listings pinning NaN, signed zero, denormals, FMA single rounding, cndmask, EXEC masking, 16-bit packed halves and shifts.
2026-11-21 18:09:38 +00:00
f3b2b47323 test(semantic): add interpreter tests for scalar memory reads and descriptor address calculation 2026-11-21 19:08:36 +01:00
0fdb1f0f75 Translator: fix wave64 half-mask bcnt1/ff1/cmp and track s_bfm_b64 in lane_masks 2026-11-21 15:08:29 -03:00
9755e72780 test(tools): add DDS synthesis, mip calculations, and GFX10 format mapping tests for tex_headers 2026-11-21 19:08:22 +01:00
b5aa23e20e test(semantic): add LDS read/write byte offset calculation interpreter tests 2026-11-21 19:07:05 +01:00
1d5cad4f98 test(semantic): add whole-wave subgroup ballot equality and comparison tests 2026-11-21 19:07:02 +01:00
6ec879fd09 test(semantic): add interpreter tests for SDWA source sub-register selection and broadcast
Add value-level semantic interpreter tests covering SDWA source sub-register selection (byte extraction, word extraction, dword pass-through) and sign extension (under sext()).

- Verifies BYTE_0 through BYTE_3 (unsigned and sign-extended)
- Verifies WORD_0 and WORD_1 (unsigned and sign-extended)
- Tests sign-bit boundary conditions (0x7f/0x80, 0x7fff/0x8000)
- Tests source sub-register broadcasting into dual-operand ALU operations
- Cross-checks translation and mini-interpreter execution against independent Python reference oracle
- Standard library only, zero game data or proprietary assets
2026-11-21 19:06:56 +01:00
8abfd1f57c test(semantic): add interpreter tests for v_bfe_u32 and v_bfe_i32 2026-11-21 19:06:28 +01:00
da99c2434b test(tools): add test suite for rtti_scan.py 2026-11-21 19:06:16 +01:00
eda4ccd02c test(semantic): add interpreter tests for LDS atomic add (ds_add_u32, ds_add_rtn_u32) 2026-11-21 19:05:56 +01:00
5f3007f393 tests/semantic: cover ps_ops2, ps_ops3, ps_ops4 and ps_legacy_mul (+ check.py) 2026-11-21 15:05:54 -03:00
d711950655 test(semantic): whole-wave execution mask branching (s_cbranch_execz, s_cbranch_execnz) 2026-11-21 19:04:02 +01:00
12909a3db8 test(semantic): add interpreter tests for v_lshl_add_u32 and v_lshl_add_u64 2026-11-21 19:04:00 +01:00
f83fdcbd5a test(semantic): add interpreter tests for 64-bit scalar add and sub with carry 2026-11-21 19:03:57 +01:00
f2cb85c4a2 test(semantic): add interpreter tests for v_bfi_b32 bitfield insert 2026-11-21 19:03:52 +01:00