tests: cover 1D-array color render targets #377

Manually merged
github merged 2 commits from gh-pr/377/head into gh-pr/377/base 2026-11-26 09:18:25 +00:00
Owner

@⁠Techx3 on GitHub · 2026-08-28 23:30 UTC · original
Techx3:techx3/color-render-target-1d-tests → main · +126 −0 · 3 files · 2 commits · merged 2026-09-28 21:48 UTC

Summary

  • Adds a Vulkan-backed regression for SDK dimension=0 render targets with array slices 2 through 5.
  • Verifies guest allocation size, mip layout, Vulkan 1D-array view type, base layer, layer count, backing image type, and dynamic-rendering extent.
  • Adds a focused Windows CTest selector covering both single-layer 1D and 1D-array targets.

Verification

  • cmake --build _Build/launcher-usability --target shader_recompiler_compute_tests -j 6
  • ctest --test-dir _Build/launcher-usability -R ^(color_render_target_1d|texture_cache_image_overlap)$ --output-on-failure

Both tests pass. Production code is unchanged.

**@⁠Techx3** on GitHub · 2026-08-28 23:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/377) `Techx3:techx3/color-render-target-1d-tests` → `main` · +126 −0 · 3 files · 2 commits · merged 2026-09-28 21:48 UTC ## Summary - Adds a Vulkan-backed regression for SDK dimension=0 render targets with array slices 2 through 5. - Verifies guest allocation size, mip layout, Vulkan 1D-array view type, base layer, layer count, backing image type, and dynamic-rendering extent. - Adds a focused Windows CTest selector covering both single-layer 1D and 1D-array targets. ## Verification - cmake --build _Build/launcher-usability --target shader_recompiler_compute_tests -j 6 - ctest --test-dir _Build/launcher-usability -R ^(color_render_target_1d|texture_cache_image_overlap)$ --output-on-failure Both tests pass. Production code is unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:18:24 +00:00
github manually merged commit 8fc6aff6d8 into gh-pr/377/base 2026-11-26 09:18:25 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-28 20:47 UTC · original

Review in Change Stack →

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

📝 Walkthrough

Walkthrough

Adds a Vulkan test for 1D-array render-target discovery. The test checks image and attachment properties, and releases its mapped memory and allocation. The test runs in the regular Vulkan sequences and through the --rt1d-only mode. CTest registers that mode, and the Windows build includes the test executable.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Other

Merge Risk: 🔵 Low · up to 5eab2

The new regression test is available but will not run in Windows CI. Add it to the CTest filter so CI checks the behavior before merging.

Architecture Summary

Architecture risk: 🔵 Low · up to 5eab2

The change affects 2 systems.

Changed systems: CMakeLists.txt, tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — CMakeLists.txt (service) was modified; 1 changed file maps to changed impact.
  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CMakeLists.txt: Adds the color_render_target_1d CTest entry, invoking the shader recompiler compute test executable with --rt1d-only.
  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: Adds a Vulkan render-target discovery test for a 512×1 color target backed by six image layers, viewed across slices 2–5. It checks tile layout and direct-memory allocation/mapping, verifies the resolved image is a 1D image with a 1D-array view and matching attachment dimensions and layer range, then resets bindings and releases the mapping and allocation.
  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: Adds the 1D-array discovery check to this Vulkan test sequence.
  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: Adds --rt1d-only handling; when given as the sole argument, runs color discovery and 1D-array discovery, then exits.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: adding coverage for 1D-array color render targets.
Description check ✅ Passed The description accurately explains the regression test, validation scope, Windows CTest selector, verification commands, and unchanged production code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.

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

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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-28 20:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/377#issuecomment-5878223056) <!-- 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/377?cs_source=review_comment"><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 --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Adds a Vulkan test for 1D-array render-target discovery. The test checks image and attachment properties, and releases its mapped memory and allocation. The test runs in the regular Vulkan sequences and through the `--rt1d-only` mode. CTest registers that mode, and the Windows build includes the test executable. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"5eab20703b2ff52d2339a4f033511e0a2330f7c2" --> **Change:** Other <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _🔵 Low_ · up to `5eab2` <!-- final_review_risk_coverage:{"sourceCommitId":"5eab20703b2ff52d2339a4f033511e0a2330f7c2","coveredCommitId":"5eab20703b2ff52d2339a4f033511e0a2330f7c2","kind":"reviewed"} --> The new regression test is available but will not run in Windows CI. Add it to the CTest filter so CI checks the behavior before merging. <!-- final_review_risk_end --> <!-- architecture_review_start --> ### Architecture Summary **Architecture risk:** _🔵 Low_ · up to `5eab2` The change affects 2 systems. **Changed systems:** `CMakeLists.txt`, `tests` **Architecture concerns** No architecture-level concerns identified. <details> <summary>Review details</summary> **Systems and components** - _observed_ — CMakeLists.txt (service) was modified; 1 changed file maps to changed impact. - _observed_ — tests (service) was modified; 1 changed file maps to changed impact. **Before / after behavior** - _observed_ — Modified behavior in CMakeLists.txt: Adds the `color_render_target_1d` CTest entry, invoking the shader recompiler compute test executable with `--rt1d-only`. - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: Adds a Vulkan render-target discovery test for a 512×1 color target backed by six image layers, viewed across slices 2–5. It checks tile layout and direct-memory allocation/mapping, verifies the resolved image is a 1D image with a 1D-array view and matching attachment dimensions and layer range, then resets bindings and releases the mapping and allocation. - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: Adds the 1D-array discovery check to this Vulkan test sequence. - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: Adds `--rt1d-only` handling; when given as the sole argument, runs color discovery and 1D-array discovery, then exits. </details> <!-- architecture_review_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 5</summary> <details> <summary>✅ Passed checks (5 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ✅ Passed | The title clearly and concisely identifies the main change: adding coverage for 1D-array color render targets. | | Description check | ✅ Passed | The description accurately explains the regression test, validation scope, Windows CTest selector, verification commands, and unchanged production code. | | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… | | 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> <!-- 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=377)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [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) </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-28 20:47 UTC · original · reviewed

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Include the new test in the Windows CTest filter. · build.yml:124

.github/workflows/build.yml:124
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Include the new test in the Windows CTest filter.

The workflow builds shader_recompiler_compute_tests, but this filter excludes color_render_target_1d. Windows CI will not run the new regression test. Add its name to the filter.

Proposed filter update
- ctest --test-dir _Build/windows --output-on-failure -R "^(audio_out2_port|pad_haptics|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|archive_file|avplayer_file|virtual_memory_allocation)$"
+ ctest --test-dir _Build/windows --output-on-failure -R "^(audio_out2_port|pad_haptics|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|archive_file|avplayer_file|virtual_memory_allocation|color_render_target_1d)$"

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: 3230b2ab-9e34-47b5-8171-44a0cd3e5e3e

📥 Commits

Reviewing files that changed from the base of the PR and between 4b0de1b672 and 5eab20703b2ff52d2339a4f033511e0a2330f7c2.

📒 Files selected for processing (3)
  • .github/workflows/build.yml
  • CMakeLists.txt
  • tests/ShaderRecompilerComputeTests.cpp

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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-28 20:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/377#pullrequestreview-5344440409) · **reviewed** > [!CAUTION] > Some comments are outside the diff and can’t be posted inline due to GitHub limitations. > > **⚠️ Outside diff range comments (1)** > > <details> > <summary><em>🟡 Minor</em> · Include the new test in the Windows CTest filter. · <code>build.yml:124</code></summary><blockquote> > > `.github/workflows/build.yml:124` > _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_ > > **Include the new test in the Windows CTest filter.** > > The workflow builds `shader_recompiler_compute_tests`, but this filter excludes `color_render_target_1d`. Windows CI will not run the new regression test. Add its name to the filter. > > <details> > <summary>Proposed filter update</summary> > > ```diff > - ctest --test-dir _Build/windows --output-on-failure -R "^(audio_out2_port|pad_haptics|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|archive_file|avplayer_file|virtual_memory_allocation)$" > + ctest --test-dir _Build/windows --output-on-failure -R "^(audio_out2_port|pad_haptics|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|archive_file|avplayer_file|virtual_memory_allocation|color_render_target_1d)$" > ``` > </details> > > <!-- cr-comment:v1:c5859609e41f65769c0f60bd --> > > </blockquote></details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `3230b2ab-9e34-47b5-8171-44a0cd3e5e3e` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 4b0de1b67265069110492e5e1005d5c7635043a9 and 5eab20703b2ff52d2339a4f033511e0a2330f7c2. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `.github/workflows/build.yml` * `CMakeLists.txt` * `tests/ShaderRecompilerComputeTests.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.