summaryrefslogtreecommitdiff
path: root/source/slang/modifier-defs.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-07-31 11:03:53 -0400
committerGitHub <noreply@github.com>2018-07-31 11:03:53 -0400
commit9914ca800c92e9b3fe768dec4e913a302f3d678d (patch)
tree49544fb2c0387f39876fd99e112cfc32ed05302d /source/slang/modifier-defs.h
parent171f524d7ca2922084a33f50c77a1e8797e80949 (diff)
Feature/attributed binding (#621)
* Typo fix, and added dxc to command line documentation. * Fix small typos. Added support for Scope to lexer. Fix bug in Token ctor. * Add support for attribute names that are scoped. * Added GLSLBindingAttribute. Make binding work through core.met.slang. * Allow [[gl::binding(binding, set)]] [[vk::binding(binding,set)]]
Diffstat (limited to 'source/slang/modifier-defs.h')
-rw-r--r--source/slang/modifier-defs.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/slang/modifier-defs.h b/source/slang/modifier-defs.h
index f0443c501..70c26568d 100644
--- a/source/slang/modifier-defs.h
+++ b/source/slang/modifier-defs.h
@@ -128,8 +128,6 @@ SIMPLE_SYNTAX_CLASS(GLSLUnparsedLayoutModifier , GLSLLayoutModifier)
// Specific cases for known GLSL `layout` modifiers that we need to work with
SIMPLE_SYNTAX_CLASS(GLSLConstantIDLayoutModifier , GLSLParsedLayoutModifier)
-SIMPLE_SYNTAX_CLASS(GLSLBindingLayoutModifier , GLSLParsedLayoutModifier)
-SIMPLE_SYNTAX_CLASS(GLSLSetLayoutModifier , GLSLParsedLayoutModifier)
SIMPLE_SYNTAX_CLASS(GLSLLocationLayoutModifier , GLSLParsedLayoutModifier)
SIMPLE_SYNTAX_CLASS(GLSLPushConstantLayoutModifier, GLSLParsedLayoutModifier)
@@ -330,6 +328,12 @@ SIMPLE_SYNTAX_CLASS(FlattenAttribute, Attribute) // `[flatten]`
SIMPLE_SYNTAX_CLASS(ForceCaseAttribute, Attribute) // `[forcecase]`
SIMPLE_SYNTAX_CLASS(CallAttribute, Attribute) // `[call]`
+// [[vk_binding]]
+SYNTAX_CLASS(GLSLBindingAttribute, Attribute)
+ FIELD(int32_t, binding = 0)
+ FIELD(int32_t, set = 0)
+END_SYNTAX_CLASS()
+
// TODO: for attributes that take arguments, the syntax node
// classes should provide accessors for the values of those arguments.