shader: implement DS_INC_U32 and DS_DEC_U32 #790

Manually merged
github merged 1 commit from gh-pr/790/head into gh-pr/790/base 2026-11-26 09:32:27 +00:00
Owner

@⁠joaodiaslobo on GitHub · 2026-09-23 19:01 UTC · original
joaodiaslobo:shader/ds-inc-dec-u32 → main · +24 −9 · 5 files · 1 commits · merged 2026-09-23 20:45 UTC

Adds support for DS_INC_U32 (0x03) and DS_DEC_U32 (0x04) instructions.

Both route through the existing DS_ATOMIC helper with returns_value = false, reusing the SharedAtomicInc32/SharedAtomicDec32 IR opcodes added with the return forms.

DsAtomicNoReturnVariants is extended to cover both instructions across every branch of their wrap semantics.

Tested on Windows with clang-cl.

  • shader_recompiler_compute_tests build: passed
  • shader_cfg_tests build: passed
  • shader_recompiler_compute CTest: passed
  • shader_cfg CTest: passed
**@⁠joaodiaslobo** on GitHub · 2026-09-23 19:01 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/790) `joaodiaslobo:shader/ds-inc-dec-u32` → `main` · +24 −9 · 5 files · 1 commits · merged 2026-09-23 20:45 UTC Adds support for `DS_INC_U32` (0x03) and `DS_DEC_U32` (0x04) instructions. Both route through the existing `DS_ATOMIC` helper with `returns_value = false`, reusing the `SharedAtomicInc32`/`SharedAtomicDec32` IR opcodes added with the return forms. `DsAtomicNoReturnVariants` is extended to cover both instructions across every branch of their wrap semantics. Tested on Windows with clang-cl. - shader_recompiler_compute_tests build: passed - shader_cfg_tests build: passed - shader_recompiler_compute CTest: passed - shader_cfg CTest: passed
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:32:25 +00:00
github manually merged commit 9290f1e068 into gh-pr/790/base 2026-11-26 09:32:27 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-23 19:07 UTC · original

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: 33e6cd39-52b3-4d59-9c85-2eb6dc8c73bf

📥 Commits

Reviewing files that changed from the base of the PR and between 569ec04d1a and 9290f1e068.

📒 Files selected for processing (5)
  • src/graphics/shader/recompiler/frontend/decode/MemoryOps.cpp
  • src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.cpp
  • src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h
  • src/graphics/shader/recompiler/frontend/translate/Memory.cpp
  • tests/ShaderRecompilerComputeTests.cpp

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


📝 Walkthrough

Walkthrough

The decoder now recognizes non-returning DS increment and decrement variants. The translator dispatches these variants to shared atomic operations without returning a value. The compute test includes additional inputs and expected outputs for the variants.

Suggested reviewers: nmzik

Merge Risk: ⚪ Minimal · up to 9290f

No actionable merge-blocking issue remains for the new DS increment and decrement instructions after normal checks.

🚥 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 3 functions across 4 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: support for the DS_INC_U32 and DS_DEC_U32 shader instructions.
Description check ✅ Passed The description accurately explains the added instruction support, implementation approach, test coverage, and reported validation results.
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.
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 3 functions across 4 files. (1 skipped: 1 too large.)


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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-23 19:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/790#issuecomment-5801159609) <!-- 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/790"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> Navigate logical layers of code changes, visualize relationships, and explore their blast radius. <!-- 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**: `33e6cd39-52b3-4d59-9c85-2eb6dc8c73bf` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 569ec04d1a77127c601eed522ad5bba187173f9d and 9290f1e0684f1e3f4c6504bd5d331e5c514be255. </details> <details> <summary>📒 Files selected for processing (5)</summary> * `src/graphics/shader/recompiler/frontend/decode/MemoryOps.cpp` * `src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.cpp` * `src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h` * `src/graphics/shader/recompiler/frontend/translate/Memory.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 9 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The decoder now recognizes non-returning DS increment and decrement variants. The translator dispatches these variants to shared atomic operations without returning a value. The compute test includes additional inputs and expected outputs for the variants. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `9290f` <!-- final_review_risk_coverage:{"sourceCommitId":"9290f1e0684f1e3f4c6504bd5d331e5c514be255","coveredCommitId":"9290f1e0684f1e3f4c6504bd5d331e5c514be255","kind":"reviewed"} --> No actionable merge-blocking issue remains for the new DS increment and decrement instructions after normal checks. <!-- final_review_risk_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 3 functions across 4 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 | | :------------------------: | :------- | :------------------------------------------------------------------------------------------------------------------------------------------ | | Title check | ✅ Passed | The title clearly and concisely identifies the main change: support for the DS_INC_U32 and DS_DEC_U32 shader instructions. | | Description check | ✅ Passed | The description accurately explains the added instruction support, implementation approach, test coverage, and reported validation results. | | 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. | </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 3 functions across 4 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.