summaryrefslogtreecommitdiff
path: root/source/slang/modifier-defs.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-01-17 14:48:07 -0500
committerYong He <yonghe@outlook.com>2018-01-17 20:54:56 -0500
commitcaf6f7a03793be3fc74683994414776f3604ad8a (patch)
treed9d3e3a4e4a45d5e09d613159be2faaf137e0e72 /source/slang/modifier-defs.h
parent68f529af8d0eb8ec45a2d73e82c4ee372015ce01 (diff)
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`.
Diffstat (limited to 'source/slang/modifier-defs.h')
-rw-r--r--source/slang/modifier-defs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/modifier-defs.h b/source/slang/modifier-defs.h
index cd8f2524b..124dd2882 100644
--- a/source/slang/modifier-defs.h
+++ b/source/slang/modifier-defs.h
@@ -305,6 +305,16 @@ SYNTAX_CLASS(HLSLNumThreadsAttribute, HLSLAttribute)
FIELD(int32_t, z)
END_SYNTAX_CLASS()
+SYNTAX_CLASS(HLSLMaxVertexCountAttribute, HLSLAttribute)
+ // The number of max vertex count for geometry shader
+ FIELD(int32_t, value)
+END_SYNTAX_CLASS()
+
+SYNTAX_CLASS(HLSLInstanceAttribute, HLSLAttribute)
+ // The number of instances to run for geometry shader
+ FIELD(int32_t, value)
+END_SYNTAX_CLASS()
+
// HLSL modifiers for geometry shader input topology
SIMPLE_SYNTAX_CLASS(HLSLGeometryShaderInputPrimitiveTypeModifier, Modifier)
SIMPLE_SYNTAX_CLASS(HLSLPointModifier , HLSLGeometryShaderInputPrimitiveTypeModifier)