shader: add S_BITCMP0_B64 and S_BITCMP1_B64 #688

Manually merged
github merged 4 commits from gh-pr/688/head into gh-pr/688/base 2026-11-26 09:29:51 +00:00
Owner

@⁠ElijaOwO on GitHub · 2026-09-18 00:31 UTC · original
ElijaOwO:shader-s-bitcmp-b64 → main · +132 −1 · 6 files · 4 commits · merged 2026-09-20 15:36 UTC

Adds support for the SOPC S_BITCMP0_B64 and S_BITCMP1_B64 instructions. Each instruction selects a bit from its 64-bit source using the low six bits of the index and writes the comparison result to SCC.

Compute tests cover runtime-loaded register pairs and indices, word boundaries and index wrapping, SCC-driven selections and branches, integer inline constants, and literal operands. Both cases run in the existing compute suite.

Validation:

  • shader_cfg
  • Both S_BITCMP_B64 compute cases on NVIDIA Vulkan
  • shader_cfg_tests and shader_recompiler_compute_tests builds
**@⁠ElijaOwO** on GitHub · 2026-09-18 00:31 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/688) `ElijaOwO:shader-s-bitcmp-b64` → `main` · +132 −1 · 6 files · 4 commits · merged 2026-09-20 15:36 UTC Adds support for the SOPC `S_BITCMP0_B64` and `S_BITCMP1_B64` instructions. Each instruction selects a bit from its 64-bit source using the low six bits of the index and writes the comparison result to SCC. Compute tests cover runtime-loaded register pairs and indices, word boundaries and index wrapping, SCC-driven selections and branches, integer inline constants, and literal operands. Both cases run in the existing compute suite. Validation: - `shader_cfg` - Both S_BITCMP_B64 compute cases on NVIDIA Vulkan - `shader_cfg_tests` and `shader_recompiler_compute_tests` builds
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:29:50 +00:00
github manually merged commit 7b2d9a4589 into gh-pr/688/base 2026-11-26 09:29:51 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-18 00:36 UTC · original · edited 2026-09-20 15:36 UTC

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a9177ade-6601-4565-b677-c35a5ef8ea4c

📥 Commits

Reviewing files that changed from the base of the PR and between a8cfb1e200 and 7b2d9a4589.

📒 Files selected for processing (1)
  • tests/ShaderRecompilerComputeTests.cpp
💤 Files with no reviewable changes (1)
  • tests/ShaderRecompilerComputeTests.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The shader decoder now defines and maps S_BITCMP0_B64 and S_BITCMP1_B64. Scalar translation dispatches both opcodes to shared 64-bit bit comparison logic. The logic masks the index, selects the relevant 32-bit word, extracts the bit, and updates the comparison result. Tests cover dynamic operands, constants, boundary indices, branching, and suite registration. The dedicated execution mode was removed.

Priority: ⬇️ Low

Change: Feature

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding support for S_BITCMP0_B64 and S_BITCMP1_B64.
Description check ✅ Passed The description directly explains the instruction support, implementation behavior, tests, and validation for the changeset.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 too large.)


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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-18 00:36 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/688#issuecomment-5723207551) · edited 2026-09-20 15:36 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/688#gh-light-mode-only"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg" alt="Review Change Stack" width="202" height="32"></a><a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/688#gh-dark-mode-only"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg" alt="Review Change Stack" width="202" height="32"></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary>ℹ️ Recent review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `a9177ade-6601-4565-b677-c35a5ef8ea4c` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between a8cfb1e200de517153015de4d3dbc66b0b7faac5 and 7b2d9a45892a15cf46ba352a3ab0687fe6b30880. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `tests/ShaderRecompilerComputeTests.cpp` </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * tests/ShaderRecompilerComputeTests.cpp </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 8 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The shader decoder now defines and maps `S_BITCMP0_B64` and `S_BITCMP1_B64`. Scalar translation dispatches both opcodes to shared 64-bit bit comparison logic. The logic masks the index, selects the relevant 32-bit word, extracts the bit, and updates the comparison result. Tests cover dynamic operands, constants, boundary indices, branching, and suite registration. The dedicated execution mode was removed. </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"7b2d9a45892a15cf46ba352a3ab0687fe6b30880" --> **Change:** Feature <!-- change_assessment_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary> ### ❌ Failed checks (1 warning) | Check name | Status | Explanation | Resolution | | :----------------: | :--------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 … | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :--------------------------------------------------------------------------------------------------------------------------- | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Title check | ✅ Passed | The title clearly and concisely describes the primary change: adding support for S_BITCMP0_B64 and S_BITCMP1_B64. | | Description check | ✅ Passed | The description directly explains the instruction support, implementation behavior, tests, and validation for the changeset. | </details> <details> <summary>Full details: Docstring Coverage</summary> **Explanation** Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 too large.) </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> --- <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.