Skip to content

test(shader): cover SPIR-V 1.3 image compilation without a GPU - #2258

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
krishalivaibhav:codex/spirv13-image-regression
Oct 11, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
krishalivaibhav:codex/spirv13-image-regression

Conversation

@krishalivaibhav

@krishalivaibhav krishalivaibhav commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

Issue #2138's image validation failure depends on the requested SPIR-V version. Existing GPU execution tests can miss it when the available device selects SPIR-V 1.4 or skips execution.

Add a CPU-only regression using the synthetic image-load-and-buffer-store fixture from ImageSint8.cpp. Compile the real recompiler output against explicit Vulkan 1.1 / SPIR-V 1.3 and Vulkan 1.1 / SPIR-V 1.4 targets, with shader caching disabled. Register default, full and disabled optimization variants when SPIRV-Tools is enabled; each has a 30-second timeout. Validation runs on complete emitted modules before optimization through Recompile.

Depends on #2191. That PR supplies the FMASK predicate correction and the prepared-mesh fixture correction. This PR contains only regression coverage and its build registration; it does not implement those fixes, test the mesh fixture, or claim game/GPU execution correctness.

Tested

  • Baseline main d70b899: the new regression fails in all three optimizer modes with the exact issue diagnostic, Expected vector sizes of Result Type and the condition to be equal: Select.
  • Separate integration source 6036d14 combines fix(shader): keep vector selects valid on SPIR-V 1.3 targets #2191's two commits (preserving original author attribution) and this regression. Native Apple M2 component build of the real recompiler: both SPIR-V targets pass in default/full/none modes. Existing storage-only constant-store tests also pass.
  • Native component harness used repository glslang and SPIRV-Headers submodules, with Homebrew SPIRV-Tools 1.4.363.0. This is not a full macOS runtime build.
  • Bundled-tool validation of integration source 6036d142: Linux 9/9 selected tests passed, zero skipped, 0.48 seconds; Windows 9/9 selected tests passed, zero skipped, 1.02 seconds. The new regression passes in default/full/none modes on both platforms.
  • The initial Windows validation attempt failed during an FFmpeg certificate-verified download because our fork-only workflow omitted the project's Windows certificate bundle setting. Correcting that setting allowed the retry to pass. No test or production code changed for the retry.
  • These are selected CPU regression checks, not full CTest suites or GPU/title execution. They test fix(shader): keep vector selects valid on SPIR-V 1.3 targets #2191 plus this contribution; the test-only branch intentionally requires fix(shader): keep vector selects valid on SPIR-V 1.3 targets #2191 to pass.
  • Conventions and whitespace checks pass. Two independent agent reviews found no actionable test/build or correctness findings before the fork validation push.

Checklist

  • Based on main d70b899; open overlapping PRs checked
  • One topic: GPU-independent SPIR-V target regression coverage
  • No comments added to code
  • No unimplemented exports or silent stubs added
  • No investigation notes, logs or images added to repository
  • No new third-party dependencies
  • Generic behavior, not specific to a title
  • Depends on: fix(shader): keep vector selects valid on SPIR-V 1.3 targets #2191
  • AI-assisted: yes, prepared with OpenAI Codex and independently reviewed by additional agents; submitting author is responsible for the code

@github-actions github-actions Bot added build agc libSceAgc* labels Oct 9, 2026
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The exact-head Conventions check fails because the PR body does not fill the template field in its required form. The checker looks for Depends on: #2191 (or Depends on: none) in the checklist; the current Depends on #2191 line is missing the colon and field format. Please update that line and push/edit the body, then rerun checks. The failure is recorded at https://github.com/boykopovar/AnyPS5/actions/runs/37937266178/job/113842361011.

@tezzgod74

Copy link
Copy Markdown
Contributor

Checked that this catches #2138 without a GPU. Cherry-picked onto main 9ba3d0d (Windows 11, MinGW-w64 GCC 15.2.0 r7, -DANYPS5_ENABLE_SPIRV_TOOLS=ON):

  • With main: agc_spirv13_image, agc_spirv13_image_full and agc_spirv13_image_none pass.
  • With the fix(shader): keep vector selects valid on SPIR-V 1.3 targets #2191 emitter change reverted (git revert --no-commit 1774cc9d): all three fail with level=2 word=1301: Expected vector sizes of Result Type and the condition to be equal: Select.

So the 1.3 path is now covered on CI, where every device targets 1.4.

AI-assisted: yes

@oneandonlydean

Copy link
Copy Markdown
Collaborator

#2191 is merged, so this passes on main now and fails with the emitter change reverted (run above). Please mark it ready for review.

@krishalivaibhav
krishalivaibhav marked this pull request as ready for review October 11, 2026 11:21
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked on main + this PR with SPIRV-Tools on: agc_spirv13_image, _full and _none pass. With the #2191 emitter change reverted all three fail, so the SPIR-V 1.3 path is covered without a GPU. Matches @tezzgod74's Windows run. Merging.

@adriadam10
adriadam10 merged commit 2e2c531 into boykopovar:main Oct 11, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants