shader: place vertex-pipeline push data at the top of the push block #2128

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

@⁠Nawid3333 on GitHub · 2026-11-05 17:54 UTC · original
Nawid3333:shader/vertex-push-top → main · +240 −44 · 11 files · 4 commits · closed without merging

Summary

A vertex or mesh shader's push-data start depended on the pixel shader it was drawn with: the pixel stage's data was
placed first, and the vertex stage started after it. The same vertex program could therefore need another module for
each pushed pixel data size; FindModule missed and Kyty translated and compiled the shader again. In an ASTRO BOT
(PPSA21564) run on upstream 23ed47ec6, 20 of the 35 new modules for an already-cached Program differed only in their
push-data start (14 vertex, 5 mesh, 1 pixel). This PR places the shader data of the vertex-pipeline stages (vertex,
mesh, LS, HS, domain) at the top of the 32-dword push block, so the start of the first vertex-pipeline stage no longer
depends on the pixel shader as long as it fits.

Change

  • PushData::StartFor(stage, floor, size, ceiling) and CanFit(start, size, ceiling) (ShaderIR.h): pixel and compute
    keep the bottom-up rule (start at floor if size != 0 and the data fits, else NoStart). Vertex-pipeline
    stages start at ceiling - size when size != 0 and floor + size <= ceiling, else NoStart.
  • GetProgram gets a push_data_ceiling. The vertex loop in pipelineCache.cpp starts it at PushData::DwordCount
    and lowers it to the start of each vertex stage that uses push data; vertex-pipeline stages no longer advance the
    push-data cursor. The draw prefix (mesh draw parameters, object id, user clip planes) keeps its bottom offsets.
  • FindModule and the SPIR-V emitter (DefineDescriptors) compute the start with the same StartFor. For otherwise
    identical module inputs, the first vertex-pipeline stage reuses its top-placed module across pixel data sizes
    whenever it fits; later tessellation stages also need the same resolved ceiling.

A stage pushes its data exactly when it did before: with the prefix and the pixel and earlier vertex-stage data that
were actually pushed (spilled data takes no push space), the stage fits iff the sum is at most 32 dwords, in both the
old and the new layout. Only the position inside the block changes.

Limit: whether a vertex-pipeline stage fits still depends on the pixel data, as before, so the module of the first
vertex-pipeline stage has at most two forms: top-placed or not pushed (NoStart). With tessellation, a later stage's
ceiling depends on whether the earlier stages fit, so its start can still vary with the pixel data size.

Tests

  • TestGraphicsPushConstantFit (shaderCfgTests.cpp) walks prefix 0..32, pixel data 0..32, earlier vertex-stage data
    0..32 and stage data 0..32 for Vertex, Mesh, Local, TessellationControl and TessellationEvaluation, and checks that
    pixel and compute keep the old start and that every vertex-pipeline stage pushes exactly when the old rule pushed,
    at ceiling - size.
  • TestVertexPushConstantPlacement compiles one vertex program next to 2 and 7 dwords of pixel data: the bindings
    and the SPIR-V binary are identical, the start is 32 - size; with a ceiling of 16 it starts at 16 - size, and
    it moves to the buffer path when the data misses the fit by one dword.
  • New GPU test CheckVertexPushTopCache (ShaderRecompilerComputeTests.cpp, run by --shader-cache-only and the
    full run): two PipelineCache::GetGraphicsPrograms lookups of one vertex shader with two pixel shaders that push
    2 and 7 dwords of shader data compile one vertex module, returned by both lookups, whose push data starts at
    32 - size. On upstream the same test fails: the vertex module depends on the pixel shader-data size.
  • The existing mesh test now expects the mesh data at 32 - size (or no push when the prefix leaves no room), and the existing GPU fixtures place vertex data at the top.
  • On upstream 6fd43ac65 (Windows 11, Radeon RX 9070 XT): shader_cfg_tests pass; the full ShaderRecompilerComputeTests run (with the cases this GPU lacks features for skipped) shows no failed check that the same build without this PR does not show too; the new VertexPushTopCache case passes.
  • Upstream CI (run 42682170841, this PR merged with 6fd43ac65): the Windows, macOS and Linux builds and tests pass.
  • CheckVertexPushTopCache performs program lookups without executing a draw; TestGraphicsPushConstantFit checks
    all five vertex-pipeline stage kinds arithmetically, without a complete tessellation-stage allocation sequence.
  • The game measurements below use upstream 23ed47ec6 and were not rerun on 6fd43ac65.

In-game

ASTRO BOT (PPSA21564), Radeon RX 9070 XT, Windows 11, upstream 23ed47ec6 with and without this PR, same input
script, compared at the same point of the run (225 distinct shaders):

  • shader translations 306 -> 285; translations of an already-translated shader 81 (26%) -> 60 (21%);
  • SPIR-V words emitted 9.0 M -> 8.1 M;
  • new modules that differ only in the push-data start, whole run: 14 vertex + 5 mesh + 1 pixel -> 1 pixel;
  • screenshots at matching points of both runs show the same scenes rendered the same way; no fatal error in either run.

#2119 (asynchronous shader compilation) also changes module lookup and compilation. Combining the two needs the
push-data ceiling passed through RequestAsync and CompileStage, a stage- and ceiling-aware FindCandidate, the
descending-ceiling loop kept, and in-flight module compiles keyed by the resolved start (or by both floor and
ceiling).

AI use: written with AI assistance (Claude Code and OpenAI Codex): the change, the tests, the fit check and the
measurements; reviewed, tested and run in the game by me.

🤖 Generated with Claude Code

**@⁠Nawid3333** on GitHub · 2026-11-05 17:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2128) `Nawid3333:shader/vertex-push-top` → `main` · +240 −44 · 11 files · 4 commits · closed without merging ## Summary A vertex or mesh shader's push-data start depended on the pixel shader it was drawn with: the pixel stage's data was placed first, and the vertex stage started after it. The same vertex program could therefore need another module for each pushed pixel data size; `FindModule` missed and Kyty translated and compiled the shader again. In an ASTRO BOT (PPSA21564) run on upstream 23ed47ec6, 20 of the 35 new modules for an already-cached Program differed only in their push-data start (14 vertex, 5 mesh, 1 pixel). This PR places the shader data of the vertex-pipeline stages (vertex, mesh, LS, HS, domain) at the top of the 32-dword push block, so the start of the first vertex-pipeline stage no longer depends on the pixel shader as long as it fits. ## Change - `PushData::StartFor(stage, floor, size, ceiling)` and `CanFit(start, size, ceiling)` (ShaderIR.h): pixel and compute keep the bottom-up rule (start at `floor` if `size != 0` and the data fits, else `NoStart`). Vertex-pipeline stages start at `ceiling - size` when `size != 0` and `floor + size <= ceiling`, else `NoStart`. - `GetProgram` gets a `push_data_ceiling`. The vertex loop in pipelineCache.cpp starts it at `PushData::DwordCount` and lowers it to the start of each vertex stage that uses push data; vertex-pipeline stages no longer advance the push-data cursor. The draw prefix (mesh draw parameters, object id, user clip planes) keeps its bottom offsets. - `FindModule` and the SPIR-V emitter (`DefineDescriptors`) compute the start with the same `StartFor`. For otherwise identical module inputs, the first vertex-pipeline stage reuses its top-placed module across pixel data sizes whenever it fits; later tessellation stages also need the same resolved ceiling. A stage pushes its data exactly when it did before: with the prefix and the pixel and earlier vertex-stage data that were actually pushed (spilled data takes no push space), the stage fits iff the sum is at most 32 dwords, in both the old and the new layout. Only the position inside the block changes. Limit: whether a vertex-pipeline stage fits still depends on the pixel data, as before, so the module of the first vertex-pipeline stage has at most two forms: top-placed or not pushed (`NoStart`). With tessellation, a later stage's ceiling depends on whether the earlier stages fit, so its start can still vary with the pixel data size. ## Tests - `TestGraphicsPushConstantFit` (shaderCfgTests.cpp) walks prefix 0..32, pixel data 0..32, earlier vertex-stage data 0..32 and stage data 0..32 for Vertex, Mesh, Local, TessellationControl and TessellationEvaluation, and checks that pixel and compute keep the old start and that every vertex-pipeline stage pushes exactly when the old rule pushed, at `ceiling - size`. - `TestVertexPushConstantPlacement` compiles one vertex program next to 2 and 7 dwords of pixel data: the bindings and the SPIR-V binary are identical, the start is `32 - size`; with a ceiling of 16 it starts at `16 - size`, and it moves to the buffer path when the data misses the fit by one dword. - New GPU test `CheckVertexPushTopCache` (ShaderRecompilerComputeTests.cpp, run by `--shader-cache-only` and the full run): two `PipelineCache::GetGraphicsPrograms` lookups of one vertex shader with two pixel shaders that push 2 and 7 dwords of shader data compile one vertex module, returned by both lookups, whose push data starts at `32 - size`. On upstream the same test fails: the vertex module depends on the pixel shader-data size. - The existing mesh test now expects the mesh data at `32 - size` (or no push when the prefix leaves no room), and the existing GPU fixtures place vertex data at the top. - On upstream 6fd43ac65 (Windows 11, Radeon RX 9070 XT): shader_cfg_tests pass; the full ShaderRecompilerComputeTests run (with the cases this GPU lacks features for skipped) shows no failed check that the same build without this PR does not show too; the new VertexPushTopCache case passes. - Upstream CI (run 42682170841, this PR merged with 6fd43ac65): the Windows, macOS and Linux builds and tests pass. - `CheckVertexPushTopCache` performs program lookups without executing a draw; `TestGraphicsPushConstantFit` checks all five vertex-pipeline stage kinds arithmetically, without a complete tessellation-stage allocation sequence. - The game measurements below use upstream 23ed47ec6 and were not rerun on 6fd43ac65. ## In-game ASTRO BOT (PPSA21564), Radeon RX 9070 XT, Windows 11, upstream 23ed47ec6 with and without this PR, same input script, compared at the same point of the run (225 distinct shaders): - shader translations 306 -> 285; translations of an already-translated shader 81 (26%) -> 60 (21%); - SPIR-V words emitted 9.0 M -> 8.1 M; - new modules that differ only in the push-data start, whole run: 14 vertex + 5 mesh + 1 pixel -> 1 pixel; - screenshots at matching points of both runs show the same scenes rendered the same way; no fatal error in either run. #2119 (asynchronous shader compilation) also changes module lookup and compilation. Combining the two needs the push-data ceiling passed through `RequestAsync` and `CompileStage`, a stage- and ceiling-aware `FindCandidate`, the descending-ceiling loop kept, and in-flight module compiles keyed by the resolved start (or by both floor and ceiling). AI use: written with AI assistance (Claude Code and OpenAI Codex): the change, the tests, the fit check and the measurements; reviewed, tested and run in the game by me. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A vertex or mesh stage's push data started after the paired pixel shader's data, so the
same vertex program needed one module per pixel data size and FindModule missed. Place
vertex-pipeline stages top-down from a ceiling (32, then each pushing stage's start);
pixel and compute keep the bottom-up rule. A stage pushes exactly when it did before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	tests/ShaderRecompilerComputeTests.cpp
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	tests/shaderCfgTests.cpp
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:15:20 +00:00
github-bot closed this pull request 2026-11-26 10:15:20 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-05 18:02 UTC · original · edited 2026-11-09 19:26 UTC

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Push-data placement now uses stage-specific rules and an optional ceiling. The pipeline cache passes the ceiling through module lookup and compilation, and lowers it when a returned graphics module uses push data. Tests cover placement bounds, spill behavior, mesh placement, and vertex-module reuse across pixel shaders with different push-data sizes.

Suggested reviewers: nmzik

Change: Bug fix

Merge Risk: Minimal · up to 41d16

No actionable merge-blocking issue is established; the change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: placing vertex-pipeline push data at the top of the push block.
Description check Passed The description explains the push-data placement change, its implementation, tests, reported results, and limitations.
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 21.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 14 functions across 9 files. (2 skipped: 2 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Warning

Some tools did not complete. Review the errors below.

Cppcheck (2.22.0)

tests/shaderCfgTests.cpp

Cppcheck timed out; analysis of this file is incomplete

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 a3e1b9abed and 41d1693631.

Files selected for processing: 3

  • src/graphics/host_gpu/renderer/pipeline/pipelineCache.h
  • tests/ShaderRecompilerComputeTests.cpp
  • tests/shaderCfgTests.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-05 18:02 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2128#issuecomment-6665394905) · edited 2026-11-09 19:26 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/2128?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> Push-data placement now uses stage-specific rules and an optional ceiling. The pipeline cache passes the ceiling through module lookup and compilation, and lowers it when a returned graphics module uses push data. Tests cover placement bounds, spill behavior, mesh placement, and vertex-module reuse across pixel shaders with different push-data sizes. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"41d169363164b728be1d917749041719be318d81" --> <!-- change_assessment_priority:{"version":1,"urgency":"p3","manual":false} --> **Change:** Bug fix <!-- 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>41d16</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `41d16` --> <!-- final_review_risk_coverage:{"sourceCommitId":"41d169363164b728be1d917749041719be318d81","coveredCommitId":"41d169363164b728be1d917749041719be318d81","kind":"reviewed"} --> No actionable merge-blocking issue is established; the change is mergeable after normal checks. <!-- 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 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-inconclusive-14-v2.svg" width="14" height="14" align="middle" alt="Inconclusive" title="Inconclusive"></picture></sup> 1</strong></summary> <dl> <dd> <br> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 inconclusive</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Inconclusive](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-inconclusive.svg) | Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><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> Passed checks: 4 passed</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 clearly summarizes the main change: placing vertex-pipeline push data at the top of the push block. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description explains the push-data placement change, its implementation, tests, reported results, and limitations. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> <br> **Explanation** Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 14 functions across 9 files. (2 skipped: 2 too large.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- operational_warnings_start --> <!-- This is an auto-generated comment: all tool run failures by coderabbit.ai --> > [!WARNING] > Some tools did not complete. Review the errors below. > > <details> > <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/wrench-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/wrench.svg" width="16" height="16" align="absmiddle" alt=""></picture> Cppcheck (2.22.0)</strong></summary> > <dl> > <dd> > <br> > > <details> > <summary><strong>tests/shaderCfgTests.cpp</strong></summary> > <dl> > <dd> > <br> > > Cppcheck timed out; analysis of this file is incomplete > > </dd> > </dl> > </details> > > </dd> > </dl> > </details> <!-- end of auto-generated comment: all tool run failures by coderabbit.ai --> <!-- operational_warnings_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2128)! 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/6fd43ac65264468c7279a578a998b0f7c59af7f4/.coderabbit.yaml>) - **Commit**: [6fd43ac](<https://github.com/KytyPS5/KytyPS5/commit/6fd43ac65264468c7279a578a998b0f7c59af7f4>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `23aee441-e102-470a-9e5b-2e2bfc2cb79e` </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 a3e1b9abedc1ebcb9ee8dc4a5d72a5bc3f1efd01 and 41d169363164b728be1d917749041719be318d81. </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> * `src/graphics/host_gpu/renderer/pipeline/pipelineCache.h` * `tests/ShaderRecompilerComputeTests.cpp` * `tests/shaderCfgTests.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 -->
Author
Owner

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

Nitpick comments: 2

src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp: 1

400-402: Trivial · Functional Correctness · Heavy lift

Test sequential tessellation push placement and cache lookup.

The current tests do not exercise ceiling updates across LS, HS, and TES. Add a test that checks non-overlap and storage fallback when an earlier stage spills. Check cache reuse when the placement and specialization remain unchanged. When a spill changes a later stage’s start, check that lookup selects the matching module.

tests/shaderCfgTests.cpp: 1

12633-12669: Trivial · Maintainability & Code Quality · Low value

Add a test for the top-down floor boundary in TestVertexPushConstantPlacement.

The test checks that the ceiling alone decides fit and spill. It does not check the case where a non-default push_data_start_dword (the floor) leaves too little room below the ceiling for the vertex data. TestGraphicsPushConstantFit covers this case only through StartFor. It does not cover it through the compile path.

Add one RecompileForTest(shader, options, Ceiling - size + 1, Ceiling) assertion on push_data_start_dword. The existing spill check already does this for UsesPushData, so the gap is small. This is optional.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 88e94686bb and 5b7ee45196.

Files selected for processing: 7

  • src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp
  • src/graphics/host_gpu/renderer/pipeline/pipelineCache.h
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterInternal.h
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cpp
  • src/graphics/shader/recompiler/ir/ShaderIR.h
  • tests/ShaderRecompilerComputeTests.cpp
  • tests/shaderCfgTests.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-07 21:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2128#pullrequestreview-5814993188) · **reviewed** <!-- coderabbit-ai-generated:v1 --> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/brush-cleaning-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/brush-cleaning.svg" width="16" height="16" align="absmiddle" alt=""></picture> Nitpick comments: 2</summary><blockquote> <dl> <dd> <br> <details> <summary>src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp: 1</summary><blockquote> <dl> <dd> <br> `400-402`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial** · **Functional Correctness** · **Heavy lift** **Test sequential tessellation push placement and cache lookup.** The current tests do not exercise ceiling updates across LS, HS, and TES. Add a test that checks non-overlap and storage fallback when an earlier stage spills. Check cache reuse when the placement and specialization remain unchanged. When a spill changes a later stage’s start, check that lookup selects the matching module. <!-- cr-comment:v1:97577e63763511bb06ce6144 --> </dd> </dl> </blockquote></details> <details> <summary>tests/shaderCfgTests.cpp: 1</summary><blockquote> <dl> <dd> <br> `12633-12669`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial** · **Maintainability & Code Quality** · **Low value** **Add a test for the top-down floor boundary in `TestVertexPushConstantPlacement`.** The test checks that the ceiling alone decides fit and spill. It does not check the case where a non-default `push_data_start_dword` (the floor) leaves too little room below the ceiling for the vertex data. `TestGraphicsPushConstantFit` covers this case only through `StartFor`. It does not cover it through the compile path. Add one `RecompileForTest(shader, options, Ceiling - size + 1, Ceiling)` assertion on `push_data_start_dword`. The existing `spill` check already does this for `UsesPushData`, so the gap is small. This is optional. <!-- cr-comment:v1:96802e9619ca4a89460da820 --> </dd> </dl> </blockquote></details> </dd> </dl> </blockquote></details> <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/27f290e9573ed19c7fd0f4bc35467b8dea82140c/.coderabbit.yaml>) - **Commit**: [27f290e](<https://github.com/KytyPS5/KytyPS5/commit/27f290e9573ed19c7fd0f4bc35467b8dea82140c>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `057fdfc9-49da-4d3c-b150-6d04503160bc` </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 88e94686bb24d824a1cf258142dda588fc10d509 and 5b7ee45196558f0d67ff9cb75e17c738eb404c66. </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: 7</summary> <dl> <dd> <br> * `src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp` * `src/graphics/host_gpu/renderer/pipeline/pipelineCache.h` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterInternal.h` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cpp` * `src/graphics/shader/recompiler/ir/ShaderIR.h` * `tests/ShaderRecompilerComputeTests.cpp` * `tests/shaderCfgTests.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=1fc09803-0b8f-4496-9dc1-0c891b71bfda attempt=97ea12b4-66f2-4dad-971d-965f9d964cb3 batch=1/1 -->
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-21 14:51 UTC · original

Superseded by b48af59f6 ("shader: take pixel shader data from the end of the push constants"): the pixel stage now takes the end of the push block, so where the vertex-pipeline stages start no longer depends on the pixel data size. That is what this PR did from the other end of the block. Closing this one.

**@⁠Nawid3333** on GitHub · 2026-11-21 14:51 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2128#issuecomment-7064428162) Superseded by b48af59f6 ("shader: take pixel shader data from the end of the push constants"): the pixel stage now takes the end of the push block, so where the vertex-pipeline stages start no longer depends on the pixel data size. That is what this PR did from the other end of the block. Closing this one.

Pull request closed

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