================
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-fnative-int16-type -finclude-default-header -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple spirv-pc-vulkan1.3-library -fnative-half-type
-fnative-int16-type -finclude-default-header -fsyntax-only -verify %s
+
+// Invalid type, index and interpolation uses of SV_IsFrontFace. The valid
+// cases are covered by isfrontface.ps.hlsl, and the shader stage and IO
+// direction by isfrontface.stages.hlsl.
+
+[shader("pixel")]
+void bad_float(float s : SV_IsFrontFace) {}
+// expected-error@-1 {{semantic 'SV_IsFrontFace' must be a scalar of bool or
32 bit integer type (was 'float')}}
+[shader("pixel")]
+void bad_int64(uint64_t s : SV_IsFrontFace) {}
+// expected-error@-1 {{semantic 'SV_IsFrontFace' must be a scalar of bool or
32 bit integer type (was 'uint64_t' (aka 'unsigned long')}}
+[shader("pixel")]
+void bad_vector(bool3 s : SV_IsFrontFace) {}
+// expected-error@-1 {{semantic 'SV_IsFrontFace' must be a scalar of bool or
32 bit integer type (was 'bool3' (aka 'vector<bool, 3>'))}}
+[shader("pixel")]
+void bad_vector1(bool1 s : SV_IsFrontFace) {}
+// expected-error@-1 {{semantic 'SV_IsFrontFace' must be a scalar of bool or
32 bit integer type (was 'bool1' (aka 'vector<bool, 1>'))}}
+[shader("pixel")]
+void bad_matrix(bool2x2 s : SV_IsFrontFace) {}
----------------
jzakharovnv wrote:
Fixed, thanks!
https://github.com/llvm/llvm-project/pull/232071
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits