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/check.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/check.cpp') diff --git a/source/slang/check.cpp b/source/slang/check.cpp index 1fa7f9b01..3c7bcaf84 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -1894,6 +1894,15 @@ namespace Slang numThreadsAttr->y = (int32_t) yVal->value; numThreadsAttr->z = (int32_t) zVal->value; } + else if (auto bindingAttr = attr.As()) + { + SLANG_ASSERT(attr->args.Count() == 2); + auto binding = checkConstantIntVal(attr->args[0]); + auto set = checkConstantIntVal(attr->args[1]); + + bindingAttr->binding = int32_t(binding->value); + bindingAttr->set = int32_t(set->value); + } else if (auto maxVertexCountAttr = attr.As()) { SLANG_ASSERT(attr->args.Count() == 1); -- cgit v1.2.3