Skip to content

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

Closed
IlyassRS3 wants to merge 1 commit into
ProjectLeonida:mainfrom
IlyassRS3:feat/crosslane-fuzz-pc-tail-ubo
Closed

IlyassRS3 wants to merge 1 commit into
ProjectLeonida:mainfrom
IlyassRS3:feat/crosslane-fuzz-pc-tail-ubo

Conversation

@IlyassRS3

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: FUZZ-CROSSLANE-PC-TAIL-UBO (#14 (comment))

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)

Copilot AI balanced review requested due to automatic review settings November 25, 2026 02:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ytsodacan

ytsodacan commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

[KEEP]

@ytsodacan

ytsodacan commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

[CLOSE] as duplicate of #1507.

@aslan2142

Copy link
Copy Markdown
Collaborator

Thanks for this! Closing as a duplicate: #1507 landed the same --pc-tail-ubo change to tools/crosslane_fuzz.py (merged as ab2fb71cb).

AI-assisted (Claude Code, Claude Opus 5.5).

@aslan2142 aslan2142 closed this Nov 25, 2026
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.

4 participants