Skip to content

test(semantic): add cubemap projection suite bundle - #5893

Open
slopgobblercobbler wants to merge 25 commits into
ItsNotRexed:mainfrom
slopgobblercobbler:test/semantic-valu-cubemap-bundle
Open

slopgobblercobbler wants to merge 25 commits into
ItsNotRexed:mainfrom
slopgobblercobbler:test/semantic-valu-cubemap-bundle

Conversation

@slopgobblercobbler

Copy link
Copy Markdown
Contributor

What

Adds comprehensive translator-backed regression tests and reference mathematical models for Subsystem Feature Bundle 16: VALU Cubemap Coordinates & Projection Suite in tests/semantic/test_valu_cubemap_bundle.py.

Covers all 4 RDNA2 cubemap coordinate projection operations (24 granular commits):

  1. v_cubeid_f32 - Face index selection (0.0 to 5.0) under |Z| >= |Y| >= |X| priority rules
  2. v_cubesc_f32 - S coordinate projection across all 6 cubemap faces
  3. v_cubetc_f32 - T coordinate projection across all 6 cubemap faces
  4. v_cubema_f32 - Major axis magnitude calculation (2 * major_axis) with hardware +0.0 normalization for ±0.0

Each opcode includes:

  • Reference mathematical oracle matching RDNA2 hardware specification
  • Structural AST coordinate projection typing and register allocation validation
  • Deterministic scalar interpreter
  • Multi-lane SIMD divergence and Wave32 / Wave64 EXEC masking
  • IEEE 754 boundary extremes (signed zeros, tied axis priority, face boundary rays)
  • End-to-end SPIR-V assembly translation through tools/rdna2spirv.py via support.translate_lines and MRT0 output verification

Tested

  • Tested with Python 3.9+ (python -I)
  • python -I tests/test_semantic_translator_use.py (Passes translator reachability check)
  • python -I tests/semantic/test_valu_cubemap_bundle.py (All 24 test suites OK)
  • Standard library Python only (unittest, struct, math)
  • Clean merge against upstream/main
  • Strictly zero game data, binaries, or proprietary keys

@memorypressure

Copy link
Copy Markdown

Verified against main 561b65a: merges cleanly, 26/26 pass (re-run), guard green; 7 translate sites, rest oracle, and main's test_valu_cube.py already covers all four v_cube* mnemonics through the translator — oracle/mutation depth rather than new coverage, same note as #5901/#5898. Mnemonics all real. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

@BeegSchmooze

Copy link
Copy Markdown

Mutation check of the current head with a generic run (tools/semantic_mutants.py --op v_cubeid_f32, #6548; the branch handles all four cube ops): 15 of 15 mutants caught, so the translated cases pin v_cubeid/v_cubesc/v_cubetc/v_cubema as described. Nothing to flag. Windows 11, Python 3.13.

AI-assisted (Claude Code). No game files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants