graphics: bind draw shader buffers after the draw inputs that can join them #2224

Closed
github-bot wants to merge 3 commits from gh-pr/2224/head into gh-pr/2224/base
Owner

@⁠Nawid3333 on GitHub · 2026-11-12 00:52 UTC · original
Nawid3333:fix/draw-inputs-before-buffer-bindings-r2 → main · +250 −7 · 4 files · 3 commits · closed without merging

Cause

RenderExecutor::ExecutePreparedDraw calls PrepareGraphicsBindings (renderDraw.cpp:1112 at bc934ef03), which ends with the RebindBuffers loop (descriptors.cpp:913-918): NativeStorageBuffer takes the cache buffer of every storage binding of every stage. Only after that does the draw acquire its own inputs: the vertex buffers (AcquireVertexBuffers), the index buffer (PrepareIndexBuffer, or ObtainBuffer for mesh indices) and the indirect arguments (ObtainBuffer, renderDraw.cpp:1113-1131).

An input range that spans two existing cache buffers makes ObtainBuffer create one buffer over both: CreateBuffer calls JoinOverlap (bufferCache.cpp:402-417) and the old buffers are deleted (DeleteBuffer, bufferCache.cpp:154, which defers the erase to GPU completion). When one of those old buffers was a storage binding of the draw, the shader writes into the retired buffer, and every later read of that memory uses the new one, so the writes are lost.

The compute path already acquires its indirect arguments before RebindBuffers (renderCompute.cpp:512-516, "Acquiring arguments can merge cache buffers; finalize shader bindings afterward"). The draw path is the remaining case.

Change

The RebindBuffers loop, with its comment, moves from the end of PrepareGraphicsBindings to ExecutePreparedDraw, after the vertex, index and indirect-argument acquisitions and before GetGraphicsPipeline (renderDraw.cpp:1132-1136 at 57aa9d7f7). ExecutePreparedDraw is the only caller of PrepareGraphicsBindings outside the tests; the two test wrappers (RenderExecutorTestAccess::PrepareGraphicsBindings) call RebindBuffers after it themselves, so the tests that use them keep their bindings.

Closed #532 re-resolved every binding after every range-changing operation; it was closed after an in-game comparison showed corrupted geometry. This change keeps the existing binding code and only uses the order compute already uses.

Tests

shader_recompiler_compute_tests adds CheckDrawStorageBufferJoin in two variants (selectors --draw-storage-join-only and --draw-index-storage-join-only, ctest graphics_draw_storage_join and graphics_draw_index_storage_join). A vertex shader stores a marker word into a storage buffer. The storage buffer and the draw's indirect record (first variant) or its index range (second variant) sit in two separate 16 KiB cache buffers, and the record or index range crosses the page boundary between them, so acquiring it joins both. Before the draw the test checks two separate owners and a GPU-modified record (so the record does not take the streaming copy). After the draw it checks that the draw was accepted, merged both owners and covered the target, and then reads back the shader's output.

On main (bc934ef03) with the tests, both variants fail with every precondition passing:

DrawIndirectStorageJoin failed at VS write visible: word 0 expected 0x13579bdf, got 0xa5a5a5a5
DrawIndexStorageJoin failed at VS write visible: word 0 expected 0x13579bdf, got 0xa5a5a5a5

With the change both pass. The full suite (keep-going) has the same 22 failed checks with and without the change, with identical messages; they are failures of the test harness on this machine that were known before. This was run on an AMD RX 9070 XT with the local harness changes described in #2193.

Fork CI on this head (run 43100001998) passed on Windows, Linux and macOS.

Costs

None: the same calls run in another order.

In a game

No game is known to show this yet.

Written with Claude Code (AI): Codex found the ordering gap in a review of recent main commits; Claude Code wrote the test and the change and ran them.

