================
@@ -1996,6 +2005,23 @@ void SemaHLSL::diagnoseSystemSemanticAttr(Decl *D, const 
ParsedAttr &AL,
     return;
   }
 
+  if (SemanticName == "SV_INSTANCEID") {
+    uint64_t SizeInBits = SemaRef.Context.getTypeSize(ValueType);
+    // DXIL permits U32 or U16. SPIR-V requires 32-bit scalar per
+    // VUID-InstanceIndex-InstanceIndex-04265.
----------------
pow2clk wrote:

Again, this only worked in PS where it was being treated as user-defined. 
SPIR-V will complain if used this way in VS https://godbolt.org/z/vrEj63Yq9

https://github.com/llvm/llvm-project/pull/221091
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to