[clang] [llvm] [HLSL] Add support for SV_CullDistance (PR #247321)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 2 19:47:38 PST 2026
https://github.com/hekota commented:
Reviewed the code only, I will get back to the tests tomorrow.
The change is not enforcing SV_CullDistance [constraint](https://github.com/llvm/wg-hlsl/blob/main/proposals/0040-semantics-overview.md#system-value-constraints) that it must be max 8 components:
"Any combinations of scalars/vectors combined into one or two vectors of up to 4 32-bit floats each, shared between SV_ClipDistance and SV_CullDistance."
This constraint applies to DirectX backend ([`D3D12_CLIP_OR_CULL_DISTANCE_COUNT`](https://learn.microsoft.com/en-us/windows/win32/direct3d12/constants) ==`8`). For Vulkan it might be device-depended, but since it is mentioned in the proposal, maybe it is actually an HLSL constraint?
https://github.com/llvm/llvm-project/pull/247321
More information about the cfe-commits
mailing list