[clang] [HLSL][SPIRV] Implement SV_IsFrontFace (PR #232071)

Gregory Roth via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 14:53:44 PDT 2026


================
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -x hlsl -verify -o - %s
+// RUN: %clang_cc1 -triple spirv-pc-vulkan1.3-library -finclude-default-header -x hlsl -verify -o - %s
+
+[shader("pixel")]
+float4 bad_uint(uint ff : SV_IsFrontFace) : SV_Target {
----------------
pow2clk wrote:

DXC allowed uints for this semantic for DXIL. SPIR-V validator rejects that though having a clearer distinction between the two. Not 100% sure which way we'd rather go here, but it bears discussion. https://github.com/microsoft/DirectXShaderCompiler/blob/main/tools/clang/test/HLSLFileCheck/hlsl/semantics/sv_isfrontface/isfrontface.hlsl

https://github.com/llvm/llvm-project/pull/232071


More information about the cfe-commits mailing list