Tests: enable lane-read coverage and clarify layout failures #840

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

@⁠theantipopau on GitHub · 2026-09-25 21:20 UTC · original
theantipopau:shader-cfg-dormant-guard → main · +6 −4 · 2 files · 1 commits · merged 2026-09-27 11:37 UTC

Enable the VOP3 lane-read destination test and update its expected opcode names to match decoded output. Reword two texture layout failure messages.

Validation: built shader_cfg_tests; ctest --test-dir _Build/vscode-clang -R '^shader_cfg$' --output-on-failure passed.

**@⁠theantipopau** on GitHub · 2026-09-25 21:20 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840) `theantipopau:shader-cfg-dormant-guard` → `main` · +6 −4 · 2 files · 1 commits · merged 2026-09-27 11:37 UTC Enable the VOP3 lane-read destination test and update its expected opcode names to match decoded output. Reword two texture layout failure messages. Validation: built `shader_cfg_tests`; `ctest --test-dir _Build/vscode-clang -R '^shader_cfg$' --output-on-failure` passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:32 +00:00
github manually merged commit bc27707d97 into gh-pr/840/base 2026-11-26 09:34:34 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-25 21:26 UTC · original · edited 2026-09-26 05:12 UTC

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: 23c71778-4714-4f0d-a5ff-b0f169fe5253

📥 Commits

Reviewing files that changed from the base of the PR and between 042f012af740607ae113d6cbc73d510e611feac0 and 6c56d67cbb0ce2c1882f0880a38bc576eb253642.

📒 Files selected for processing (1)
  • CMakeLists.txt

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


📝 Walkthrough

Walkthrough

The lane-read test now expects uppercase decoded opcode names and runs from the test runner. CMake checks test definitions in two source files against calls after main() and compares dormant tests with a 43-name allowlist. Configuration fails when the sets differ.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to 6c56d

The lane-read test is registered, and the configure-time dormant-test check avoids the known comment-parsing false positive. No concrete merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 6c56d

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 tests/shaderCfgTests.cpp: Updated the two decoded-dump expectations in TestNewShaderRecompilerVop3LaneReadDestinationEncoding from lowercase to uppercase opcode names.
  • observed — Modified behavior in tests/shaderCfgTests.cpp: Added a comment noting the test’s prior omission and uppercase dump formatting, then added TestNewShaderRecompilerVop3LaneReadDestinationEncoding() to the test runner.
  • observed — Modified behavior in CMakeLists.txt: Adds the allowlist of 43 shader tests considered dormant.
  • observed — Modified behavior in CMakeLists.txt: Reads both test sources, registers them as configure-time dependencies, and compares defined tests without calls after main() against the sorted allowlist. It strips block comments before line comments prior to checking for calls. A mismatch stops configuration and reports unlisted dormant tests and allowlisted tests that are now called.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both main changes: wiring the dormant VOP3 lane-read test and adding a guard for new dormant tests.
Description check ✅ Passed The description is directly related to the changeset. It explains the wired test, the 43 intentionally dormant tests, the CMake guard, verification results, and test limitations.
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.

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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-25 21:26 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#issuecomment-5839859027) · edited 2026-09-26 05:12 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/840"><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**: `23c71778-4714-4f0d-a5ff-b0f169fe5253` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 042f012af740607ae113d6cbc73d510e611feac0 and 6c56d67cbb0ce2c1882f0880a38bc576eb253642. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `CMakeLists.txt` </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. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The lane-read test now expects uppercase decoded opcode names and runs from the test runner. CMake checks test definitions in two source files against calls after `main()` and compares dormant tests with a 43-name allowlist. Configuration fails when the sets differ. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"6c56d67cbb0ce2c1882f0880a38bc576eb253642" --> **Change:** Other <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `6c56d` <!-- final_review_risk_coverage:{"sourceCommitId":"6c56d67cbb0ce2c1882f0880a38bc576eb253642","coveredCommitId":"6c56d67cbb0ce2c1882f0880a38bc576eb253642","kind":"reviewed"} --> The lane-read test is registered, and the configure-time dormant-test check avoids the known comment-parsing false positive. No concrete merge-blocking risk remains. <!-- final_review_risk_end --> <!-- architecture_review_start --> ### Architecture Summary **Architecture risk:** _🔵 Low_ · up to `6c56d` 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 tests/shaderCfgTests.cpp: Updated the two decoded-dump expectations in `TestNewShaderRecompilerVop3LaneReadDestinationEncoding` from lowercase to uppercase opcode names. - _observed_ — Modified behavior in tests/shaderCfgTests.cpp: Added a comment noting the test’s prior omission and uppercase dump formatting, then added `TestNewShaderRecompilerVop3LaneReadDestinationEncoding()` to the test runner. - _observed_ — Modified behavior in CMakeLists.txt: Adds the allowlist of 43 shader tests considered dormant. - _observed_ — Modified behavior in CMakeLists.txt: Reads both test sources, registers them as configure-time dependencies, and compares defined tests without calls after `main()` against the sorted allowlist. It strips block comments before line comments prior to checking for calls. A mismatch stops configuration and reports unlisted dormant tests and allowlisted tests that are now called. </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 summarizes both main changes: wiring the dormant VOP3 lane-read test and adding a guard for new dormant tests. | | Description check | ✅ Passed | The description is directly related to the changeset. It explains the wired test, the 43 intentionally dormant tests, the CMake guard, verification results, and test limitations. | | 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 --> --- <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-25 21:26 UTC · original · reviewed

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: 4bc78113-1645-420a-96fe-d4511b015a5e

