[PR #1501] [CLOSED] crosslane_fuzz: support --pc-tail-ubo and LEONIDA_PC_TAIL_UBO (FUZZ-CROSSLANE-PC-TAIL-UBO) #1532

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1501
Author: @IlyassRS3
Created: 11/25/2026
Status: ❌ Closed

Base: main ← Head: feat/crosslane-fuzz-pc-tail-ubo


📝 Commits (1)

  • b7658d7 crosslane_fuzz: support --pc-tail-ubo and LEONIDA_PC_TAIL_UBO (FUZZ-CROSSLANE-PC-TAIL-UBO)

📊 Changes

2 files changed (+196 additions, -11 deletions)

View changed files

📝 tests/test_crosslane_fuzz.py (+161 -1)
📝 tools/crosslane_fuzz.py (+35 -10)

📄 Description

Claimed in the coordination issue as: FUZZ-CROSSLANE-PC-TAIL-UBO (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150559295)

What and why

Addresses @whoalin1's finding in #14: tools/crosslane_fuzz.py had no --pc-tail-ubo flag and did not honor LEONIDA_PC_TAIL_UBO, unlike tools/lds_fuzz.py, tools/valu_fuzz.py, and tools/image_fuzz.py. On 128-byte-push-constant GPUs (such as AMD RDNA2 iGPUs / gfx1036), vk_compute_test either exited 77 (counted as a harness error) when LEONIDA_PC_TAIL_UBO was unset, or ran against the wrong layout (0xEEEEEEEE pre-fill counted as mismatches) when LEONIDA_PC_TAIL_UBO=1 was set in the environment without forwarding --pc-tail-ubo to rdna2spirv.py.

  • Adds pc_tail_env() and --pc-tail-ubo to tools/crosslane_fuzz.py (args.pc_tail_ubo = args.pc_tail_ubo or pc_tail_env(), matching lds_fuzz.py, valu_fuzz.py, and image_fuzz.py).
  • Forwards --pc-tail-ubo to rdna2spirv.py in translate() and sets LEONIDA_PC_TAIL_UBO=1 in gpu_env() / run_gpu() across both run_translator() and --minimize (still_fails()).
  • Keeps 2-argument translate / 5-argument run_gpu / 2-tuple still_fails ctx compatibility when pc_tail is off, and isolates HarnessErrors._main in tests/test_crosslane_fuzz.py from an ambient LEONIDA_PC_TAIL_UBO=1.
  • Adds PcTailUbo unit tests covering CLI flag, env var variants (1/true/YES/on/0), flag overriding LEONIDA_PC_TAIL_UBO=0, translate(), gpu_env(), run_gpu(), and --minimize / still_fails().

Tested

  • python3 -I tests/test_crosslane_fuzz.py: 77/77 OK (2 hw-oracle tests skipped).
  • LEONIDA_PC_TAIL_UBO=1 python3 -I tests/test_crosslane_fuzz.py: 77/77 OK (2 skipped).
  • Mutation check against unpatched main (3ff2a2adc): tests/test_crosslane_fuzz.py PcTailUbo fails 4/4 (failures=4, errors=6).
  • python3 -I tools/crosslane_fuzz.py --self-test: self-test OK.
  • python3 -I tests/test_mc_command.py: 29/29 OK (2 skipped).
  • python3 -I tests/test_text_write_line_endings.py: 3/3 OK.
  • python3 -I scripts/check_no_game_data.py tools/crosslane_fuzz.py tests/test_crosslane_fuzz.py: clean.
  • python3 -m compileall -q tools/crosslane_fuzz.py tests/test_crosslane_fuzz.py: clean.

GPUs tested: n/a (macOS arm64 host; unit/CLI tests only, no Vulkan GPU harness)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — no translator rule changed)

🔄 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/1501 **Author:** [@IlyassRS3](https://github.com/IlyassRS3) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/crosslane-fuzz-pc-tail-ubo` --- ### 📝 Commits (1) - [`b7658d7`](https://github.com/ubiquitarianism/leonida/commit/b7658d7b3bd22538f4cbafec16c85bc97d6e6f15) crosslane_fuzz: support --pc-tail-ubo and LEONIDA_PC_TAIL_UBO (FUZZ-CROSSLANE-PC-TAIL-UBO) ### 📊 Changes **2 files changed** (+196 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_crosslane_fuzz.py` (+161 -1) 📝 `tools/crosslane_fuzz.py` (+35 -10) </details> ### 📄 Description Claimed in the coordination issue as: FUZZ-CROSSLANE-PC-TAIL-UBO (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150559295) ### What and why Addresses @whoalin1's finding in [#14](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150240878): `tools/crosslane_fuzz.py` had no `--pc-tail-ubo` flag and did not honor `LEONIDA_PC_TAIL_UBO`, unlike `tools/lds_fuzz.py`, `tools/valu_fuzz.py`, and `tools/image_fuzz.py`. On 128-byte-push-constant GPUs (such as AMD RDNA2 iGPUs / gfx1036), `vk_compute_test` either exited 77 (counted as a harness error) when `LEONIDA_PC_TAIL_UBO` was unset, or ran against the wrong layout (`0xEEEEEEEE` pre-fill counted as mismatches) when `LEONIDA_PC_TAIL_UBO=1` was set in the environment without forwarding `--pc-tail-ubo` to `rdna2spirv.py`. - Adds `pc_tail_env()` and `--pc-tail-ubo` to `tools/crosslane_fuzz.py` (`args.pc_tail_ubo = args.pc_tail_ubo or pc_tail_env()`, matching `lds_fuzz.py`, `valu_fuzz.py`, and `image_fuzz.py`). - Forwards `--pc-tail-ubo` to `rdna2spirv.py` in `translate()` and sets `LEONIDA_PC_TAIL_UBO=1` in `gpu_env()` / `run_gpu()` across both `run_translator()` and `--minimize` (`still_fails()`). - Keeps 2-argument `translate` / 5-argument `run_gpu` / 2-tuple `still_fails` `ctx` compatibility when `pc_tail` is off, and isolates `HarnessErrors._main` in `tests/test_crosslane_fuzz.py` from an ambient `LEONIDA_PC_TAIL_UBO=1`. - Adds `PcTailUbo` unit tests covering CLI flag, env var variants (`1`/`true`/`YES`/`on`/`0`), flag overriding `LEONIDA_PC_TAIL_UBO=0`, `translate()`, `gpu_env()`, `run_gpu()`, and `--minimize` / `still_fails()`. ### Tested - `python3 -I tests/test_crosslane_fuzz.py`: 77/77 OK (2 hw-oracle tests skipped). - `LEONIDA_PC_TAIL_UBO=1 python3 -I tests/test_crosslane_fuzz.py`: 77/77 OK (2 skipped). - Mutation check against unpatched `main` (`3ff2a2adc`): `tests/test_crosslane_fuzz.py PcTailUbo` fails 4/4 (`failures=4, errors=6`). - `python3 -I tools/crosslane_fuzz.py --self-test`: `self-test OK`. - `python3 -I tests/test_mc_command.py`: 29/29 OK (2 skipped). - `python3 -I tests/test_text_write_line_endings.py`: 3/3 OK. - `python3 -I scripts/check_no_game_data.py tools/crosslane_fuzz.py tests/test_crosslane_fuzz.py`: clean. - `python3 -m compileall -q tools/crosslane_fuzz.py tests/test_crosslane_fuzz.py`: clean. GPUs tested: n/a (macOS arm64 host; unit/CLI tests only, no Vulkan GPU harness) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a — no translator rule changed) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:21:34 +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#1532
No description provided.