From caf6f7a03793be3fc74683994414776f3604ad8a Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 17 Jan 2018 14:48:07 -0500 Subject: All compiler fixes to get ir branch work with falcor feature demo. - support overloaded generic function. this involves adding a new expression type, `OverloadedExpr2` to hold the candidate expressions for the generic function decl being referenced. - make BitNot a normal IROp instead of an IRPseudoOp - make sure we clone the decorations of parameters when cloning ir functions - propagate geometry shader entry point attributes (`[maxvertexcount]` and `[instance]`) through HLSL emit - IR emit: handle geometry shader entry-point parameter decorations, such as 'triangle'. - IR emit: treat geometry shader stream output typed ir value as `should fold into use`. --- source/slang/ast-legalize.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/ast-legalize.cpp') diff --git a/source/slang/ast-legalize.cpp b/source/slang/ast-legalize.cpp index 996a66eac..5df6b80f5 100644 --- a/source/slang/ast-legalize.cpp +++ b/source/slang/ast-legalize.cpp @@ -5091,6 +5091,14 @@ struct FindIRDeclUsedByASTVisitor // TODO: need to walk the lookup result too } + void visitOverloadedExpr2(OverloadedExpr2* expr) + { + walkExpr(expr->base); + for (auto & candidate : expr->candidiateExprs) + walkExpr(candidate); + } + + void visitConstantExpr(ConstantExpr*) {} -- cgit v1.2.3