**@⁠Nawid3333** on GitHub · 2026-11-12 00:52 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2224) `Nawid3333:fix/draw-inputs-before-buffer-bindings-r2` → `main` · +250 −7 · 4 files · 3 commits · closed without merging ## Cause `RenderExecutor::ExecutePreparedDraw` calls `PrepareGraphicsBindings` (renderDraw.cpp:1112 at bc934ef03), which ends with the `RebindBuffers` loop (descriptors.cpp:913-918): `NativeStorageBuffer` takes the cache buffer of every storage binding of every stage. Only after that does the draw acquire its own inputs: the vertex buffers (`AcquireVertexBuffers`), the index buffer (`PrepareIndexBuffer`, or `ObtainBuffer` for mesh indices) and the indirect arguments (`ObtainBuffer`, renderDraw.cpp:1113-1131). An input range that spans two existing cache buffers makes `ObtainBuffer` create one buffer over both: `CreateBuffer` calls `JoinOverlap` (bufferCache.cpp:402-417) and the old buffers are deleted (`DeleteBuffer`, bufferCache.cpp:154, which defers the erase to GPU completion). When one of those old buffers was a storage binding of the draw, the shader writes into the retired buffer, and every later read of that memory uses the new one, so the writes are lost. The compute path already acquires its indirect arguments before `RebindBuffers` (renderCompute.cpp:512-516, "Acquiring arguments can merge cache buffers; finalize shader bindings afterward"). The draw path is the remaining case. ## Change The `RebindBuffers` loop, with its comment, moves from the end of `PrepareGraphicsBindings` to `ExecutePreparedDraw`, after the vertex, index and indirect-argument acquisitions and before `GetGraphicsPipeline` (renderDraw.cpp:1132-1136 at 57aa9d7f7). `ExecutePreparedDraw` is the only caller of `PrepareGraphicsBindings` outside the tests; the two test wrappers (`RenderExecutorTestAccess::PrepareGraphicsBindings`) call `RebindBuffers` after it themselves, so the tests that use them keep their bindings. Closed #532 re-resolved every binding after every range-changing operation; it was closed after an in-game comparison showed corrupted geometry. This change keeps the existing binding code and only uses the order compute already uses. ## Tests `shader_recompiler_compute_tests` adds `CheckDrawStorageBufferJoin` in two variants (selectors `--draw-storage-join-only` and `--draw-index-storage-join-only`, ctest `graphics_draw_storage_join` and `graphics_draw_index_storage_join`). A vertex shader stores a marker word into a storage buffer. The storage buffer and the draw's indirect record (first variant) or its index range (second variant) sit in two separate 16 KiB cache buffers, and the record or index range crosses the page boundary between them, so acquiring it joins both. Before the draw the test checks two separate owners and a GPU-modified record (so the record does not take the streaming copy). After the draw it checks that the draw was accepted, merged both owners and covered the target, and then reads back the shader's output. On main (bc934ef03) with the tests, both variants fail with every precondition passing: ``` DrawIndirectStorageJoin failed at VS write visible: word 0 expected 0x13579bdf, got 0xa5a5a5a5 DrawIndexStorageJoin failed at VS write visible: word 0 expected 0x13579bdf, got 0xa5a5a5a5 ``` With the change both pass. The full suite (keep-going) has the same 22 failed checks with and without the change, with identical messages; they are failures of the test harness on this machine that were known before. This was run on an AMD RX 9070 XT with the local harness changes described in #2193. Fork CI on this head ([run 43100001998](https://github.com/Nawid3333/KytyPS5/actions/runs/43100001998)) passed on Windows, Linux and macOS. ## Costs None: the same calls run in another order. ## In a game No game is known to show this yet. Written with Claude Code (AI): Codex found the ordering gap in a review of recent main commits; Claude Code wrote the test and the change and ran them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The draw join tests write a storage buffer from the vertex shader, which
needs vertexPipelineStoresAndAtomics (VUID-RuntimeSpirv-NonWritable-06341).
The emulator already requires and enables it (vulkanWindow.cpp); the
harness now does too, and skips rasterization cases without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:17:05 +00:00
github-bot closed this pull request 2026-11-26 10:17:05 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-12 00:59 UTC · original · edited 2026-11-13 15:25 UTC

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Graphics draw execution now rebinds prepared shader-stage buffers after indirect-argument buffer acquisition and before pipeline and render-target setup. The change also adds tests for indirect and indexed draws whose records span separate buffer-cache pages, with dedicated command-line modes and CTest entries.

Suggested reviewers: nmzik, defektu, senaxx

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: Minimal · up to 5c031

