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

Merged
krishalivaibhav merged 1 commit from upstream-pr/2258 into main 2026-10-11 11:53:14 +00:00
krishalivaibhav commented 2026-10-09 13:29:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by krishalivaibhav on 2026-10-09T13:29:56Z.


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 d70b8998: 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 6036d142 combines #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 #2191 plus this contribution; the test-only branch intentionally requires #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 d70b8998; 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: #2191
  • AI-assisted: yes, prepared with OpenAI Codex and independently reviewed by additional agents; submitting author is responsible for the code
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4801092323 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2258). Originally posted by [krishalivaibhav](https://github.com/krishalivaibhav) on 2026-10-09T13:29:56Z. --- ### 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` d70b8998: 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 6036d142 combines #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](https://github.com/krishalivaibhav/AnyPS5/actions/runs/37922862066/job/113794730833) 9/9 selected tests passed, zero skipped, 0.48 seconds; [Windows](https://github.com/krishalivaibhav/AnyPS5/actions/runs/37923409713) 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 #2191 plus this contribution; the test-only branch intentionally requires #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 - [x] Based on main d70b8998; open overlapping PRs checked - [x] One topic: GPU-independent SPIR-V target regression coverage - [x] No comments added to code - [x] No unimplemented exports or silent stubs added - [x] No investigation notes, logs or images added to repository - [x] No new third-party dependencies - [x] Generic behavior, not specific to a title - [x] Depends on: #2191 - [x] AI-assisted: yes, prepared with OpenAI Codex and independently reviewed by additional agents; submitting author is responsible for the code
MarcZX10 commented 2026-10-09 13:42:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T13:42:33Z.


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6082127351 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2258#issuecomment-6082127351). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T13:42:33Z. --- 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 commented 2026-10-11 01:45:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tezzgod74 on 2026-10-11T01:45:10Z.


Checked that this catches #2138 without a GPU. Cherry-picked onto main 9ba3d0d7 (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 #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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104314202 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2258#issuecomment-6104314202). Originally posted by [tezzgod74](https://github.com/tezzgod74) on 2026-10-11T01:45:10Z. --- Checked that this catches #2138 without a GPU. Cherry-picked onto `main` 9ba3d0d7 (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 #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 commented 2026-10-11 05:05:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T05:05:40Z.


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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105682110 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2258#issuecomment-6105682110). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T05:05:40Z. --- #2191 is merged, so this passes on main now and fails with the emitter change reverted (run above). Please mark it ready for review.
adriadam10 commented 2026-10-11 11:53:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:53:11Z.


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108737126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2258#issuecomment-6108737126). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T11:53:11Z. --- 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!2258
No description provided.