📥 Commits

Reviewing files that changed from the base of the PR and between 497166009c and 5cdbb002f1cd4b9fd7c8bec7979f91d7663ee43d.

📒 Files selected for processing (2)
  • CMakeLists.txt
  • tests/shaderCfgTests.cpp

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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-25 21:26 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#pullrequestreview-5322895618) · **reviewed** **Actionable comments posted: 1** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `4bc78113-1645-420a-96fe-d4511b015a5e` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 497166009c8c0dd663fa1ffce3805a31bdc40d0e and 5cdbb002f1cd4b9fd7c8bec7979f91d7663ee43d. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `CMakeLists.txt` * `tests/shaderCfgTests.cpp` </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 7 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-25 21:26 UTC · original · edited 2026-09-26 01:29 UTC
On CMakeLists.txt line 466 (outdated):

@@ -390,6 +390,103 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+set(kyty_shader_cfg_dormant "")
+foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined})
+	string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at)

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Exclude C++ comments from the dormant-test check.

When kyty_shader_cfg_main contains TestName(); only inside a C++ comment, string(FIND) treats it as a call. The allowlisted TestName is then omitted from the dormant-test set, so the exact comparison can raise FATAL_ERROR even though the test remains dormant. Parse executable calls or strip C++ comments before searching the source text.

✅ Addressed in commit 745d53e

**@⁠coderabbitai[bot]** on GitHub · 2026-09-25 21:26 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4108786613) · edited 2026-09-26 01:29 UTC On `CMakeLists.txt` line 466 (outdated): ```diff @@ -390,6 +390,103 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +set(kyty_shader_cfg_dormant "") +foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined}) + string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at) ``` _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_ **Exclude C++ comments from the dormant-test check.** When `kyty_shader_cfg_main` contains `TestName();` only inside a C++ comment, `string(FIND)` treats it as a call. The allowlisted `TestName` is then omitted from the dormant-test set, so the exact comparison can raise `FATAL_ERROR` even though the test remains dormant. Parse executable calls or strip C++ comments before searching the source text. <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:19fd817f9bccb3b897ea7964 --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Addressed in commit 745d53e
Author
Owner

@⁠theantipopau on GitHub · 2026-09-26 01:26 UTC · original
On CMakeLists.txt line 466 (outdated):

@@ -390,6 +390,103 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+set(kyty_shader_cfg_dormant "")
+foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined})
+	string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at)

Good catch — fixed in 745d53e5.

string(REGEX REPLACE "//[^\n]*" "" ...) now strips line comments from the main body before the per-name lookup, so a test mentioned only in a comment is still counted as dormant.

Verified in both directions:

  • With the strip, a // TestNewShaderRecompilerSopkWaitcntMarkers(); comment inside main() leaves the guard passing (the test correctly stays dormant, matching the list).
  • Without the strip, the same comment makes the guard fail with in the list, but now called from main(): TestNewShaderRecompilerSopkWaitcntMarkers, which is exactly the misclassification you predicted.

One note on placement: the stripping call has to sit after the string(SUBSTRING ...) that defines kyty_shader_cfg_main, since it rewrites that variable in place.

**@⁠theantipopau** on GitHub · 2026-09-26 01:26 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4109720367) On `CMakeLists.txt` line 466 (outdated): ```diff @@ -390,6 +390,103 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +set(kyty_shader_cfg_dormant "") +foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined}) + string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at) ``` Good catch — fixed in 745d53e5. `string(REGEX REPLACE "//[^\n]*" "" ...)` now strips line comments from the main body before the per-name lookup, so a test mentioned only in a comment is still counted as dormant. Verified in both directions: - With the strip, a `// TestNewShaderRecompilerSopkWaitcntMarkers();` comment inside `main()` leaves the guard passing (the test correctly stays dormant, matching the list). - Without the strip, the same comment makes the guard fail with `in the list, but now called from main(): TestNewShaderRecompilerSopkWaitcntMarkers`, which is exactly the misclassification you predicted. One note on placement: the stripping call has to sit after the `string(SUBSTRING ...)` that defines `kyty_shader_cfg_main`, since it rewrites that variable in place.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-26 01:30 UTC · original
On CMakeLists.txt line 466 (outdated):

@@ -390,6 +390,103 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+set(kyty_shader_cfg_dormant "")
+foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined})
+	string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at)

@theantipopau, thanks for fixing the // case. The comment-stripping call is in the right place, after kyty_shader_cfg_main is set.

The original finding still applies to block comments. For example, /* TestNewShaderRecompilerSopkWaitcntMarkers(); */ remains in the text searched by string(FIND), so the guard treats it as a call. Please exclude block comments before the per-name lookup too.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-09-26 01:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4109731038) On `CMakeLists.txt` line 466 (outdated): ```diff @@ -390,6 +390,103 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +set(kyty_shader_cfg_dormant "") +foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined}) + string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at) ``` `@theantipopau`, thanks for fixing the `//` case. The comment-stripping call is in the right place, after `kyty_shader_cfg_main` is set. The original finding still applies to block comments. For example, `/* TestNewShaderRecompilerSopkWaitcntMarkers(); */` remains in the text searched by `string(FIND)`, so the guard treats it as a call. Please exclude block comments before the per-name lookup too. _You are interacting with an AI system._ <!-- This is an auto-generated reply by CodeRabbit -->
Author
Owner

@⁠theantipopau on GitHub · 2026-09-26 03:21 UTC · original
On CMakeLists.txt line 466 (outdated):

@@ -390,6 +390,103 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+set(kyty_shader_cfg_dormant "")
+foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined})
+	string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at)

Fixed in 042f012a.

Block comments are now stripped after line comments and before the per-name lookup. The pattern avoids backslash escapes entirely — "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" keeps * inside character classes and gets its literal / from the surrounding "/" "/" literals, so the CMake quoted-argument backslash-stripping trap that the line-comment fix hit can't recur here.

Verified with a cmake -P harness before building:

  • /* TestNewShaderRecompilerDsFloatMinMaxTranslation(); */ (single-line and multi-line, and with surrounding text) is removed;
  • a live call adjacent to block comments survives, including between two comments on one line;
  • a / b and char* p content does not trigger a false block match;
  • the full real-file pipeline produces a dormant list identical to the 43-name allowlist.

shader_cfg_tests configures, builds and runs clean on top of the change.

**@⁠theantipopau** on GitHub · 2026-09-26 03:21 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4110012369) On `CMakeLists.txt` line 466 (outdated): ```diff @@ -390,6 +390,103 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +set(kyty_shader_cfg_dormant "") +foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined}) + string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at) ``` Fixed in 042f012a. Block comments are now stripped after line comments and before the per-name lookup. The pattern avoids backslash escapes entirely — `"/[*][^*]*[*]+([^/*][^*]*[*]+)*/"` keeps `*` inside character classes and gets its literal `/` from the surrounding `"/"` `"/"` literals, so the CMake quoted-argument backslash-stripping trap that the line-comment fix hit can't recur here. Verified with a `cmake -P` harness before building: - `/* TestNewShaderRecompilerDsFloatMinMaxTranslation(); */` (single-line and multi-line, and with surrounding text) is removed; - a live call adjacent to block comments survives, including between two comments on one line; - `a / b` and `char* p` content does not trigger a false block match; - the full real-file pipeline produces a dormant list identical to the 43-name allowlist. `shader_cfg_tests` configures, builds and runs clean on top of the change.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-26 03:24 UTC · original · edited 2026-09-26 05:15 UTC
On CMakeLists.txt line 470 (outdated):

@@ -390,6 +390,110 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled. Line and block comments are
+# dropped first, because a name mentioned only in a comment is not a call and would otherwise hide
+# a test that is still dormant. The block pattern avoids backslash escapes on purpose: CMake strips
+# a backslash before any punctuation in a quoted argument, so a literal * or ( must travel inside
+# a character class. Kept on one line, because a wrapped string(REGEX ...) silently matches
+# nothing here.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")
+string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '390,500p' CMakeLists.txt
rg -n 'TestNewShaderRecompilerVop3LaneReadDestinationEncoding|int main\(' tests/shaderCfgTests.cpp

Repository: KytyPS5/KytyPS5

Length of output: 6923


🏁 Script executed:

set -eu
tmp_script="$(mktemp)"
trap 'rm -f "$tmp_script"' EXIT
cat >"$tmp_script" <<'EOF'
set(src "int main() {\n  /* TestDormant(); // explanation */\n}\n")
set(current "${src}")
string(REGEX REPLACE "//[^\n]*" "" current "${current}")
string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" current "${current}")
message("CURRENT=[${current}]")
set(reversed "${src}")
string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" reversed "${reversed}")
string(REGEX REPLACE "//[^\n]*" "" reversed "${reversed}")
message("REVERSED=[${reversed}]")
string(FIND "${current}" "TestDormant();" current_call)
string(FIND "${reversed}" "TestDormant();" reversed_call)
message("CURRENT_CALL=${current_call}")
message("REVERSED_CALL=${reversed_call}")
EOF
cmake -P "$tmp_script" 2>&1
python3 - <<'PY'
from pathlib import Path
p = Path("tests/shaderCfgTests.cpp")
s = p.read_text()
start = s.find("int main(")
body = s[start:] if start >= 0 else ""
lines = body.splitlines()
hits = []
for i, line in enumerate(lines, 1):
    if "/*" in line and "//" in line and line.find("/*") < line.find("//") and "*/" in line and line.find("//") < line.find("*/"):
        hits.append((i, line.strip()))
print(f"MAIN_START_FOUND={start >= 0}")
print(f"SAME_LINE_BLOCK_LINE_COMMENT_HITS={len(hits)}")
for i, line in hits[:20]:
    print(f"{i}:{line}")
PY

Repository: KytyPS5/KytyPS5

Length of output: 243


🌐 Web query:

official CMake documentation string REGEX REPLACE regex replacement syntax

💡 Result:

The official CMake documentation says `string(REGEX REPLACE)` replaces each regex match, and the replacement can use capture groups `\1` through `\9`. In quoted CMake code, write them with doubled backslashes (for example, `"\\1"`) so argument parsing passes the backslash through. [1]

```cmake
string(REGEX REPLACE "([0-9]+)-([a-z]+)" "\\2_\\1" result "42-foo")
# result = "foo_42"
```

[Official `string()` documentation][1] ([cmake.org](https://cmake.org/cmake/help/latest/command/string.html?utm_source=openai))

Citations:

- 1: https://cmake.org/cmake/help/latest/command/string.html?utm_source=openai

🏁 Script executed:

set -eu
python3 - <<'PY'
from pathlib import Path
import re
p = Path("tests/shaderCfgTests.cpp")
s = p.read_text()
start = s.find("int main(")
body = s[start:] if start >= 0 else ""
pattern = re.compile(r"/[*][^*]*[*]+([^/*][^*]*[*]+)*/")
source = "int main() {\n  /* TestDormant(); // explanation */\n}\n"
current = re.sub(r"//[^\n]*", "", source)
current = pattern.sub("", current)
reversed_order = pattern.sub("", source)
reversed_order = re.sub(r"//[^\n]*", "", reversed_order)
print("PY_CURRENT=" + repr(current))
print("PY_REVERSED=" + repr(reversed_order))
print("PY_CURRENT_CALL=" + str(current.find("TestDormant();")))
print("PY_REVERSED_CALL=" + str(reversed_order.find("TestDormant();")))
hits = []
for i, line in enumerate(body.splitlines(), 1):
    a, b, c = line.find("/*"), line.find("//"), line.find("*/")
    if 0 <= a < b < c:
        hits.append((i, line.strip()))
print(f"MAIN_START_FOUND={start >= 0}")
print(f"SAME_LINE_BLOCK_LINE_COMMENT_HITS={len(hits)}")
for i, line in hits[:20]:
    print(f"{i}:{line}")
PY

Repository: KytyPS5/KytyPS5

Length of output: 339


Strip block comments before line comments.

If a block comment contains // before its closing */ on the same line, the current line-comment replacement removes the closing delimiter. The block-comment replacement then cannot match, so the call search can treat a dormant allowlisted test as called and fail configuration.

The current shader test source has no such same-line pattern, so this is a narrow trigger.

Suggested fix
-string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")
 string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")
+string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")

✅ Confirmed as addressed by @⁠theantipopau

**@⁠coderabbitai[bot]** on GitHub · 2026-09-26 03:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4110018361) · edited 2026-09-26 05:15 UTC On `CMakeLists.txt` line 470 (outdated): ```diff @@ -390,6 +390,110 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. Line and block comments are +# dropped first, because a name mentioned only in a comment is not a call and would otherwise hide +# a test that is still dormant. The block pattern avoids backslash escapes on purpose: CMake strips +# a backslash before any punctuation in a quoted argument, so a literal * or ( must travel inside +# a character class. Kept on one line, because a wrapped string(REGEX ...) silently matches +# nothing here. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") +string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") ``` _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash sed -n '390,500p' CMakeLists.txt rg -n 'TestNewShaderRecompilerVop3LaneReadDestinationEncoding|int main\(' tests/shaderCfgTests.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 6923 --- 🏁 Script executed: ```bash set -eu tmp_script="$(mktemp)" trap 'rm -f "$tmp_script"' EXIT cat >"$tmp_script" <<'EOF' set(src "int main() {\n /* TestDormant(); // explanation */\n}\n") set(current "${src}") string(REGEX REPLACE "//[^\n]*" "" current "${current}") string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" current "${current}") message("CURRENT=[${current}]") set(reversed "${src}") string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" reversed "${reversed}") string(REGEX REPLACE "//[^\n]*" "" reversed "${reversed}") message("REVERSED=[${reversed}]") string(FIND "${current}" "TestDormant();" current_call) string(FIND "${reversed}" "TestDormant();" reversed_call) message("CURRENT_CALL=${current_call}") message("REVERSED_CALL=${reversed_call}") EOF cmake -P "$tmp_script" 2>&1 python3 - <<'PY' from pathlib import Path p = Path("tests/shaderCfgTests.cpp") s = p.read_text() start = s.find("int main(") body = s[start:] if start >= 0 else "" lines = body.splitlines() hits = [] for i, line in enumerate(lines, 1): if "/*" in line and "//" in line and line.find("/*") < line.find("//") and "*/" in line and line.find("//") < line.find("*/"): hits.append((i, line.strip())) print(f"MAIN_START_FOUND={start >= 0}") print(f"SAME_LINE_BLOCK_LINE_COMMENT_HITS={len(hits)}") for i, line in hits[:20]: print(f"{i}:{line}") PY ``` Repository: KytyPS5/KytyPS5 Length of output: 243 --- 🌐 Web query: `official CMake documentation string REGEX REPLACE regex replacement syntax` 💡 Result: ```` The official CMake documentation says `string(REGEX REPLACE)` replaces each regex match, and the replacement can use capture groups `\1` through `\9`. In quoted CMake code, write them with doubled backslashes (for example, `"\\1"`) so argument parsing passes the backslash through. [1] ```cmake string(REGEX REPLACE "([0-9]+)-([a-z]+)" "\\2_\\1" result "42-foo") # result = "foo_42" ``` [Official `string()` documentation][1] ([cmake.org](https://cmake.org/cmake/help/latest/command/string.html?utm_source=openai)) Citations: - 1: https://cmake.org/cmake/help/latest/command/string.html?utm_source=openai ```` --- 🏁 Script executed: ```bash set -eu python3 - <<'PY' from pathlib import Path import re p = Path("tests/shaderCfgTests.cpp") s = p.read_text() start = s.find("int main(") body = s[start:] if start >= 0 else "" pattern = re.compile(r"/[*][^*]*[*]+([^/*][^*]*[*]+)*/") source = "int main() {\n /* TestDormant(); // explanation */\n}\n" current = re.sub(r"//[^\n]*", "", source) current = pattern.sub("", current) reversed_order = pattern.sub("", source) reversed_order = re.sub(r"//[^\n]*", "", reversed_order) print("PY_CURRENT=" + repr(current)) print("PY_REVERSED=" + repr(reversed_order)) print("PY_CURRENT_CALL=" + str(current.find("TestDormant();"))) print("PY_REVERSED_CALL=" + str(reversed_order.find("TestDormant();"))) hits = [] for i, line in enumerate(body.splitlines(), 1): a, b, c = line.find("/*"), line.find("//"), line.find("*/") if 0 <= a < b < c: hits.append((i, line.strip())) print(f"MAIN_START_FOUND={start >= 0}") print(f"SAME_LINE_BLOCK_LINE_COMMENT_HITS={len(hits)}") for i, line in hits[:20]: print(f"{i}:{line}") PY ``` Repository: KytyPS5/KytyPS5 Length of output: 339 --- </details> **Strip block comments before line comments.** If a block comment contains `//` before its closing `*/` on the same line, the current line-comment replacement removes the closing delimiter. The block-comment replacement then cannot match, so the call search can treat a dormant allowlisted test as called and fail configuration. The current shader test source has no such same-line pattern, so this is a narrow trigger. <details> <summary>Suggested fix</summary> ```diff -string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") +string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") ``` </details> <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:09363c91ab4f66eb2f866230 --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Confirmed as addressed by @⁠theantipopau <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-26 03:24 UTC · original · reviewed

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: a303ca55-9628-4149-beed-e6ff191e243f

📥 Commits

Reviewing files that changed from the base of the PR and between 745d53e519d2d81a4f89e802a1965fd9399491ee and 042f012af740607ae113d6cbc73d510e611feac0.

📒 Files selected for processing (1)
  • CMakeLists.txt

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-09-26 03:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#pullrequestreview-5324370349) · **reviewed** **Actionable comments posted: 1** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `a303ca55-9628-4149-beed-e6ff191e243f` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 745d53e519d2d81a4f89e802a1965fd9399491ee and 042f012af740607ae113d6cbc73d510e611feac0. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `CMakeLists.txt` </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. </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-26 03:25 UTC · original
On CMakeLists.txt line 466 (outdated):

@@ -390,6 +390,103 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+set(kyty_shader_cfg_dormant "")
+foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined})
+	string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at)

@theantipopau, thanks for the detailed verification. CMakeLists.txt now strips block comments before the per-name lookup, so a call that appears only in a block comment does not count as active.

✅ Review thread resolved.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-09-26 03:25 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4110021419) On `CMakeLists.txt` line 466 (outdated): ```diff @@ -390,6 +390,103 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +set(kyty_shader_cfg_dormant "") +foreach(kyty_shader_cfg_name ${kyty_shader_cfg_defined}) + string(FIND "${kyty_shader_cfg_main}" "${kyty_shader_cfg_name}();" kyty_shader_cfg_at) ``` `@theantipopau`, thanks for the detailed verification. `CMakeLists.txt` now strips block comments before the per-name lookup, so a call that appears only in a block comment does not count as active. ✅ Review thread resolved. _You are interacting with an AI system._ <!-- This is an auto-generated reply by CodeRabbit -->
Author
Owner

@⁠theantipopau on GitHub · 2026-09-26 05:10 UTC · original
On CMakeLists.txt line 470 (outdated):

@@ -390,6 +390,110 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled. Line and block comments are
+# dropped first, because a name mentioned only in a comment is not a call and would otherwise hide
+# a test that is still dormant. The block pattern avoids backslash escapes on purpose: CMake strips
+# a backslash before any punctuation in a quoted argument, so a literal * or ( must travel inside
+# a character class. Kept on one line, because a wrapped string(REGEX ...) silently matches
+# nothing here.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")
+string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")

Fixed in 6c56d67c.

The block-comment pass now runs before the line-comment pass, so the closing */ of a block containing // survives and the block matches. The comment block documents the residual ordering gap this swap creates: a /* inside a line comment paired with a later */ in main can now eat live calls — but that direction fails the configure loudly (resurrected-test error) rather than silently hiding a dormant one, which is the safe side to err on.

Verified with the cmake -P harness extended with your case — /* TestNewShaderRecompilerDsFloatMinMaxTranslation(); // explanation */ is now fully removed — plus the earlier cases (live calls adjacent to comments, multi-line blocks, calls between two blocks, line comments, a / b / char* non-matches) and the full real-file pipeline (dormant list still exactly the 43-name allowlist). shader_cfg_tests configures, builds and runs clean on top.

**@⁠theantipopau** on GitHub · 2026-09-26 05:10 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4110275151) On `CMakeLists.txt` line 470 (outdated): ```diff @@ -390,6 +390,110 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. Line and block comments are +# dropped first, because a name mentioned only in a comment is not a call and would otherwise hide +# a test that is still dormant. The block pattern avoids backslash escapes on purpose: CMake strips +# a backslash before any punctuation in a quoted argument, so a literal * or ( must travel inside +# a character class. Kept on one line, because a wrapped string(REGEX ...) silently matches +# nothing here. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") +string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") ``` Fixed in 6c56d67c. The block-comment pass now runs before the line-comment pass, so the closing `*/` of a block containing `//` survives and the block matches. The comment block documents the residual ordering gap this swap creates: a `/*` inside a line comment paired with a later `*/` in `main` can now eat live calls — but that direction fails the configure loudly (resurrected-test error) rather than silently hiding a dormant one, which is the safe side to err on. Verified with the `cmake -P` harness extended with your case — `/* TestNewShaderRecompilerDsFloatMinMaxTranslation(); // explanation */` is now fully removed — plus the earlier cases (live calls adjacent to comments, multi-line blocks, calls between two blocks, line comments, `a / b` / `char*` non-matches) and the full real-file pipeline (dormant list still exactly the 43-name allowlist). `shader_cfg_tests` configures, builds and runs clean on top.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-26 05:15 UTC · original
On CMakeLists.txt line 470 (outdated):

@@ -390,6 +390,110 @@ endfunction()
 
 add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp")
 
+# A test function that is defined but never called from main() silently provides no coverage, and
+# that had happened 43 times in this file. Work out which definitions have no call after main()
+# and fail the configure step when the result is not exactly the list documented below, so the gap
+# cannot grow unnoticed.
+#
+# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that
+# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening
+# the assertion, and its name should be dropped from this list in the same change.
+set(kyty_shader_cfg_known_dormant
+	TestNewShaderRecompilerSopkWaitcntMarkers
+	TestNewShaderRecompilerRdna2ScalarOpcodes
+	TestNewShaderRecompilerScalarVectorAlu
+	TestNewShaderRecompilerMoreAluFamilies
+	TestNewShaderRecompilerExpandedAluBatch
+	TestNewShaderRecompilerVop3pPackedF16
+	TestNewShaderRecompilerStagedShaderOps
+	TestNewShaderRecompilerBootF16UnaryOpcodes
+	TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes
+	TestNewShaderRecompilerScalarB64Alu
+	TestNewShaderRecompilerSignedCompareAlu
+	TestNewShaderRecompilerSignedMinShiftAlu
+	TestNewShaderRecompilerScalarBitfieldAlu
+	TestNewShaderRecompilerMemoryFamilyTranslation
+	TestNewShaderRecompilerImageQueryTranslation
+	TestNewShaderRecompilerCubeSampleCoordinates
+	TestNewShaderRecompilerImageSampleVariants
+	TestNewShaderRecompilerImageSampleA16SamplerCoords
+	TestNewShaderRecompilerImageSampleOpcodeAliases
+	TestNewShaderRecompilerImageSampleA16ExceptionComponents
+	TestNewShaderRecompilerImageLoadA16UintCoords
+	TestNewShaderRecompilerImageViewDimensions
+	TestNewShaderRecompilerStorageImage1DDescriptorVariants
+	TestNewShaderRecompilerNullImageUsesCanonical2DView
+	TestNewShaderRecompilerImageGatherVariants
+	TestNewShaderRecompilerImageLoadVariants
+	TestNewShaderRecompilerImageLoad2DMsaa
+	TestNewShaderRecompilerImageStoreTranslation
+	TestNewShaderRecompilerStorageImage3DDescriptorVariant
+	TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D
+	TestNewShaderRecompilerImageAtomicTranslation
+	TestNewShaderRecompilerVintrpTranslation
+	TestNewShaderRecompilerBufferSignedLoadTranslation
+	TestNewShaderRecompilerBufferSubDwordStoreTranslation
+	TestNewShaderRecompilerFlatOldBackedTranslation
+	TestNewShaderRecompilerFlatSignedLoadTranslation
+	TestNewShaderRecompilerFlatStoreTranslation
+	TestNewShaderRecompilerAtomicTranslation
+	TestNewShaderRecompilerDsSubDwordTranslation
+	TestNewShaderRecompilerDsSwizzleTranslation
+	TestNewShaderRecompilerDsAddtidTranslation
+	TestNewShaderRecompilerDsFloatMinMaxTranslation
+	TestNewShaderRecompilerExpVertexOutputs
+)
+file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source)
+file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included)
+# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would
+# only run when something unrelated touched the build. Register the sources as configure-time
+# dependencies to make editing them re-run it.
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc")
+# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in
+# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty
+# capture group, and recovering the name would then need a backreference. Stripping the matched
+# prefix needs no backreference at all.
+string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}")
+string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}")
+list(REMOVE_DUPLICATES kyty_shader_cfg_defined)
+# The calls live after main(). Each name is looked up directly instead of matching a call pattern,
+# so the check does not depend on how a call happens to be spelled. Line and block comments are
+# dropped first, because a name mentioned only in a comment is not a call and would otherwise hide
+# a test that is still dormant. The block pattern avoids backslash escapes on purpose: CMake strips
+# a backslash before any punctuation in a quoted argument, so a literal * or ( must travel inside
+# a character class. Kept on one line, because a wrapped string(REGEX ...) silently matches
+# nothing here.
+string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos)
+math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1")
+string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main)
+string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")
+string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}")

@theantipopau, thanks for the detailed verification. The current CMakeLists.txt removes block comments before line comments, which addresses the reported case.

✅ Review thread resolved.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-09-26 05:15 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/840#discussion_r4110284574) On `CMakeLists.txt` line 470 (outdated): ```diff @@ -390,6 +390,110 @@ endfunction() add_kyty_full_emulator_test(shader_cfg_tests "${KYTY_TESTS_DIR}/shaderCfgTests.cpp") +# A test function that is defined but never called from main() silently provides no coverage, and +# that had happened 43 times in this file. Work out which definitions have no call after main() +# and fail the configure step when the result is not exactly the list documented below, so the gap +# cannot grow unnoticed. +# +# These are knowingly dormant: each asserts decoder, translator or SPIR-V emission behaviour that +# is not implemented yet. Wiring one up means implementing what it asserts rather than weakening +# the assertion, and its name should be dropped from this list in the same change. +set(kyty_shader_cfg_known_dormant + TestNewShaderRecompilerSopkWaitcntMarkers + TestNewShaderRecompilerRdna2ScalarOpcodes + TestNewShaderRecompilerScalarVectorAlu + TestNewShaderRecompilerMoreAluFamilies + TestNewShaderRecompilerExpandedAluBatch + TestNewShaderRecompilerVop3pPackedF16 + TestNewShaderRecompilerStagedShaderOps + TestNewShaderRecompilerBootF16UnaryOpcodes + TestNewShaderRecompilerBootB16PackedAndSdwaOpcodes + TestNewShaderRecompilerScalarB64Alu + TestNewShaderRecompilerSignedCompareAlu + TestNewShaderRecompilerSignedMinShiftAlu + TestNewShaderRecompilerScalarBitfieldAlu + TestNewShaderRecompilerMemoryFamilyTranslation + TestNewShaderRecompilerImageQueryTranslation + TestNewShaderRecompilerCubeSampleCoordinates + TestNewShaderRecompilerImageSampleVariants + TestNewShaderRecompilerImageSampleA16SamplerCoords + TestNewShaderRecompilerImageSampleOpcodeAliases + TestNewShaderRecompilerImageSampleA16ExceptionComponents + TestNewShaderRecompilerImageLoadA16UintCoords + TestNewShaderRecompilerImageViewDimensions + TestNewShaderRecompilerStorageImage1DDescriptorVariants + TestNewShaderRecompilerNullImageUsesCanonical2DView + TestNewShaderRecompilerImageGatherVariants + TestNewShaderRecompilerImageLoadVariants + TestNewShaderRecompilerImageLoad2DMsaa + TestNewShaderRecompilerImageStoreTranslation + TestNewShaderRecompilerStorageImage3DDescriptorVariant + TestNewShaderRecompilerStorageImage2DDescriptorOverridesMimg3D + TestNewShaderRecompilerImageAtomicTranslation + TestNewShaderRecompilerVintrpTranslation + TestNewShaderRecompilerBufferSignedLoadTranslation + TestNewShaderRecompilerBufferSubDwordStoreTranslation + TestNewShaderRecompilerFlatOldBackedTranslation + TestNewShaderRecompilerFlatSignedLoadTranslation + TestNewShaderRecompilerFlatStoreTranslation + TestNewShaderRecompilerAtomicTranslation + TestNewShaderRecompilerDsSubDwordTranslation + TestNewShaderRecompilerDsSwizzleTranslation + TestNewShaderRecompilerDsAddtidTranslation + TestNewShaderRecompilerDsFloatMinMaxTranslation + TestNewShaderRecompilerExpVertexOutputs +) +file(READ "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" kyty_shader_cfg_source) +file(READ "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc" kyty_shader_cfg_included) +# file(READ) alone does not make CMake reconfigure when the file is edited, so the guard would +# only run when something unrelated touched the build. Register the sources as configure-time +# dependencies to make editing them re-run it. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${KYTY_TESTS_DIR}/shaderCfgTests.cpp" "${KYTY_TESTS_DIR}/ShaderRayTracingTests.inc") +# Only the "void TestName" prefix is matched, deliberately. CMake strips a backslash before "(" in +# a quoted argument, so a pattern ending in an escaped paren pair silently degrades into an empty +# capture group, and recovering the name would then need a backreference. Stripping the matched +# prefix needs no backreference at all. +string(REGEX MATCHALL "void[ \t]+Test[A-Za-z0-9_]+" kyty_shader_cfg_defined_raw "${kyty_shader_cfg_source}${kyty_shader_cfg_included}") +string(REGEX REPLACE "void[ \t]+" "" kyty_shader_cfg_defined "${kyty_shader_cfg_defined_raw}") +list(REMOVE_DUPLICATES kyty_shader_cfg_defined) +# The calls live after main(). Each name is looked up directly instead of matching a call pattern, +# so the check does not depend on how a call happens to be spelled. Line and block comments are +# dropped first, because a name mentioned only in a comment is not a call and would otherwise hide +# a test that is still dormant. The block pattern avoids backslash escapes on purpose: CMake strips +# a backslash before any punctuation in a quoted argument, so a literal * or ( must travel inside +# a character class. Kept on one line, because a wrapped string(REGEX ...) silently matches +# nothing here. +string(FIND "${kyty_shader_cfg_source}" "int main(" kyty_shader_cfg_main_pos) +math(EXPR kyty_shader_cfg_main_pos "${kyty_shader_cfg_main_pos} - 1") +string(SUBSTRING "${kyty_shader_cfg_source}" ${kyty_shader_cfg_main_pos} -1 kyty_shader_cfg_main) +string(REGEX REPLACE "//[^\n]*" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") +string(REGEX REPLACE "/[*][^*]*[*]+([^/*][^*]*[*]+)*/" "" kyty_shader_cfg_main "${kyty_shader_cfg_main}") ``` `@theantipopau`, thanks for the detailed verification. The current `CMakeLists.txt` removes block comments before line comments, which addresses the reported case. ✅ Review thread resolved. _You are interacting with an AI system._ <!-- This is an auto-generated reply by CodeRabbit -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.