The draw path now rebinds shader-stage buffers after draw inputs are acquired, and the new tests skip cleanly on devices that lack the required Vulkan feature. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the draw path now rebinds shader buffers after the draw inputs that can join cache buffers are acquired. The changeset moves the RebindBuffers loop from PrepareGraphic…
Description check Passed The description explains the cause (RebindBuffers runs before vertex, index, and indirect-argument buffers are acquired, so a joined cache buffer can retire a bound storage buffer), the change (moving…
Linked Issues check Passed The only directly linked issue, #532, is closed and marked as historical context only. Its acceptance criteria do not apply to this pull request, so no active linked-issue coding requirements remain. …
Out of Scope Changes check Passed All changes relate to the stated objective: the order of RebindBuffers relative to vertex, index and indirect-argument acquisition in the graphics draw path. descriptors.cpp removes the RebindBuffers …
Full details: Title check

Explanation

The title names the main change: the draw path now rebinds shader buffers after the draw inputs that can join cache buffers are acquired. The changeset moves the RebindBuffers loop from PrepareGraphicsBindings to ExecutePreparedDraw, which matches the title. The title is long at 75 characters, but it is specific and accurate.

Full details: Description check

Explanation

The description explains the cause (RebindBuffers runs before vertex, index, and indirect-argument buffers are acquired, so a joined cache buffer can retire a bound storage buffer), the change (moving the loop after those acquisitions), and the tests (CheckDrawStorageBufferJoin with two ctest variants, with failing and passing results). It is directly related to the changeset.

Full details: Linked Issues check

Explanation

The only directly linked issue, #532, is closed and marked as historical context only. Its acceptance criteria do not apply to this pull request, so no active linked-issue coding requirements remain. The pull request does not implement #532's requested redesign (PublishBuffers, FindPublishedOwner, published flag). It keeps the existing binding code and changes only the order of the RebindBuffers loop in the draw path. This difference does not fail the check because #532 is not an active requirement. The incremental change since the previous reviewed head (57aa9d7f7 to 5c031ba1) does not add any active requirement, so this verdict does not need reassessment against new issue text.

Full details: Out of Scope Changes check

Explanation

All changes relate to the stated objective: the order of RebindBuffers relative to vertex, index and indirect-argument acquisition in the graphics draw path. descriptors.cpp removes the RebindBuffers loop from PrepareGraphicsBindings. renderDraw.cpp adds it to ExecutePreparedDraw after indirect-argument acquisition and before GetGraphicsPipeline. The test wrappers call RebindBuffers themselves, so existing test bindings are kept. CMakeLists.txt registers the two ctest entries for the new tests. ShaderRecompilerComputeTests.cpp adds CheckDrawStorageBufferJoin and its command-line selectors. The incremental change since 57aa9d7f7 adds the vertexPipelineStoresAndAtomics feature requirement to the test harness. The new vertex shader in CheckDrawStorageBufferJoin stores to a storage buffer, so this feature supports that test, and the test returns 77 when rasterization is unsupported. No unrelated change was identified. Test outcomes and fork CI were not re-run in this review. Evidence for the incremental change comes from the supplied change summary; the source diff was not separately read. This does not change the scope verdict.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 57aa9d7f7f28fac788deff9441f28a806edb9501 and 5c031ba1ed.

Files selected for processing: 3

  • CMakeLists.txt
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • tests/ShaderRecompilerComputeTests.cpp
Files with no reviewable changes: 1

  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp

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

**@⁠coderabbitai[bot]** on GitHub · 2026-11-12 00:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2224#issuecomment-6811201092) · edited 2026-11-13 15:25 UTC <!-- coderabbit-ai-generated:v1 --> <!-- 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/2224?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_status_start --> No actionable comments were generated in the recent review. <!-- recent_review_status_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> <br> Graphics draw execution now rebinds prepared shader-stage buffers after indirect-argument buffer acquisition and before pipeline and render-target setup. The change also adds tests for indirect and indexed draws whose records span separate buffer-cache pages, with dedicated command-line modes and CTest entries. **Suggested reviewers:** `nmzik`, `defektu`, `senaxx` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"5c031ba1ed8f3e749d7174a4feaeefa0e8221cbe" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Bug fix · **Severity of issue fixed:** Medium <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>5c031</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `5c031` --> <!-- final_review_risk_coverage:{"sourceCommitId":"5c031ba1ed8f3e749d7174a4feaeefa0e8221cbe","coveredCommitId":"5c031ba1ed8f3e749d7174a4feaeefa0e8221cbe","kind":"reviewed"} --> The draw path now rebinds shader-stage buffers after draw inputs are acquired, and the new tests skip cleanly on devices that lack the required Vulkan feature. No merge-blocking risk remains. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4</strong></summary> <dl> <dd> <br> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title names the main change: the draw path now rebinds shader buffers after the draw inputs that can join cache buffers are acquired. The changeset moves the RebindBuffers loop from PrepareGraphic… | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description explains the cause (RebindBuffers runs before vertex, index, and indirect-argument buffers are acquired, so a joined cache buffer can retire a bound storage buffer), the change (moving… | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The only directly linked issue, `#532`, is closed and marked as historical context only. Its acceptance criteria do not apply to this pull request, so no active linked-issue coding requirements remain. … | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | All changes relate to the stated objective: the order of RebindBuffers relative to vertex, index and indirect-argument acquisition in the graphics draw path. descriptors.cpp removes the RebindBuffers … | <details> <summary><strong>Full details: Title check</strong></summary> <dl> <dd> <br> **Explanation** The title names the main change: the draw path now rebinds shader buffers after the draw inputs that can join cache buffers are acquired. The changeset moves the RebindBuffers loop from PrepareGraphicsBindings to ExecutePreparedDraw, which matches the title. The title is long at 75 characters, but it is specific and accurate. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description explains the cause (RebindBuffers runs before vertex, index, and indirect-argument buffers are acquired, so a joined cache buffer can retire a bound storage buffer), the change (moving the loop after those acquisitions), and the tests (CheckDrawStorageBufferJoin with two ctest variants, with failing and passing results). It is directly related to the changeset. </dd> </dl> </details> <details> <summary><strong>Full details: Linked Issues check</strong></summary> <dl> <dd> <br> **Explanation** The only directly linked issue, `#532`, is closed and marked as historical context only. Its acceptance criteria do not apply to this pull request, so no active linked-issue coding requirements remain. The pull request does not implement `#532`'s requested redesign (PublishBuffers, FindPublishedOwner, published flag). It keeps the existing binding code and changes only the order of the RebindBuffers loop in the draw path. This difference does not fail the check because `#532` is not an active requirement. The incremental change since the previous reviewed head (57aa9d7f7 to 5c031ba1) does not add any active requirement, so this verdict does not need reassessment against new issue text. </dd> </dl> </details> <details> <summary><strong>Full details: Out of Scope Changes check</strong></summary> <dl> <dd> <br> **Explanation** All changes relate to the stated objective: the order of RebindBuffers relative to vertex, index and indirect-argument acquisition in the graphics draw path. descriptors.cpp removes the RebindBuffers loop from PrepareGraphicsBindings. renderDraw.cpp adds it to ExecutePreparedDraw after indirect-argument acquisition and before GetGraphicsPipeline. The test wrappers call RebindBuffers themselves, so existing test bindings are kept. CMakeLists.txt registers the two ctest entries for the new tests. ShaderRecompilerComputeTests.cpp adds CheckDrawStorageBufferJoin and its command-line selectors. The incremental change since 57aa9d7f7 adds the vertexPipelineStoresAndAtomics feature requirement to the test harness. The new vertex shader in CheckDrawStorageBufferJoin stores to a storage buffer, so this feature supports that test, and the test returns 77 when rasterization is unsupported. No unrelated change was identified. Test outcomes and fork CI were not re-run in this review. Evidence for the incremental change comes from the supplied change summary; the source diff was not separately read. This does not change the scope verdict. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2224)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> <br> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end --> <!-- recent_review_start --> <h6> <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <br> <!-- review_info_content --> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/58ca8d1d7fd621196a60c0a2bda664f4672815d7/.coderabbit.yaml>) - **Commit**: [58ca8d1](<https://github.com/KytyPS5/KytyPS5/commit/58ca8d1d7fd621196a60c0a2bda664f4672815d7>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `57337fd2-3e28-4c18-9b4b-f2f4dbdfd2ce` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between 57aa9d7f7f28fac788deff9441f28a806edb9501 and 5c031ba1ed8f3e749d7174a4feaeefa0e8221cbe. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 3</strong></summary> <dl> <dd> <br> * `CMakeLists.txt` * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-no-changes-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-no-changes.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files with no reviewable changes: 1</strong></summary> <dl> <dd> <br> * src/graphics/host_gpu/renderer/pipeline/descriptors.cpp </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- recent_review_end -->
@ -20176,0 +20196,4 @@
AppendVMovLiteral(&code, 9, marker);
code.push_back(EncodeVop2(0x1a, 10, InlineU32(2), 5));
code.push_back(EncodeMubuf0(0x1c));
code.push_back(EncodeMubuf1(9, 2, 10));
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-12 00:59 UTC · original · edited 2026-11-13 17:01 UTC

Minor · Functional Correctness · Quick win

Enable vertex-stage storage writes before running this shader.

The new shader writes an SSBO from the vertex stage. However, VulkanHarness::Init leaves vertexPipelineStoresAndAtomics disabled. RasterizationSupported() does not check this feature either. (raw.githubusercontent.com)

Both test modes therefore violate VUID-RuntimeSpirv-NonWritable-06341, even if readback passes on a particular driver. Vulkan 1.3 requires this feature for writable storage buffers in the vertex stage. (raw.githubusercontent.com)

Query and enable vertexPipelineStoresAndAtomics during device creation. Return 77 for these tests when the feature is unavailable.

✅ Confirmed as addressed by @⁠Nawid3333

**@⁠coderabbitai[bot]** on GitHub · 2026-11-12 00:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2224#discussion_r4544964383) · edited 2026-11-13 17:01 UTC <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Functional Correctness** · **Quick win** **Enable vertex-stage storage writes before running this shader.** The new shader writes an SSBO from the vertex stage. However, `VulkanHarness::Init` leaves `vertexPipelineStoresAndAtomics` disabled. `RasterizationSupported()` does not check this feature either. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/57aa9d7f7f28fac788deff9441f28a806edb9501/tests/ShaderRecompilerComputeTests.cpp)) Both test modes therefore violate `VUID-RuntimeSpirv-NonWritable-06341`, even if readback passes on a particular driver. Vulkan 1.3 requires this feature for writable storage buffers in the vertex stage. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/v1.3.296/appendices/spirvenv.adoc)) Query and enable `vertexPipelineStoresAndAtomics` during device creation. Return 77 for these tests when the feature is unavailable. <!-- fingerprinting:phantom:medusa:wombat61 --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:685f241d144a4f2cb8dc2093 --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Confirmed as addressed by @⁠Nawid3333 <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-12 00:59 UTC · original · reviewed

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bc934ef034 and 57aa9d7f7f28fac788deff9441f28a806edb9501.

Files selected for processing: 4

  • CMakeLists.txt
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • src/graphics/host_gpu/renderer/renderDraw.cpp
  • tests/ShaderRecompilerComputeTests.cpp
Files with no reviewable changes: 1

  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp

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

**@⁠coderabbitai[bot]** on GitHub · 2026-11-12 00:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2224#pullrequestreview-5867421832) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** <h6> <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <br> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/bc934ef03410b760fbf8e49db1d79485e7e5f887/.coderabbit.yaml>) - **Commit**: [bc934ef](<https://github.com/KytyPS5/KytyPS5/commit/bc934ef03410b760fbf8e49db1d79485e7e5f887>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `46dfb29c-22ef-4cd6-9709-f8134a1f326c` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between bc934ef03410b760fbf8e49db1d79485e7e5f887 and 57aa9d7f7f28fac788deff9441f28a806edb9501. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 4</summary> <dl> <dd> <br> * `CMakeLists.txt` * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `src/graphics/host_gpu/renderer/renderDraw.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-no-changes-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-no-changes.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files with no reviewable changes: 1</summary> <dl> <dd> <br> * src/graphics/host_gpu/renderer/pipeline/descriptors.cpp </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=57e982dd-9ccf-4cbc-ba06-e6a41f707532 attempt=ec06d8d9-3630-4c96-a493-3d127a0d7d13 batch=1/1 -->
@ -20176,0 +20196,4 @@
AppendVMovLiteral(&code, 9, marker);
code.push_back(EncodeVop2(0x1a, 10, InlineU32(2), 5));
code.push_back(EncodeMubuf0(0x1c));
code.push_back(EncodeMubuf1(9, 2, 10));
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-13 17:00 UTC · original

Fixed in 5c031ba1e: RasterizationSupported() now also requires vertexPipelineStoresAndAtomics, and the harness enables it at device creation, so on a device without it these tests are skipped instead of running.

**@⁠Nawid3333** on GitHub · 2026-11-13 17:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2224#discussion_r4566230926) Fixed in 5c031ba1e: `RasterizationSupported()` now also requires `vertexPipelineStoresAndAtomics`, and the harness enables it at device creation, so on a device without it these tests are skipped instead of running.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.