Windows build of main fails: near in ShaderRayTracingGpuTests.inc is a Windows macro #1984

Closed
opened 2026-11-26 10:10:48 +00:00 by github-bot · 1 comment
Owner

@⁠Nawid3333 on GitHub · 2026-10-29 23:32 UTC · original

Since 5eab0ec7 ("shader: add BVH8 intersections and instance transforms"), which added this test, the Windows CI job fails while compiling
shader_recompiler_compute_tests:

tests\ShaderRayTracingGpuTests.inc(28,35): error: expected unqualified-id
   28 |   const std::array<float, 8> near {5,1,3,7,4,2,6,8};

The Windows SDK's minwindef.h (pulled in by windows.h) defines near and far as empty macros, so the declaration and its later uses (lines 46-47, 51,
129-130) no longer parse. Linux and macOS build fine. CI run: https://github.com/KytyPS5/KytyPS5/actions/runs/40923267298

Renaming the variable (for example to near_planes) fixes it; with that rename the test target builds locally on
Windows 11 with clang-cl 19.

**@⁠Nawid3333** on GitHub · 2026-10-29 23:32 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1984) Since 5eab0ec7 ("shader: add BVH8 intersections and instance transforms"), which added this test, the Windows CI job fails while compiling `shader_recompiler_compute_tests`: ``` tests\ShaderRayTracingGpuTests.inc(28,35): error: expected unqualified-id 28 | const std::array<float, 8> near {5,1,3,7,4,2,6,8}; ``` The Windows SDK's `minwindef.h` (pulled in by `windows.h`) defines `near` and `far` as empty macros, so the declaration and its later uses (lines 46-47, 51, 129-130) no longer parse. Linux and macOS build fine. CI run: https://github.com/KytyPS5/KytyPS5/actions/runs/40923267298 Renaming the variable (for example to `near_planes`) fixes it; with that rename the test target builds locally on Windows 11 with clang-cl 19.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:10:48 +00:00
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-30 00:01 UTC · original

Fixed by #1983 (merged as 3ad21e35), which renames the variable; closing this duplicate.

**@⁠Nawid3333** on GitHub · 2026-10-30 00:01 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1984#issuecomment-6511443189) Fixed by #1983 (merged as 3ad21e35), which renames the variable; closing this duplicate.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#1984
No description provided.