tests: rename the BVH mirror test's near lambda, a Windows macro #2229

Manually merged
github merged 1 commit from gh-pr/2229/head into gh-pr/2229/base 2026-11-26 10:17:26 +00:00
Owner

@⁠Nawid3333 on GitHub · 2026-11-12 15:23 UTC · original
Nawid3333:tests/bvh-mirror-near-macro → main · +3 −3 · 1 files · 1 commits · merged 2026-11-12 15:49 UTC

Main's Windows build fails since eb3e86d5a with tests/BvhMirrorGpuTests.inc(154,25): error: expected unqualified-id (the Build KytyPS5 (Windows) job, e.g. run 43221430659 on e35360fa4). The Windows headers define near (and far) as empty macros, so const auto near = [](u32 value, float wanted) { becomes const auto = .... This renames the lambda to close_to; nothing else changes.

Checked on Windows with clang-cl: tests/ShaderRecompilerComputeTests.cpp fails to compile on main with that error and compiles with this change. On my fork's CI (run 43229619484) the Windows and Linux jobs build and pass their tests with it.

Written with Claude Code (AI): it read the failing CI log, made the change and compiled it on my PC; reviewed by me.

🤖 Generated with Claude Code

**@⁠Nawid3333** on GitHub · 2026-11-12 15:23 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2229) `Nawid3333:tests/bvh-mirror-near-macro` → `main` · +3 −3 · 1 files · 1 commits · merged 2026-11-12 15:49 UTC Main's Windows build fails since eb3e86d5a with `tests/BvhMirrorGpuTests.inc(154,25): error: expected unqualified-id` (the Build KytyPS5 (Windows) job, e.g. run 43221430659 on e35360fa4). The Windows headers define `near` (and `far`) as empty macros, so `const auto near = [](u32 value, float wanted) {` becomes `const auto = ...`. This renames the lambda to `close_to`; nothing else changes. Checked on Windows with clang-cl: `tests/ShaderRecompilerComputeTests.cpp` fails to compile on main with that error and compiles with this change. On my fork's CI (run 43229619484) the Windows and Linux jobs build and pass their tests with it. Written with Claude Code (AI): it read the failing CI log, made the change and compiled it on my PC; reviewed by me. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Windows headers define `near` (and `far`) as empty macros, so on
Windows the lambda declaration became `const auto = ...` and
ShaderRecompilerComputeTests.cpp did not compile: "BvhMirrorGpuTests.inc
(154,25): error: expected unqualified-id", the failing Build KytyPS5
(Windows) job on main since eb3e86d5a.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:17:22 +00:00
github manually merged commit 738f7519c9 into gh-pr/2229/base 2026-11-26 10:17:26 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-12 15:24 UTC · original

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The BVH mirror GPU test renames its local float-comparison helper from near to close_to. The hit distance and barycentric coordinate checks use the renamed helper. The tolerance and comparison behavior remain unchanged.

Suggested reviewers: nmzik

Change: Other

Merge Risk: Minimal · up to 738f7

This is a test-only rename that avoids a Windows macro collision on near. It does not affect production behavior, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the actual change: renaming the BVH mirror test's near lambda, which is a Windows macro. The changeset renames near to close_to in tests/BvhMirrorGpuTests.inc, so the title match…
Description check Passed The description explains the problem: a Windows build failure on main caused by the near macro in Windows headers. It names the affected file, the rename to close_to, the test environment, and the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the actual change: renaming the BVH mirror test's near lambda, which is a Windows macro. The changeset renames near to close_to in tests/BvhMirrorGpuTests.inc, so the title matches the main change. It is specific and concise.

Full details: Description check

Explanation

The description explains the problem: a Windows build failure on main caused by the near macro in Windows headers. It names the affected file, the rename to close_to, the test environment, and the CI runs. It is directly related to the changeset.

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

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e35360fa41 and 738f7519c9.

Files selected for processing: 1

  • tests/BvhMirrorGpuTests.inc

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

**@⁠coderabbitai[bot]** on GitHub · 2026-11-12 15:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2229#issuecomment-6827769680) <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/2229?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_status_start --> No actionable comments were generated in the recent review. <!-- recent_review_status_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> <br> The BVH mirror GPU test renames its local float-comparison helper from `near` to `close_to`. The hit distance and barycentric coordinate checks use the renamed helper. The tolerance and comparison behavior remain unchanged. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"738f7519c936b2100742af665dee7d1e48ae65b3" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Other <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>738f7</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `738f7` --> <!-- final_review_risk_coverage:{"sourceCommitId":"738f7519c936b2100742af665dee7d1e48ae65b3","coveredCommitId":"738f7519c936b2100742af665dee7d1e48ae65b3","kind":"reviewed"} --> This is a test-only rename that avoids a Windows macro collision on `near`. It does not affect production behavior, and no merge-blocking risk remains. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4</strong></summary> <dl> <dd> <br> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title names the actual change: renaming the BVH mirror test's `near` lambda, which is a Windows macro. The changeset renames `near` to `close_to` in tests/BvhMirrorGpuTests.inc, so the title match… | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description explains the problem: a Windows build failure on main caused by the `near` macro in Windows headers. It names the affected file, the rename to `close_to`, the test environment, and the… | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | <details> <summary><strong>Full details: Title check</strong></summary> <dl> <dd> <br> **Explanation** The title names the actual change: renaming the BVH mirror test's `near` lambda, which is a Windows macro. The changeset renames `near` to `close_to` in tests/BvhMirrorGpuTests.inc, so the title matches the main change. It is specific and concise. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description explains the problem: a Windows build failure on main caused by the `near` macro in Windows headers. It names the affected file, the rename to `close_to`, the test environment, and the CI runs. It is directly related to the changeset. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2229)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> <br> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end --> <!-- recent_review_start --> <h6> <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <br> <!-- review_info_content --> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/e35360fa41eb5b9b20171dedb2426ac684aaf3d7/.coderabbit.yaml>) - **Commit**: [e35360f](<https://github.com/KytyPS5/KytyPS5/commit/e35360fa41eb5b9b20171dedb2426ac684aaf3d7>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `fbfda58d-758e-4fe0-b189-acb03ccb1063` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between e35360fa41eb5b9b20171dedb2426ac684aaf3d7 and 738f7519c936b2100742af665dee7d1e48ae65b3. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 1</strong></summary> <dl> <dd> <br> * `tests/BvhMirrorGpuTests.inc` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- recent_review_end -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.