[PR #1782] [MERGED] docs/shader_validation.md: document tools/d16_image_probe.py and tools/semantic_mutants.py (DOC-SHADER-VAL-D16-MUTANTS) #1794

Closed
opened 2026-11-26 21:18:58 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1782
Author: @ShotTechOp
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @Andretuta

Base: main ← Head: docs/shader-validation-d16-and-mutants


📝 Commits (1)

  • 7ea654f docs/shader_validation.md: document tools/d16_image_probe.py and tools/semantic_mutants.py (DOC-SHADER-VAL-D16-MUTANTS)

📊 Changes

1 file changed (+44 additions, -0 deletions)

View changed files

📝 docs/shader_validation.md (+44 -0)

📄 Description

Summary

Claimed in #1608 as DOC-SHADER-VAL-D16-MUTANTS: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7161808658

Documents two existing shader-validation tools in docs/shader_validation.md that were not yet mentioned anywhere in docs/:

  1. tools/d16_image_probe.py (placed right after its buffer-load counterpart tools/d16_format_probe.py):
    • Summarizes the image_load, point image_sample_lz, and bilinear image_sample_lz (--frac) paths across unorm8, snorm8, unorm16, snorm16, float16, and float32 (f16 halfway ties).
    • Lists CLI options (--formats, --waves, --frac, --json, --hw-arch, --self-test), exit codes (0/1/2/77), and its unit test suite tests/test_d16_image_probe.py.
  2. tools/semantic_mutants.py (placed right before ## Coverage plan and cost):
    • Summarizes op-scoped one-line mutation testing of tools/rdna2spirv.py against a tests/semantic test file via LEONIDA_TOOLS_DIR (same hook as tests/semantic/test_mutations.py).
    • Uses existing tests/semantic/test_alu_sad.py with --op v_sad_u8 (no stale hardcoded --lines range), lists selectors (--op, --function, --lines), --list, --timeout, exit codes (0/1/2), and tests/test_semantic_mutants.py.

Zero line overlap with open #1605 (which deduplicates lines 1998–2184).

Testing

Environment: Windows 11 x64, Python 3.12.10, CPU-only (no GPU or game files; based on 0d80bc5).

  • python -I tools/d16_image_probe.py --self-test -> self-test ok
  • python -I tools/semantic_mutants.py tests/semantic/test_alu_sad.py --op v_sad_u8 --list -> lists 31 mutants cleanly (exit 0)
  • python -m unittest discover -s tests -p "test_docs_*.py" -> all doc-integrity suites pass
  • python -I scripts/check_no_game_data.py docs/shader_validation.md -> exit 0
  • git diff --check -> clean

AI-assisted: yes (Antigravity). Docs-only; no game data.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1782 **Author:** [@ShotTechOp](https://github.com/ShotTechOp) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@Andretuta](https://github.com/Andretuta) **Base:** `main` ← **Head:** `docs/shader-validation-d16-and-mutants` --- ### 📝 Commits (1) - [`7ea654f`](https://github.com/ubiquitarianism/leonida/commit/7ea654f9ac95c1db13e69841c791d2ab47c525a7) docs/shader_validation.md: document tools/d16_image_probe.py and tools/semantic_mutants.py (DOC-SHADER-VAL-D16-MUTANTS) ### 📊 Changes **1 file changed** (+44 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/shader_validation.md` (+44 -0) </details> ### 📄 Description ## Summary Claimed in #1608 as `DOC-SHADER-VAL-D16-MUTANTS`: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7161808658 Documents two existing shader-validation tools in `docs/shader_validation.md` that were not yet mentioned anywhere in `docs/`: 1. **`tools/d16_image_probe.py`** (placed right after its buffer-load counterpart `tools/d16_format_probe.py`): - Summarizes the `image_load`, point `image_sample_lz`, and bilinear `image_sample_lz` (`--frac`) paths across `unorm8`, `snorm8`, `unorm16`, `snorm16`, `float16`, and `float32` (f16 halfway ties). - Lists CLI options (`--formats`, `--waves`, `--frac`, `--json`, `--hw-arch`, `--self-test`), exit codes (`0`/`1`/`2`/`77`), and its unit test suite `tests/test_d16_image_probe.py`. 2. **`tools/semantic_mutants.py`** (placed right before `## Coverage plan and cost`): - Summarizes op-scoped one-line mutation testing of `tools/rdna2spirv.py` against a `tests/semantic` test file via `LEONIDA_TOOLS_DIR` (same hook as `tests/semantic/test_mutations.py`). - Uses existing `tests/semantic/test_alu_sad.py` with `--op v_sad_u8` (no stale hardcoded `--lines` range), lists selectors (`--op`, `--function`, `--lines`), `--list`, `--timeout`, exit codes (`0`/`1`/`2`), and `tests/test_semantic_mutants.py`. Zero line overlap with open `#1605` (which deduplicates lines 1998–2184). ## Testing Environment: Windows 11 x64, Python 3.12.10, CPU-only (no GPU or game files; based on `0d80bc5`). - `python -I tools/d16_image_probe.py --self-test` -> `self-test ok` - `python -I tools/semantic_mutants.py tests/semantic/test_alu_sad.py --op v_sad_u8 --list` -> lists 31 mutants cleanly (exit 0) - `python -m unittest discover -s tests -p "test_docs_*.py"` -> all doc-integrity suites pass - `python -I scripts/check_no_game_data.py docs/shader_validation.md` -> exit 0 - `git diff --check` -> clean AI-assisted: yes (Antigravity). Docs-only; no game data. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:18:58 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1794
No description provided.