From 9914ca800c92e9b3fe768dec4e913a302f3d678d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 31 Jul 2018 11:03:53 -0400 Subject: 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)]] --- source/slang/modifier-defs.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/slang/modifier-defs.h') 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. -- cgit v1.2.3