summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 8a4ba55eb..1aa313fa8 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -3360,6 +3360,16 @@ static Decl* ParseBufferBlockDecl(
reflectionNameModifier->nameAndLoc = bufferVarDecl->nameAndLoc;
parser->ReadToken(TokenType::Semicolon);
}
+ else if (
+ parser->options.allowGLSLInput && parser->LookAheadToken(TokenType::Identifier) &&
+ parser->LookAheadToken(TokenType::LBracket, 1))
+ {
+ // GLSL bindless buffers are denoted with [] after the name.
+ bufferVarDecl->nameAndLoc = ParseDeclName(parser);
+ bufferVarDecl->type.exp = parseBracketTypeSuffix(parser, bufferVarDecl->type.exp);
+ reflectionNameModifier->nameAndLoc = bufferVarDecl->nameAndLoc;
+ parser->ReadToken(TokenType::Semicolon);
+ }
else
{
// Otherwise, we need to generate a name for the buffer variable.