================
@@ -730,10 +730,18 @@ llvm::Value *CGHLSLRuntime::emitSystemSemanticLoad(
}
if (SemanticName == "SV_POSITION") {
- if (CGM.getTriple().getEnvironment() == Triple::EnvironmentType::Pixel)
- return createSPIRVBuiltinLoad(B, CGM.getModule(), Type,
- Semantic->getAttrName()->getName(),
- /* BuiltIn::FragCoord */ 15);
+ if (CGM.getTriple().getEnvironment() == Triple::EnvironmentType::Pixel) {
+ if (CGM.getTarget().getTriple().isSPIRV())
+ return createSPIRVBuiltinLoad(B, CGM.getModule(), Type,
+ Semantic->getAttrName()->getName(),
+ /* BuiltIn::FragCoord */ 15);
+ if (CGM.getTarget().getTriple().isDXIL())
+ return emitDXILUserSemanticLoad(B, Type, Semantic, Index);
+ }
+
+ if (CGM.getTriple().getEnvironment() == Triple::EnvironmentType::Vertex) {
+ return emitUserSemanticLoad(B, Type, Decl, Semantic, Index);
+ }
}
llvm_unreachable("non-handled system semantic. FIXME.");
----------------
s-perron wrote:
Could this updated to have a move meaning message?
https://github.com/llvm/llvm-project/pull/168735
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits