test(shader): cover VOPC class and remaining compares #310

Closed
asimplestray wants to merge 1 commit from upstream-pr/310 into main
asimplestray commented 2026-10-02 03:34:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by asimplestray on 2026-10-02T03:34:04Z.


What

Test-only follow-up: the V_CMPX_CLASS_F16 implementation has since landed in main via other work (as emitFloat16ClassCompare), so this PR keeps only the regression test.

Adds the vector_compare_int64_f16 test (decode opcode + family + ALU classification plus translation of 26 VOPC int64/F16 encodings).

Tested

Linux (GCC, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF): full build, new test passes. Note: agc_driver_pixel_helper_lanes fails on current main independent of this PR (Vulkan pixel-helper assertion, no shader implementation touched here).

Checklist

  • Based on current main; no other open PR adds the same test (checked open shader PRs)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (decoding unknown opcodes still throws)
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4712371686 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/310). Originally posted by [asimplestray](https://github.com/asimplestray) on 2026-10-02T03:34:04Z. --- ### What Test-only follow-up: the `V_CMPX_CLASS_F16` implementation has since landed in `main` via other work (as `emitFloat16ClassCompare`), so this PR keeps only the regression test. Adds the `vector_compare_int64_f16` test (decode opcode + family + ALU classification plus translation of 26 VOPC int64/F16 encodings). ### Tested Linux (GCC, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`): full build, new test passes. Note: `agc_driver_pixel_helper_lanes` fails on current `main` independent of this PR (Vulkan pixel-helper assertion, no shader implementation touched here). ### Checklist - [x] Based on current `main`; no other open PR adds the same test (checked open shader PRs) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (decoding unknown opcodes still throws) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
oneandonlydean commented 2026-10-06 05:34:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T05:34:26Z.


Thanks for this. Since #539 landed, core/libs/prx/libSceAgcDriver/tests/execution/VopcCompare.cpp and VopcCompareTable.cpp run every non-f64 VOPC compare on the GPU in both its _e32 and _e64 forms and check the results. That includes v_cmpx_class_f16 and v_cmpx_nlt_f16, the two this PR covered that weren't executed before. The decode-only checks here don't add coverage on top of that, so I think this can be closed. If you find a compare form the execution test misses, adding it there would be welcome.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6010066992 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/310#issuecomment-6010066992). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-06T05:34:26Z. --- Thanks for this. Since #539 landed, `core/libs/prx/libSceAgcDriver/tests/execution/VopcCompare.cpp` and `VopcCompareTable.cpp` run every non-f64 VOPC compare on the GPU in both its `_e32` and `_e64` forms and check the results. That includes `v_cmpx_class_f16` and `v_cmpx_nlt_f16`, the two this PR covered that weren't executed before. The decode-only checks here don't add coverage on top of that, so I think this can be closed. If you find a compare form the execution test misses, adding it there would be welcome.
oneandonlydean commented 2026-10-06 21:20:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T21:20:22Z.


As I mentioned on 10-06, main's execution tests (VopcCompare.cpp and VopcCompareTable.cpp, from #539) already run these compares on the GPU in both encodings, including v_cmpx_class_f16 and v_cmpx_nlt_f16. So I'm closing this as superseded. Thanks for the work.

If you find a compare form those tests miss, a PR adding it there is welcome. If you think I've missed something here, please reopen.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6025667274 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/310#issuecomment-6025667274). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-06T21:20:22Z. --- As I mentioned on 10-06, main's execution tests (`VopcCompare.cpp` and `VopcCompareTable.cpp`, from #539) already run these compares on the GPU in both encodings, including `v_cmpx_class_f16` and `v_cmpx_nlt_f16`. So I'm closing this as superseded. Thanks for the work. If you find a compare form those tests miss, a PR adding it there is welcome. If you think I've missed something here, please reopen.

Pull request closed

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!310
No description provided.