Skip to content

Upstream PR batch 1 U4: SPIR-V post-pass and IR/control-flow compile-time CPU - #482

Merged
RINNECODER merged 10 commits into
mainfrom
upr1/spirv-postpass
Oct 14, 2026
Merged

RINNECODER merged 10 commits into
mainfrom
upr1/spirv-postpass

Conversation

@RINNECODER

Copy link
Copy Markdown
Owner

Upstream PR batch 1, unit U4: SPIR-V post-pass and IR/control-flow compile-time CPU. One commit per upstream PR, each with "Ported from upstream PR #N" in the body.

Ported

Skipped

None.

Added, not a port

fix(metal): accept a specialized BDA module that dropped one of its two BDA descriptors. With boykopovar#5064 in, a smoke run skipped 1111+ compute dispatches with "BDA ABI requires page-table and fault-buffer descriptor metadata": specialization pruned the unreferenced page-table variable but kept the fault buffer, and MetalShaderBridge.cpp demanded both roles. Bisected to boykopovar#5064 (skips absent at boykopovar#4035+boykopovar#4772, present at boykopovar#5064). The bridge now requires at least one of the two roles; the module's descriptors are still checked against the prepared plan. This is a check in our Metal bridge only, so no upstream comment draft applies.

Evidence

  • ShaderDiskCache FormatVersion unchanged (34): the payload layout is the same, and entries are already rejected when the source version differs.
  • Tests (x86_64 build, run under Rosetta): shader_ir_use_rewrite, agc_structurizer (+ intersection_off, iteration_selection_off, forced_fallback), agc_shader_control_flow (+ iteration_selection_off, forced_fallback), agc_spirv_module, agc_spirv_bvh_intersect_function, agc_shader_disk_cache, agc_formatted_buffer_once: 12/12 pass. With ANYPS5_ENABLE_SPIRV_TOOLS=ON: agc_spirv_optimizer (default, full, none) pass, also after the perf(shader): avoid redundancy traversal map copies boykopovar/AnyPS5#5511 patch. Metal bridge build (ANYPS5_METAL_SHADER_BRIDGE=ON): metal_utility_tests pass. No new test covers the bridge relaxation; it is exercised by the smoke below.
  • Game smoke, one 280 s run per tree (eboot lock, plugged in, cold shader cache): main and this branch both end in the same boot-movie loop with no fault and the same single unimplemented import. main: no skipped dispatches (one rejected PM4 submission). Branch: no skipped dispatches or conversion failures; the Metal pipeline archive write failed once (cannot pack in the GPU archiver), which is environmental. Compared by log only; no screenshots taken.
  • Performance: not measured. No compile-time CPU numbers on Metal were taken, so no speedup is claimed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj

RINNECODER and others added 10 commits October 13, 2026 19:27
Ported from upstream PR boykopovar#4035

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from upstream PR boykopovar#4772

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from upstream PR boykopovar#4827

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from upstream PR boykopovar#5064

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation

Ported from upstream PR boykopovar#5315

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from upstream PR boykopovar#4288

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…und shared merge splitting growth

Includes the stacked upstream commit that structurizes refused control flow
with reach flags, which this change builds on.

Ported from upstream PR boykopovar#5028

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… variant

Ported from upstream PR boykopovar#5455

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Patches the bundled SPIRV-Tools redundancy elimination (only built with
ANYPS5_ENABLE_SPIRV_TOOLS=ON).

Ported from upstream PR boykopovar#5511

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wo BDA descriptors

Specialization removes descriptor variables the final module no longer
references. With helper functions now discarded after specialization, a
compute module can drop its page-table variable while keeping the fault
buffer, and the bridge then rejected the dispatch ("BDA ABI requires
page-table and fault-buffer descriptor metadata"). Require at least one of
the two roles instead of both; the module's own descriptors are still
checked against the prepared plan.

Not a port; needed by the port of upstream PR boykopovar#5064.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RINNECODER RINNECODER added the upstream-sync Upstream boykopovar/AnyPS5 intake label Oct 14, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T02:22:06.216450Z 170b5c4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a7431bee-209c-44aa-bf43-10a01e49727e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RINNECODER
RINNECODER merged commit 097671b into main Oct 14, 2026
6 checks passed
@RINNECODER
RINNECODER deleted the upr1/spirv-postpass branch October 14, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream-sync Upstream boykopovar/AnyPS5 intake

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant