// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "Overload400-PrecQual.1545"
+#define GLSLANG_REVISION "Overload400-PrecQual.1546"
#define GLSLANG_DATE "01-Oct-2016"
#include "../../hlsl/hlslParseables.h"
#include "Scan.h"
#include "ScanContext.h"
+#include "../../hlsl/hlslScanContext.h"
#include "../Include/ShHandle.h"
#include "../../OGLCompilersDLL/InitializeDll.h"
PerProcessGPA = new TPoolAllocator();
glslang::TScanContext::fillInKeywordMap();
+ glslang::HlslScanContext::fillInKeywordMap();
return 1;
}
}
glslang::TScanContext::deleteKeywordMap();
+ glslang::HlslScanContext::deleteKeywordMap();
return 1;
}
currentScanner = &input;
ppContext.setInput(input, versionWillBeError);
- HlslScanContext::fillInKeywordMap(); // TODO: right place, and include the delete too
-
HlslScanContext scanContext(*this, ppContext);
HlslGrammar grammar(scanContext, *this);
if (!grammar.parse()) {
if (arraySizes)
blockType.newArraySizes(*arraySizes);
- //
- // Don't make a user-defined type out of block name; that will cause an error
- // if the same block name gets reused in a different interface.
- //
- // "Block names have no other use within a shader
- // beyond interface matching; it is a compile-time error to use a block name at global scope for anything
- // other than as a block name (e.g., use of a block name for a global variable name or function name is
- // currently reserved)."
- //
- // Use the symbol table to prevent normal reuse of the block's name, as a variable entry,
- // whose type is EbtBlock, but without all the structure; that will come from the type
- // the instances point to.
- //
- //??TType blockNameType(EbtBlock, blockType.getQualifier().storage);
- //??TVariable* blockNameVar = new TVariable(blockName, blockNameType);
- //if (! symbolTable.insert(*blockNameVar)) {
- // TSymbol* existingName = symbolTable.find(*blockName);
- // if (existingName->getType().getBasicType() == EbtBlock) {
- // if (existingName->getType().getQualifier().storage == blockType.getQualifier().storage) {
- // error(loc, "Cannot reuse block name within the same interface:", blockName->c_str(), blockType.getStorageQualifierString());
- // return;
- // }
- // } else {
- // error(loc, "block name cannot redefine a non-block name", blockName->c_str(), "");
- // return;
- // }
- //}
-
// Add the variable, as anonymous or named instanceName.
// Make an anonymous variable if no name was provided.
if (! instanceName)