Merge pull request #8 from KhronosGroup/master

Merge code
This commit is contained in:
Roy.li 2020-01-21 11:22:30 +08:00 committed by GitHub
commit 48bc10b79f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 1102 additions and 593 deletions

View File

@ -17,6 +17,20 @@ branches:
only: only:
- master - master
# changes to these files don't need to trigger testing
skip_commits:
files:
- README.md
- README-spirv-remap.txt
- LICENSE.txt
- CODE_OF_CONDUCT.md
- BUILD.*
- WORKSPACE
- kokoro/*
- make-revision
- Android.mk
- _config.yml
# Travis advances the master-tot tag to current top of the tree after # Travis advances the master-tot tag to current top of the tree after
# each push into the master branch, because it relies on that tag to # each push into the master branch, because it relies on that tag to
# upload build artifacts to the master-tot release. This will cause # upload build artifacts to the master-tot release. This will cause

View File

@ -35,7 +35,7 @@ Deprecations
`${CMAKE_INSTALL_INCLUDEDIR}`. This `SPIRV` folder is being moved to `${CMAKE_INSTALL_INCLUDEDIR}`. This `SPIRV` folder is being moved to
`glslang/SPIRV`. During the transition the `SPIRV` folder will be installed into `glslang/SPIRV`. During the transition the `SPIRV` folder will be installed into
both locations. The old install of `SPIRV/` will be removed as a CMake install both locations. The old install of `SPIRV/` will be removed as a CMake install
target no sooner then May 1, 2020. See issue #1964. target no sooner than May 1, 2020. See issue #1964.
Execution of Standalone Wrapper Execution of Standalone Wrapper
------------------------------- -------------------------------
@ -185,7 +185,7 @@ Use the steps in [Build Steps](#build-steps), with the following notes/exception
+ turn on `-DENABLE_GLSLANG_WEB=ON` + turn on `-DENABLE_GLSLANG_WEB=ON`
+ optionally, for GLSL compilation error messages, turn on `-DENABLE_GLSLANG_WEB_DEVEL=ON` + optionally, for GLSL compilation error messages, turn on `-DENABLE_GLSLANG_WEB_DEVEL=ON`
* `emsdk` needs to be present in your executable search path, *PATH* for * `emsdk` needs to be present in your executable search path, *PATH* for
Bash-like enivironments Bash-like environments
+ [Instructions located + [Instructions located
here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install) here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
* Wrap cmake call: `emcmake cmake` * Wrap cmake call: `emcmake cmake`
@ -309,7 +309,7 @@ class TProgram
Reflection queries Reflection queries
``` ```
For just validating (not generating code), subsitute these calls: For just validating (not generating code), substitute these calls:
```cxx ```cxx
setEnvInput(EShSourceHlsl or EShSourceGlsl, stage, EShClientNone, 0); setEnvInput(EShSourceHlsl or EShSourceGlsl, stage, EShClientNone, 0);
@ -327,7 +327,7 @@ This interface is in roughly the first 2/3 of `ShaderLang.h`, and referred to
as the `Sh*()` interface, as all the entry points start `Sh`. as the `Sh*()` interface, as all the entry points start `Sh`.
The `Sh*()` interface takes a "compiler" call-back object, which it calls after The `Sh*()` interface takes a "compiler" call-back object, which it calls after
building call back that is passed the AST and can then execute a backend on it. building call back that is passed the AST and can then execute a back end on it.
The following is a simplified resulting run-time call stack: The following is a simplified resulting run-time call stack:
@ -354,7 +354,7 @@ Basic Internal Operation
* The intermediate representation is very high-level, and represented * The intermediate representation is very high-level, and represented
as an in-memory tree. This serves to lose no information from the as an in-memory tree. This serves to lose no information from the
original program, and to have efficient transfer of the result from original program, and to have efficient transfer of the result from
parsing to the back-end. In the AST, constants are propogated and parsing to the back-end. In the AST, constants are propagated and
folded, and a very small amount of dead code is eliminated. folded, and a very small amount of dead code is eliminated.
To aid linking and reflection, the last top-level branch in the AST To aid linking and reflection, the last top-level branch in the AST

View File

@ -245,7 +245,9 @@ protected:
std::unordered_map<std::string, spv::Function*> functionMap; std::unordered_map<std::string, spv::Function*> functionMap;
std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount]; std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount];
// for mapping glslang block indices to spv indices (e.g., due to hidden members): // for mapping glslang block indices to spv indices (e.g., due to hidden members):
std::unordered_map<const glslang::TTypeList*, std::vector<int> > memberRemapper; std::unordered_map<int, std::vector<int>> memberRemapper;
// for mapping glslang symbol struct to symbol Id
std::unordered_map<const glslang::TTypeList*, int> glslangTypeToIdMap;
std::stack<bool> breakForLoop; // false means break for switch std::stack<bool> breakForLoop; // false means break for switch
std::unordered_map<std::string, const glslang::TIntermSymbol*> counterOriginator; std::unordered_map<std::string, const glslang::TIntermSymbol*> counterOriginator;
// Map pointee types for EbtReference to their forward pointers // Map pointee types for EbtReference to their forward pointers
@ -1661,6 +1663,9 @@ void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
{ {
SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
if (symbol->getType().isStruct())
glslangTypeToIdMap[symbol->getType().getStruct()] = symbol->getId();
if (symbol->getType().getQualifier().isSpecConstant()) if (symbol->getType().getQualifier().isSpecConstant())
spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
@ -1753,6 +1758,12 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node) bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node)
{ {
builder.setLine(node->getLoc().line, node->getLoc().getFilename()); builder.setLine(node->getLoc().line, node->getLoc().getFilename());
if (node->getLeft()->getAsSymbolNode() != nullptr && node->getLeft()->getType().isStruct()) {
glslangTypeToIdMap[node->getLeft()->getType().getStruct()] = node->getLeft()->getAsSymbolNode()->getId();
}
if (node->getRight()->getAsSymbolNode() != nullptr && node->getRight()->getType().isStruct()) {
glslangTypeToIdMap[node->getRight()->getType().getStruct()] = node->getRight()->getAsSymbolNode()->getId();
}
SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
if (node->getType().getQualifier().isSpecConstant()) if (node->getType().getQualifier().isSpecConstant())
@ -1857,10 +1868,13 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
{ {
// This may be, e.g., an anonymous block-member selection, which generally need // This may be, e.g., an anonymous block-member selection, which generally need
// index remapping due to hidden members in anonymous blocks. // index remapping due to hidden members in anonymous blocks.
std::vector<int>& remapper = memberRemapper[node->getLeft()->getType().getStruct()]; int glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()];
if (memberRemapper.find(glslangId) != memberRemapper.end()) {
std::vector<int>& remapper = memberRemapper[glslangId];
assert(remapper.size() > 0); assert(remapper.size() > 0);
spvIndex = remapper[glslangIndex]; spvIndex = remapper[glslangIndex];
} }
}
// normal case for indexing array or structure or block // normal case for indexing array or structure or block
builder.accessChainPush(builder.makeIntConstant(spvIndex), TranslateCoherent(node->getLeft()->getType()), node->getLeft()->getType().getBufferReferenceAlignment()); builder.accessChainPush(builder.makeIntConstant(spvIndex), TranslateCoherent(node->getLeft()->getType()), node->getLeft()->getType().getBufferReferenceAlignment());
@ -3483,7 +3497,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
// else, we haven't seen it... // else, we haven't seen it...
if (type.getBasicType() == glslang::EbtBlock) if (type.getBasicType() == glslang::EbtBlock)
memberRemapper[glslangMembers].resize(glslangMembers->size()); memberRemapper[glslangTypeToIdMap[glslangMembers]].resize(glslangMembers->size());
spvType = convertGlslangStructToSpvType(type, glslangMembers, explicitLayout, qualifier); spvType = convertGlslangStructToSpvType(type, glslangMembers, explicitLayout, qualifier);
} }
break; break;
@ -3619,15 +3633,15 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy
if (glslangMember.hiddenMember()) { if (glslangMember.hiddenMember()) {
++memberDelta; ++memberDelta;
if (type.getBasicType() == glslang::EbtBlock) if (type.getBasicType() == glslang::EbtBlock)
memberRemapper[glslangMembers][i] = -1; memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1;
} else { } else {
if (type.getBasicType() == glslang::EbtBlock) { if (type.getBasicType() == glslang::EbtBlock) {
if (filterMember(glslangMember)) { if (filterMember(glslangMember)) {
memberDelta++; memberDelta++;
memberRemapper[glslangMembers][i] = -1; memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1;
continue; continue;
} }
memberRemapper[glslangMembers][i] = i - memberDelta; memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = i - memberDelta;
} }
// modify just this child's view of the qualifier // modify just this child's view of the qualifier
glslang::TQualifier memberQualifier = glslangMember.getQualifier(); glslang::TQualifier memberQualifier = glslangMember.getQualifier();
@ -3685,7 +3699,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
glslang::TType& glslangMember = *(*glslangMembers)[i].type; glslang::TType& glslangMember = *(*glslangMembers)[i].type;
int member = i; int member = i;
if (type.getBasicType() == glslang::EbtBlock) { if (type.getBasicType() == glslang::EbtBlock) {
member = memberRemapper[glslangMembers][i]; member = memberRemapper[glslangTypeToIdMap[glslangMembers]][i];
if (filterMember(glslangMember)) if (filterMember(glslangMember))
continue; continue;
} }
@ -7482,7 +7496,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
id = builder.createCompositeExtract(mulOp, typeId, 0); id = builder.createCompositeExtract(mulOp, typeId, 0);
for (int i = 1; i < componentCount; ++i) { for (int i = 1; i < componentCount; ++i) {
builder.setPrecision(id, precision); builder.setPrecision(id, precision);
id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(operands[0], typeId, i)); id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(mulOp, typeId, i));
} }
} else { } else {
switch (consumedOperands) { switch (consumedOperands) {

View File

@ -67,6 +67,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
logger->missingFunctionality("Target version for SPIRV-Tools validator"); logger->missingFunctionality("Target version for SPIRV-Tools validator");
return spv_target_env::SPV_ENV_VULKAN_1_1; return spv_target_env::SPV_ENV_VULKAN_1_1;
} }
case glslang::EShTargetVulkan_1_2:
return spv_target_env::SPV_ENV_VULKAN_1_2;
default: default:
break; break;
} }

View File

@ -204,7 +204,7 @@ public:
text.append("#define "); text.append("#define ");
fixLine(def); fixLine(def);
Processes.push_back("D"); Processes.push_back("define-macro ");
Processes.back().append(def); Processes.back().append(def);
// The first "=" needs to turn into a space // The first "=" needs to turn into a space
@ -222,7 +222,7 @@ public:
text.append("#undef "); text.append("#undef ");
fixLine(undef); fixLine(undef);
Processes.push_back("U"); Processes.push_back("undef-macro ");
Processes.back().append(undef); Processes.back().append(undef);
text.append(undef); text.append(undef);
@ -292,9 +292,12 @@ bool SetConfigFile(const std::string& name)
// //
// Give error and exit with failure code. // Give error and exit with failure code.
// //
void Error(const char* message) void Error(const char* message, const char* detail = nullptr)
{ {
fprintf(stderr, "%s: Error %s (use -h for usage)\n", ExecutableName, message); fprintf(stderr, "%s: Error: ", ExecutableName);
if (detail != nullptr)
fprintf(stderr, "%s: ", detail);
fprintf(stderr, "%s (use -h for usage)\n", message);
exit(EFailUsage); exit(EFailUsage);
} }
@ -482,7 +485,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
Options |= EOptionAutoMapLocations; Options |= EOptionAutoMapLocations;
} else if (lowerword == "uniform-base") { } else if (lowerword == "uniform-base") {
if (argc <= 1) if (argc <= 1)
Error("no <base> provided for --uniform-base"); Error("no <base> provided", lowerword.c_str());
uniformBase = ::strtol(argv[1], NULL, 10); uniformBase = ::strtol(argv[1], NULL, 10);
bumpArg(); bumpArg();
break; break;
@ -493,15 +496,23 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
else if (strcmp(argv[1], "opengl100") == 0) else if (strcmp(argv[1], "opengl100") == 0)
setOpenGlSpv(); setOpenGlSpv();
else else
Error("--client expects vulkan100 or opengl100"); Error("expects vulkan100 or opengl100", lowerword.c_str());
} } else
Error("expects vulkan100 or opengl100", lowerword.c_str());
bumpArg();
} else if (lowerword == "define-macro" ||
lowerword == "d") {
if (argc > 1)
UserPreamble.addDef(argv[1]);
else
Error("expects <name[=def]>", argv[0]);
bumpArg(); bumpArg();
} else if (lowerword == "dump-builtin-symbols") { } else if (lowerword == "dump-builtin-symbols") {
DumpBuiltinSymbols = true; DumpBuiltinSymbols = true;
} else if (lowerword == "entry-point") { } else if (lowerword == "entry-point") {
entryPointName = argv[1]; entryPointName = argv[1];
if (argc <= 1) if (argc <= 1)
Error("no <name> provided for --entry-point"); Error("no <name> provided", lowerword.c_str());
bumpArg(); bumpArg();
} else if (lowerword == "flatten-uniform-arrays" || // synonyms } else if (lowerword == "flatten-uniform-arrays" || // synonyms
lowerword == "flatten-uniform-array" || lowerword == "flatten-uniform-array" ||
@ -576,7 +587,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
} else if (lowerword == "source-entrypoint" || // synonyms } else if (lowerword == "source-entrypoint" || // synonyms
lowerword == "sep") { lowerword == "sep") {
if (argc <= 1) if (argc <= 1)
Error("no <entry-point> provided for --source-entrypoint"); Error("no <entry-point> provided", lowerword.c_str());
sourceEntryPointName = argv[1]; sourceEntryPointName = argv[1];
bumpArg(); bumpArg();
break; break;
@ -597,6 +608,9 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
} else if (strcmp(argv[1], "vulkan1.1") == 0) { } else if (strcmp(argv[1], "vulkan1.1") == 0) {
setVulkanSpv(); setVulkanSpv();
ClientVersion = glslang::EShTargetVulkan_1_1; ClientVersion = glslang::EShTargetVulkan_1_1;
} else if (strcmp(argv[1], "vulkan1.2") == 0) {
setVulkanSpv();
ClientVersion = glslang::EShTargetVulkan_1_2;
} else if (strcmp(argv[1], "opengl") == 0) { } else if (strcmp(argv[1], "opengl") == 0) {
setOpenGlSpv(); setOpenGlSpv();
ClientVersion = glslang::EShTargetOpenGL_450; ClientVersion = glslang::EShTargetOpenGL_450;
@ -619,22 +633,29 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
TargetLanguage = glslang::EShTargetSpv; TargetLanguage = glslang::EShTargetSpv;
TargetVersion = glslang::EShTargetSpv_1_5; TargetVersion = glslang::EShTargetSpv_1_5;
} else } else
Error("--target-env expected one of: vulkan1.0, vulkan1.1, opengl,\n" Error("--target-env expected one of: vulkan1.0, vulkan1.1, vulkan1.2, opengl,\n"
"spirv1.0, spirv1.1, spirv1.2, spirv1.3, spirv1.4, or spirv1.5"); "spirv1.0, spirv1.1, spirv1.2, spirv1.3, spirv1.4, or spirv1.5");
} }
bumpArg(); bumpArg();
} else if (lowerword == "undef-macro" ||
lowerword == "u") {
if (argc > 1)
UserPreamble.addUndef(argv[1]);
else
Error("expects <name>", argv[0]);
bumpArg();
} else if (lowerword == "variable-name" || // synonyms } else if (lowerword == "variable-name" || // synonyms
lowerword == "vn") { lowerword == "vn") {
Options |= EOptionOutputHexadecimal; Options |= EOptionOutputHexadecimal;
if (argc <= 1) if (argc <= 1)
Error("no <C-variable-name> provided for --variable-name"); Error("no <C-variable-name> provided", lowerword.c_str());
variableName = argv[1]; variableName = argv[1];
bumpArg(); bumpArg();
break; break;
} else if (lowerword == "version") { } else if (lowerword == "version") {
Options |= EOptionDumpVersions; Options |= EOptionDumpVersions;
} else { } else {
usage(); Error("unrecognized command-line option", argv[0]);
} }
} }
break; break;
@ -645,7 +666,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
if (argv[0][2] == 0) if (argv[0][2] == 0)
Options |= EOptionReadHlsl; Options |= EOptionReadHlsl;
else else
UserPreamble.addDef(getStringOperand("-D<macro> macro name")); UserPreamble.addDef(getStringOperand("-D<name[=def]>"));
break; break;
case 'u': case 'u':
uniformLocationOverrides.push_back(getUniformOverride()); uniformLocationOverrides.push_back(getUniformOverride());
@ -688,7 +709,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
bumpArg(); bumpArg();
break; break;
case 'U': case 'U':
UserPreamble.addUndef(getStringOperand("-U<macro>: macro name")); UserPreamble.addUndef(getStringOperand("-U<name>"));
break; break;
case 'V': case 'V':
setVulkanSpv(); setVulkanSpv();
@ -760,7 +781,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
Options |= EOptionOutputHexadecimal; Options |= EOptionOutputHexadecimal;
break; break;
default: default:
usage(); Error("unrecognized command-line option", argv[0]);
break; break;
} }
} else { } else {
@ -807,6 +828,10 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
TargetLanguage = glslang::EShTargetSpv; TargetLanguage = glslang::EShTargetSpv;
TargetVersion = glslang::EShTargetSpv_1_3; TargetVersion = glslang::EShTargetSpv_1_3;
break; break;
case glslang::EShTargetVulkan_1_2:
TargetLanguage = glslang::EShTargetSpv;
TargetVersion = glslang::EShTargetSpv_1_5;
break;
case glslang::EShTargetOpenGL_450: case glslang::EShTargetOpenGL_450:
TargetLanguage = glslang::EShTargetSpv; TargetLanguage = glslang::EShTargetSpv;
TargetVersion = glslang::EShTargetSpv_1_0; TargetVersion = glslang::EShTargetSpv_1_0;
@ -1263,7 +1288,7 @@ int singleMain()
ProcessConfigFile(); ProcessConfigFile();
if ((Options & EOptionReadHlsl) && !((Options & EOptionOutputPreprocessed) || (Options & EOptionSpv))) if ((Options & EOptionReadHlsl) && !((Options & EOptionOutputPreprocessed) || (Options & EOptionSpv)))
Error("ERROR: HLSL requires SPIR-V code generation (or preprocessing only)"); Error("HLSL requires SPIR-V code generation (or preprocessing only)");
// //
// Two modes: // Two modes:
@ -1498,8 +1523,8 @@ void usage()
"Options:\n" "Options:\n"
" -C cascading errors; risk crash from accumulation of error recoveries\n" " -C cascading errors; risk crash from accumulation of error recoveries\n"
" -D input is HLSL (this is the default when any suffix is .hlsl)\n" " -D input is HLSL (this is the default when any suffix is .hlsl)\n"
" -D<macro=def>\n" " -D<name[=def]> | --define-macro <name[=def]> | --D <name[=def]>\n"
" -D<macro> define a pre-processor macro\n" " define a pre-processor macro\n"
" -E print pre-processed GLSL; cannot be used with -l;\n" " -E print pre-processed GLSL; cannot be used with -l;\n"
" errors will appear on stderr\n" " errors will appear on stderr\n"
" -G[ver] create SPIR-V binary, under OpenGL semantics; turns on -l;\n" " -G[ver] create SPIR-V binary, under OpenGL semantics; turns on -l;\n"
@ -1515,7 +1540,8 @@ void usage()
" -Os optimizes SPIR-V to minimize size\n" " -Os optimizes SPIR-V to minimize size\n"
" -S <stage> uses specified stage rather than parsing the file extension\n" " -S <stage> uses specified stage rather than parsing the file extension\n"
" choices for <stage> are vert, tesc, tese, geom, frag, or comp\n" " choices for <stage> are vert, tesc, tese, geom, frag, or comp\n"
" -U<macro> undefine a pre-processor macro\n" " -U<name> | --undef-macro <name> | --U <name>\n"
" undefine a pre-processor macro\n"
" -V[ver] create SPIR-V binary, under Vulkan semantics; turns on -l;\n" " -V[ver] create SPIR-V binary, under Vulkan semantics; turns on -l;\n"
" default file name is <stage>.spv (-o overrides this)\n" " default file name is <stage>.spv (-o overrides this)\n"
" 'ver', when present, is the version of the input semantics,\n" " 'ver', when present, is the version of the input semantics,\n"
@ -1621,16 +1647,17 @@ void usage()
" --sep synonym for --source-entrypoint\n" " --sep synonym for --source-entrypoint\n"
" --stdin read from stdin instead of from a file;\n" " --stdin read from stdin instead of from a file;\n"
" requires providing the shader stage using -S\n" " requires providing the shader stage using -S\n"
" --target-env {vulkan1.0 | vulkan1.1 | opengl | \n" " --target-env {vulkan1.0 | vulkan1.1 | vulkan1.2 | opengl | \n"
" spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3 | spirv1.4 | spirv1.5}\n" " spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3 | spirv1.4 | spirv1.5}\n"
" set execution environment that emitted code\n" " Set the execution environment that the\n"
" will execute in (versus source language\n" " generated code will be executed in.\n"
" semantics selected by --client) defaults:\n" " Defaults to:\n"
" * 'vulkan1.0' under '--client vulkan<ver>'\n" " * vulkan1.0 under --client vulkan<ver>\n"
" * 'opengl' under '--client opengl<ver>'\n" " * opengl under --client opengl<ver>\n"
" * 'spirv1.0' under --target-env vulkan1.0\n" " * spirv1.0 under --target-env vulkan1.0\n"
" * 'spirv1.3' under --target-env vulkan1.1\n" " * spirv1.3 under --target-env vulkan1.1\n"
" multiple --targen-env can be specified.\n" " * spirv1.5 under --target-env vulkan1.2\n"
" Multiple --target-env can be specified.\n"
" --variable-name <name>\n" " --variable-name <name>\n"
" --vn <name> creates a C header file that contains a\n" " --vn <name> creates a C header file that contains a\n"
" uint32_t array named <name>\n" " uint32_t array named <name>\n"

View File

@ -201,3 +201,15 @@ int mac;
#define macr(A,B) A ## B #define macr(A,B) A ## B
int macr(qrs,tuv); int macr(qrs,tuv);
layout(std140) uniform BlockName // ERROR
{
int test;
};
#extension GL_ARB_uniform_buffer_object : enable
layout(std140) uniform BlockName
{
int test;
};

View File

@ -62,12 +62,14 @@ void bar2()
b3 < b3; // ERROR b3 < b3; // ERROR
uv3 > uv3; // ERROR uv3 > uv3; // ERROR
uvec2(2, 3) >= uvec2(3,3); // ERROR uvec2(2, 3) >= uvec2(3,3); // ERROR
int samples = gl_NumSamples; // ERROR
int(bl4) <= int(bl4); // true int(bl4) <= int(bl4); // true
int(bl4.x) > int(bl4.y); // false int(bl4.x) > int(bl4.y); // false
} }
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_texture_rectangle : enable #extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_sample_shading : enable
uniform sampler2D samp2D; uniform sampler2D samp2D;
uniform sampler2DShadow samp2DS; uniform sampler2DShadow samp2DS;
@ -83,6 +85,7 @@ void bar23()
s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1)); s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1)); // ERROR s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1)); // ERROR
s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2); // ERROR s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2); // ERROR
int samples = gl_NumSamples;
} }
#extension GL_ARB_gpu_shader5 : enable #extension GL_ARB_gpu_shader5 : enable

View File

@ -17,6 +17,7 @@ void main()
#error GL_ES is not set #error GL_ES is not set
#endif #endif
in struct S { float f; } s; // ERROR in struct S { float f; } s; // ERROR
float patch = 3.1; float patch = 3.1;
@ -51,3 +52,9 @@ float fooi()
{ {
return i1 + i2; return i1 + i2;
} }
uniform sampler2DMS aaa1; // ERROR
#extension GL_ARB_texture_multisample : enable
uniform sampler2DMS aaa2;

View File

@ -49,3 +49,12 @@ int primitiveID()
return gl_PrimitiveID; return gl_PrimitiveID;
gl_PerFragment; // ERROR, block name can't get reused gl_PerFragment; // ERROR, block name can't get reused
} }
in double type1; // ERROR
#extension GL_ARB_gpu_shader_fp64 : enable
double type2;
double type3 = 2.0;
int absTest = sqrt(type3);
double absTest2 = sqrt(type3);
double absTest3 = sqrt(2);
float dk = sqrt(11);

View File

@ -6,4 +6,5 @@ in dmat4 dm4;
void main() void main()
{ {
int test = gl_MaxFragmentUniformVectors;
} }

View File

@ -1,5 +1,8 @@
#version 450 core #version 450 core
layout(local_size_x = 0) in; // ERROR, 0 not allowed layout(local_size_x = 0) in; // ERROR, 0 not allowed
layout(binding=10000) uniform atomic_uint; // ERROR
void main() void main()
{ {
shared float f; // ERROR shared must be global shared float f; // ERROR shared must be global

View File

@ -1,6 +1,7 @@
#version 420 core #version 420 core
layout(binding = 0) uniform atomic_uint counter; layout(binding = 0) uniform atomic_uint counter;
layout(binding = 0, offset = 9) uniform atomic_uint counter;
uint func(atomic_uint c) uint func(atomic_uint c)
{ {
@ -41,7 +42,7 @@ uniform atomic_uint aNoBind; // ERROR, no binding
layout(binding=0, offset=32) uniform atomic_uint aOffset; layout(binding=0, offset=32) uniform atomic_uint aOffset;
layout(binding=0, offset=4) uniform atomic_uint; layout(binding=0, offset=4) uniform atomic_uint;
layout(binding=0) uniform atomic_uint bar3; // offset is 4 layout(binding=0) uniform atomic_uint bar3; // offset is 4
layout(binding=0) uniform atomic_uint ac[3]; // offset = 8 layout(binding=0) uniform atomic_uint ac[2]; // offset = 8
layout(binding=0) uniform atomic_uint ad; // offset = 20 layout(binding=0) uniform atomic_uint ad; // offset = 20
layout(offset=8) uniform atomic_uint bar4; // ERROR, no binding layout(offset=8) uniform atomic_uint bar4; // ERROR, no binding
layout(binding = 0, offset = 12) uniform atomic_uint overlap; // ERROR, overlapping offsets layout(binding = 0, offset = 12) uniform atomic_uint overlap; // ERROR, overlapping offsets

View File

@ -79,7 +79,8 @@ ERROR: 0:192: 'assign' : l-value required (can't modify a const)
ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserved ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserved
ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 80 compilation errors. No code generated. ERROR: 0:205: '' : syntax error, unexpected IDENTIFIER
ERROR: 81 compilation errors. No code generated.
Shader version: 120 Shader version: 120

View File

@ -7,36 +7,38 @@ WARNING: 0:45: extension GL_ARB_texture_gather is being used for textureGather(.
ERROR: 0:62: '<' : wrong operand types: no operation '<' exists that takes a left-hand operand of type ' temp 3-component vector of bool' and a right operand of type ' temp 3-component vector of bool' (or there is no acceptable conversion) ERROR: 0:62: '<' : wrong operand types: no operation '<' exists that takes a left-hand operand of type ' temp 3-component vector of bool' and a right operand of type ' temp 3-component vector of bool' (or there is no acceptable conversion)
ERROR: 0:63: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type ' temp 3-component vector of uint' and a right operand of type ' temp 3-component vector of uint' (or there is no acceptable conversion) ERROR: 0:63: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type ' temp 3-component vector of uint' and a right operand of type ' temp 3-component vector of uint' (or there is no acceptable conversion)
ERROR: 0:64: '>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type ' const 2-component vector of uint' and a right operand of type ' const 2-component vector of uint' (or there is no acceptable conversion) ERROR: 0:64: '>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type ' const 2-component vector of uint' and a right operand of type ' const 2-component vector of uint' (or there is no acceptable conversion)
ERROR: 0:80: 'textureGatherOffset' : no matching overloaded function found ERROR: 0:65: 'gl_NumSamples' : required extension not requested: GL_ARB_sample_shading
ERROR: 0:80: 'assign' : cannot convert from ' const float' to ' temp 4-component vector of float' ERROR: 0:82: 'textureGatherOffset' : no matching overloaded function found
ERROR: 0:81: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions ERROR: 0:82: 'assign' : cannot convert from ' const float' to ' temp 4-component vector of float'
ERROR: 0:84: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions ERROR: 0:83: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
ERROR: 0:85: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions ERROR: 0:86: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
WARNING: 0:88: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 ERROR: 0:87: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
ERROR: 0:120: 'line continuation' : not supported for this version or the enabled extensions WARNING: 0:91: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5
ERROR: 0:126: 'uniform block' : not supported for this version or the enabled extensions ERROR: 0:123: 'line continuation' : not supported for this version or the enabled extensions
ERROR: 0:140: 'length' : does not operate on this type: temp bool ERROR: 0:129: 'uniform block' : not supported for this version or the enabled extensions
ERROR: 0:140: 'boolb' : can't use function syntax on variable ERROR: 0:143: 'length' : does not operate on this type: temp bool
ERROR: 0:141: 'length' : does not operate on this type: temp float ERROR: 0:143: 'boolb' : can't use function syntax on variable
ERROR: 0:141: '' : function call, method, or subroutine call expected ERROR: 0:144: 'length' : does not operate on this type: temp float
ERROR: 0:141: '' : no matching overloaded function found ERROR: 0:144: '' : function call, method, or subroutine call expected
ERROR: 0:142: 'length' : incomplete method syntax ERROR: 0:144: '' : no matching overloaded function found
ERROR: 0:143: 'length' : method does not accept any arguments ERROR: 0:145: 'length' : incomplete method syntax
ERROR: 0:146: 'gl_FogFragCoord' : identifiers starting with "gl_" are reserved ERROR: 0:146: 'length' : method does not accept any arguments
ERROR: 0:151: 'int' : must be qualified as flat in ERROR: 0:149: 'gl_FogFragCoord' : identifiers starting with "gl_" are reserved
ERROR: 0:151: 'redeclaration' : cannot change the type of gl_FogFragCoord ERROR: 0:154: 'int' : must be qualified as flat in
ERROR: 0:153: 'early_fragment_tests' : not supported for this version or the enabled extensions ERROR: 0:154: 'redeclaration' : cannot change the type of gl_FogFragCoord
ERROR: 0:154: 'image load store' : not supported for this version or the enabled extensions ERROR: 0:156: 'early_fragment_tests' : not supported for this version or the enabled extensions
ERROR: 0:154: 'iimage2D' : Reserved word. ERROR: 0:157: 'image load store' : not supported for this version or the enabled extensions
ERROR: 0:169: 'early_fragment_tests' : can only apply to 'in' ERROR: 0:157: 'iimage2D' : Reserved word.
ERROR: 0:173: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions ERROR: 0:172: 'early_fragment_tests' : can only apply to 'in'
ERROR: 29 compilation errors. No code generated. ERROR: 0:176: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 30 compilation errors. No code generated.
Shader version: 130 Shader version: 130
Requested GL_ARB_explicit_attrib_location Requested GL_ARB_explicit_attrib_location
Requested GL_ARB_explicit_uniform_location Requested GL_ARB_explicit_uniform_location
Requested GL_ARB_gpu_shader5 Requested GL_ARB_gpu_shader5
Requested GL_ARB_sample_shading
Requested GL_ARB_separate_shader_objects Requested GL_ARB_separate_shader_objects
Requested GL_ARB_shader_image_load_store Requested GL_ARB_shader_image_load_store
Requested GL_ARB_shading_language_420pack Requested GL_ARB_shading_language_420pack
@ -122,259 +124,267 @@ ERROR: node is still EOpNull!
0:63 false (const bool) 0:63 false (const bool)
0:64 Constant: 0:64 Constant:
0:64 false (const bool) 0:64 false (const bool)
0:65 Constant: 0:65 Sequence
0:65 true (const bool) 0:65 move second child to first child ( temp int)
0:65 'samples' ( temp int)
0:65 'gl_NumSamples' ( uniform int SampleMaskIn)
0:66 Constant: 0:66 Constant:
0:66 false (const bool) 0:66 true (const bool)
0:77 Function Definition: bar23( ( global void) 0:67 Constant:
0:77 Function Parameters: 0:67 false (const bool)
0:79 Function Definition: bar23( ( global void)
0:79 Function Parameters:
0:? Sequence 0:? Sequence
0:80 's' ( temp 4-component vector of float)
0:81 move second child to first child ( temp 4-component vector of float)
0:81 's' ( temp 4-component vector of float)
0:81 textureGatherOffset ( global 4-component vector of float)
0:81 'samp2DR' ( uniform sampler2DRect)
0:81 Constant:
0:81 0.300000
0:81 0.300000
0:81 Constant:
0:81 1 (const int)
0:81 1 (const int)
0:82 move second child to first child ( temp 4-component vector of float)
0:82 's' ( temp 4-component vector of float) 0:82 's' ( temp 4-component vector of float)
0:82 textureGatherOffset ( global 4-component vector of float)
0:82 'samp2D' ( uniform sampler2D)
0:82 Constant:
0:82 0.300000
0:82 0.300000
0:82 Constant:
0:82 1 (const int)
0:82 1 (const int)
0:83 move second child to first child ( temp 4-component vector of float) 0:83 move second child to first child ( temp 4-component vector of float)
0:83 's' ( temp 4-component vector of float) 0:83 's' ( temp 4-component vector of float)
0:83 textureGatherOffset ( global 4-component vector of float) 0:83 textureGatherOffset ( global 4-component vector of float)
0:83 'samp2DA' ( uniform sampler2DArray) 0:83 'samp2DR' ( uniform sampler2DRect)
0:83 Constant: 0:83 Constant:
0:83 0.300000 0:83 0.300000
0:83 0.300000 0:83 0.300000
0:83 0.300000
0:83 Constant: 0:83 Constant:
0:83 1 (const int) 0:83 1 (const int)
0:83 1 (const int) 0:83 1 (const int)
0:84 move second child to first child ( temp 4-component vector of float) 0:84 move second child to first child ( temp 4-component vector of float)
0:84 's' ( temp 4-component vector of float) 0:84 's' ( temp 4-component vector of float)
0:84 textureGatherOffset ( global 4-component vector of float) 0:84 textureGatherOffset ( global 4-component vector of float)
0:84 'samp2DS' ( uniform sampler2DShadow) 0:84 'samp2D' ( uniform sampler2D)
0:84 Constant: 0:84 Constant:
0:84 0.300000 0:84 0.300000
0:84 0.300000 0:84 0.300000
0:84 Constant: 0:84 Constant:
0:84 1.300000
0:84 Constant:
0:84 1 (const int) 0:84 1 (const int)
0:84 1 (const int) 0:84 1 (const int)
0:85 move second child to first child ( temp 4-component vector of float) 0:85 move second child to first child ( temp 4-component vector of float)
0:85 's' ( temp 4-component vector of float) 0:85 's' ( temp 4-component vector of float)
0:85 textureGatherOffset ( global 4-component vector of float) 0:85 textureGatherOffset ( global 4-component vector of float)
0:85 'samp2D' ( uniform sampler2D) 0:85 'samp2DA' ( uniform sampler2DArray)
0:85 Constant: 0:85 Constant:
0:85 0.300000 0:85 0.300000
0:85 0.300000 0:85 0.300000
0:85 0.300000
0:85 Constant: 0:85 Constant:
0:85 1 (const int) 0:85 1 (const int)
0:85 1 (const int) 0:85 1 (const int)
0:85 Constant: 0:86 move second child to first child ( temp 4-component vector of float)
0:85 2 (const int) 0:86 's' ( temp 4-component vector of float)
0:90 Function Definition: bar234( ( global void) 0:86 textureGatherOffset ( global 4-component vector of float)
0:90 Function Parameters: 0:86 'samp2DS' ( uniform sampler2DShadow)
0:86 Constant:
0:86 0.300000
0:86 0.300000
0:86 Constant:
0:86 1.300000
0:86 Constant:
0:86 1 (const int)
0:86 1 (const int)
0:87 move second child to first child ( temp 4-component vector of float)
0:87 's' ( temp 4-component vector of float)
0:87 textureGatherOffset ( global 4-component vector of float)
0:87 'samp2D' ( uniform sampler2D)
0:87 Constant:
0:87 0.300000
0:87 0.300000
0:87 Constant:
0:87 1 (const int)
0:87 1 (const int)
0:87 Constant:
0:87 2 (const int)
0:88 Sequence
0:88 move second child to first child ( temp int)
0:88 'samples' ( temp int)
0:88 'gl_NumSamples' ( uniform int SampleMaskIn)
0:93 Function Definition: bar234( ( global void)
0:93 Function Parameters:
0:? Sequence 0:? Sequence
0:93 move second child to first child ( temp 4-component vector of float)
0:93 's' ( temp 4-component vector of float)
0:93 textureGatherOffset ( global 4-component vector of float)
0:93 'samp2D' ( uniform sampler2D)
0:93 Constant:
0:93 0.300000
0:93 0.300000
0:93 Constant:
0:93 1 (const int)
0:93 1 (const int)
0:94 move second child to first child ( temp 4-component vector of float)
0:94 's' ( temp 4-component vector of float)
0:94 textureGatherOffset ( global 4-component vector of float)
0:94 'samp2DA' ( uniform sampler2DArray)
0:94 Constant:
0:94 0.300000
0:94 0.300000
0:94 0.300000
0:94 Constant:
0:94 1 (const int)
0:94 1 (const int)
0:95 move second child to first child ( temp 4-component vector of float)
0:95 's' ( temp 4-component vector of float)
0:95 textureGatherOffset ( global 4-component vector of float)
0:95 'samp2DR' ( uniform sampler2DRect)
0:95 Constant:
0:95 0.300000
0:95 0.300000
0:95 Constant:
0:95 1 (const int)
0:95 1 (const int)
0:96 move second child to first child ( temp 4-component vector of float) 0:96 move second child to first child ( temp 4-component vector of float)
0:96 's' ( temp 4-component vector of float) 0:96 's' ( temp 4-component vector of float)
0:96 textureGatherOffset ( global 4-component vector of float) 0:96 textureGatherOffset ( global 4-component vector of float)
0:96 'samp2DS' ( uniform sampler2DShadow) 0:96 'samp2D' ( uniform sampler2D)
0:96 Constant: 0:96 Constant:
0:96 0.300000 0:96 0.300000
0:96 0.300000 0:96 0.300000
0:96 Constant: 0:96 Constant:
0:96 1.300000
0:96 Constant:
0:96 1 (const int) 0:96 1 (const int)
0:96 1 (const int) 0:96 1 (const int)
0:97 move second child to first child ( temp 4-component vector of float) 0:97 move second child to first child ( temp 4-component vector of float)
0:97 's' ( temp 4-component vector of float) 0:97 's' ( temp 4-component vector of float)
0:97 textureGatherOffset ( global 4-component vector of float) 0:97 textureGatherOffset ( global 4-component vector of float)
0:97 'samp2D' ( uniform sampler2D) 0:97 'samp2DA' ( uniform sampler2DArray)
0:97 Constant: 0:97 Constant:
0:97 0.300000 0:97 0.300000
0:97 0.300000 0:97 0.300000
0:97 0.300000
0:97 Constant: 0:97 Constant:
0:97 1 (const int) 0:97 1 (const int)
0:97 1 (const int) 0:97 1 (const int)
0:97 Constant: 0:98 move second child to first child ( temp 4-component vector of float)
0:97 2 (const int) 0:98 's' ( temp 4-component vector of float)
0:107 Function Definition: bar235( ( global void) 0:98 textureGatherOffset ( global 4-component vector of float)
0:107 Function Parameters: 0:98 'samp2DR' ( uniform sampler2DRect)
0:109 Sequence 0:98 Constant:
0:109 Sequence 0:98 0.300000
0:109 move second child to first child ( temp 3-component vector of int) 0:98 0.300000
0:109 'a' ( temp 3-component vector of int) 0:98 Constant:
0:109 textureSize ( global 3-component vector of int) 0:98 1 (const int)
0:109 'Sca' ( uniform samplerCubeArray) 0:98 1 (const int)
0:109 Constant: 0:99 move second child to first child ( temp 4-component vector of float)
0:109 3 (const int) 0:99 's' ( temp 4-component vector of float)
0:110 Sequence 0:99 textureGatherOffset ( global 4-component vector of float)
0:110 move second child to first child ( temp 4-component vector of float) 0:99 'samp2DS' ( uniform sampler2DShadow)
0:110 'b' ( temp 4-component vector of float) 0:99 Constant:
0:110 texture ( global 4-component vector of float) 0:99 0.300000
0:110 'Sca' ( uniform samplerCubeArray) 0:99 0.300000
0:110 'i' ( smooth in 4-component vector of float) 0:99 Constant:
0:111 Sequence 0:99 1.300000
0:111 move second child to first child ( temp 4-component vector of int) 0:99 Constant:
0:111 'c' ( temp 4-component vector of int) 0:99 1 (const int)
0:111 texture ( global 4-component vector of int) 0:99 1 (const int)
0:111 'Isca' ( uniform isamplerCubeArray) 0:100 move second child to first child ( temp 4-component vector of float)
0:111 'i' ( smooth in 4-component vector of float) 0:100 's' ( temp 4-component vector of float)
0:111 Constant: 0:100 textureGatherOffset ( global 4-component vector of float)
0:111 0.700000 0:100 'samp2D' ( uniform sampler2D)
0:100 Constant:
0:100 0.300000
0:100 0.300000
0:100 Constant:
0:100 1 (const int)
0:100 1 (const int)
0:100 Constant:
0:100 2 (const int)
0:110 Function Definition: bar235( ( global void)
0:110 Function Parameters:
0:112 Sequence 0:112 Sequence
0:112 move second child to first child ( temp 4-component vector of uint) 0:112 Sequence
0:112 'd' ( temp 4-component vector of uint) 0:112 move second child to first child ( temp 3-component vector of int)
0:112 texture ( global 4-component vector of uint) 0:112 'a' ( temp 3-component vector of int)
0:112 'Usca' ( uniform usamplerCubeArray) 0:112 textureSize ( global 3-component vector of int)
0:112 'i' ( smooth in 4-component vector of float) 0:112 'Sca' ( uniform samplerCubeArray)
0:114 move second child to first child ( temp 4-component vector of float) 0:112 Constant:
0:114 'b' ( temp 4-component vector of float) 0:112 3 (const int)
0:114 textureLod ( global 4-component vector of float) 0:113 Sequence
0:114 'Sca' ( uniform samplerCubeArray) 0:113 move second child to first child ( temp 4-component vector of float)
0:113 'b' ( temp 4-component vector of float)
0:113 texture ( global 4-component vector of float)
0:113 'Sca' ( uniform samplerCubeArray)
0:113 'i' ( smooth in 4-component vector of float)
0:114 Sequence
0:114 move second child to first child ( temp 4-component vector of int)
0:114 'c' ( temp 4-component vector of int)
0:114 texture ( global 4-component vector of int)
0:114 'Isca' ( uniform isamplerCubeArray)
0:114 'i' ( smooth in 4-component vector of float) 0:114 'i' ( smooth in 4-component vector of float)
0:114 Constant: 0:114 Constant:
0:114 1.700000 0:114 0.700000
0:115 move second child to first child ( temp 3-component vector of int) 0:115 Sequence
0:115 'a' ( temp 3-component vector of int) 0:115 move second child to first child ( temp 4-component vector of uint)
0:115 textureSize ( global 3-component vector of int) 0:115 'd' ( temp 4-component vector of uint)
0:115 'Scas' ( uniform samplerCubeArrayShadow) 0:115 texture ( global 4-component vector of uint)
0:115 direct index ( temp int) 0:115 'Usca' ( uniform usamplerCubeArray)
0:115 'a' ( temp 3-component vector of int) 0:115 'i' ( smooth in 4-component vector of float)
0:115 Constant: 0:117 move second child to first child ( temp 4-component vector of float)
0:115 0 (const int) 0:117 'b' ( temp 4-component vector of float)
0:116 Sequence 0:117 textureLod ( global 4-component vector of float)
0:116 move second child to first child ( temp float) 0:117 'Sca' ( uniform samplerCubeArray)
0:116 'f' ( temp float)
0:116 texture ( global float)
0:116 'Scas' ( uniform samplerCubeArrayShadow)
0:116 'i' ( smooth in 4-component vector of float)
0:116 direct index ( temp float)
0:116 'b' ( temp 4-component vector of float)
0:116 Constant:
0:116 1 (const int)
0:117 move second child to first child ( temp 4-component vector of int)
0:117 'c' ( temp 4-component vector of int)
0:117 textureGrad ( global 4-component vector of int)
0:117 'Isca' ( uniform isamplerCubeArray)
0:117 'i' ( smooth in 4-component vector of float) 0:117 'i' ( smooth in 4-component vector of float)
0:117 Constant: 0:117 Constant:
0:117 0.100000 0:117 1.700000
0:117 0.100000 0:118 move second child to first child ( temp 3-component vector of int)
0:117 0.100000 0:118 'a' ( temp 3-component vector of int)
0:117 Constant: 0:118 textureSize ( global 3-component vector of int)
0:117 0.200000 0:118 'Scas' ( uniform samplerCubeArrayShadow)
0:117 0.200000 0:118 direct index ( temp int)
0:117 0.200000 0:118 'a' ( temp 3-component vector of int)
0:129 Function Definition: bar23444( ( global void) 0:118 Constant:
0:129 Function Parameters: 0:118 0 (const int)
0:119 Sequence
0:119 move second child to first child ( temp float)
0:119 'f' ( temp float)
0:119 texture ( global float)
0:119 'Scas' ( uniform samplerCubeArrayShadow)
0:119 'i' ( smooth in 4-component vector of float)
0:119 direct index ( temp float)
0:119 'b' ( temp 4-component vector of float)
0:119 Constant:
0:119 1 (const int)
0:120 move second child to first child ( temp 4-component vector of int)
0:120 'c' ( temp 4-component vector of int)
0:120 textureGrad ( global 4-component vector of int)
0:120 'Isca' ( uniform isamplerCubeArray)
0:120 'i' ( smooth in 4-component vector of float)
0:120 Constant:
0:120 0.100000
0:120 0.100000
0:120 0.100000
0:120 Constant:
0:120 0.200000
0:120 0.200000
0:120 0.200000
0:132 Function Definition: bar23444( ( global void)
0:132 Function Parameters:
0:? Sequence 0:? Sequence
0:132 Sequence 0:135 Sequence
0:132 move second child to first child ( temp float) 0:135 move second child to first child ( temp float)
0:132 'a1' ( temp float) 0:135 'a1' ( temp float)
0:132 direct index ( temp float) 0:135 direct index ( temp float)
0:132 direct index ( temp 3-component vector of float) 0:135 direct index ( temp 3-component vector of float)
0:132 'm43' ( temp 4X3 matrix of float) 0:135 'm43' ( temp 4X3 matrix of float)
0:132 Constant:
0:132 3 (const int)
0:132 Constant:
0:132 1 (const int)
0:134 Sequence
0:134 move second child to first child ( temp int)
0:134 'a2' ( temp int)
0:134 Constant:
0:134 4 (const int)
0:135 add second child into first child ( temp int)
0:135 'a2' ( temp int)
0:135 Constant: 0:135 Constant:
0:135 3 (const int) 0:135 3 (const int)
0:136 add second child into first child ( temp int) 0:135 Constant:
0:136 'a2' ( temp int) 0:135 1 (const int)
0:136 Constant:
0:136 3 (const int)
0:137 Sequence 0:137 Sequence
0:137 move second child to first child ( temp float) 0:137 move second child to first child ( temp int)
0:137 'b' ( const (read only) float) 0:137 'a2' ( temp int)
0:137 component-wise multiply ( temp float)
0:137 Constant: 0:137 Constant:
0:137 2.000000 0:137 4 (const int)
0:137 'a1' ( temp float) 0:138 add second child into first child ( temp int)
0:138 move second child to first child ( temp float) 0:138 'a2' ( temp int)
0:138 direct index ( temp float)
0:138 'a' ( global 3-component vector of float)
0:138 Constant: 0:138 Constant:
0:138 0 (const int) 0:138 3 (const int)
0:138 Constant: 0:139 add second child into first child ( temp int)
0:138 -1.000000 0:139 'a2' ( temp int)
0:139 Constant:
0:139 3 (const int)
0:140 Sequence
0:140 move second child to first child ( temp float)
0:140 'b' ( const (read only) float)
0:140 component-wise multiply ( temp float)
0:140 Constant: 0:140 Constant:
0:140 0.000000 0:140 2.000000
0:140 'a1' ( temp float)
0:141 move second child to first child ( temp float)
0:141 direct index ( temp float)
0:141 'a' ( global 3-component vector of float)
0:141 Constant: 0:141 Constant:
0:141 0.000000 0:141 0 (const int)
0:141 Constant:
0:141 -1.000000
0:143 Constant: 0:143 Constant:
0:143 1 (const int) 0:143 0.000000
0:162 Function Definition: qux2( ( global void) 0:144 Constant:
0:162 Function Parameters: 0:144 0.000000
0:146 Constant:
0:146 1 (const int)
0:165 Function Definition: qux2( ( global void)
0:165 Function Parameters:
0:? Sequence 0:? Sequence
0:165 imageAtomicCompSwap ( global int) 0:168 imageAtomicCompSwap ( global int)
0:165 'iimg2D' (layout( r32i) uniform iimage2D) 0:168 'iimg2D' (layout( r32i) uniform iimage2D)
0:165 Construct ivec2 ( temp 2-component vector of int) 0:168 Construct ivec2 ( temp 2-component vector of int)
0:165 'i' ( temp int) 0:168 'i' ( temp int)
0:165 'i' ( temp int) 0:168 'i' ( temp int)
0:165 'i' ( temp int) 0:168 'i' ( temp int)
0:165 'i' ( temp int) 0:168 'i' ( temp int)
0:166 Sequence 0:169 Sequence
0:166 move second child to first child ( temp 4-component vector of int) 0:169 move second child to first child ( temp 4-component vector of int)
0:166 'pos' ( temp 4-component vector of int) 0:169 'pos' ( temp 4-component vector of int)
0:166 imageLoad ( global 4-component vector of int) 0:169 imageLoad ( global 4-component vector of int)
0:166 'iimg2D' (layout( r32i) uniform iimage2D) 0:169 'iimg2D' (layout( r32i) uniform iimage2D)
0:166 Construct ivec2 ( temp 2-component vector of int) 0:169 Construct ivec2 ( temp 2-component vector of int)
0:166 'i' ( temp int) 0:169 'i' ( temp int)
0:166 'i' ( temp int) 0:169 'i' ( temp int)
0:? Linker Objects 0:? Linker Objects
0:? 'a' ( global 3-component vector of float) 0:? 'a' ( global 3-component vector of float)
0:? 'b' ( global float) 0:? 'b' ( global float)
@ -416,6 +426,7 @@ Shader version: 130
Requested GL_ARB_explicit_attrib_location Requested GL_ARB_explicit_attrib_location
Requested GL_ARB_explicit_uniform_location Requested GL_ARB_explicit_uniform_location
Requested GL_ARB_gpu_shader5 Requested GL_ARB_gpu_shader5
Requested GL_ARB_sample_shading
Requested GL_ARB_separate_shader_objects Requested GL_ARB_separate_shader_objects
Requested GL_ARB_shader_image_load_store Requested GL_ARB_shader_image_load_store
Requested GL_ARB_shading_language_420pack Requested GL_ARB_shading_language_420pack

View File

@ -1,14 +1,15 @@
140.frag 140.frag
WARNING: 0:3: varying deprecated in version 130; may be removed in future release WARNING: 0:3: varying deprecated in version 130; may be removed in future release
ERROR: 0:17: '#error' : GL_ES is not set ERROR: 0:17: '#error' : GL_ES is not set
ERROR: 0:20: 'fragment-shader struct input' : not supported for this version or the enabled extensions ERROR: 0:21: 'fragment-shader struct input' : not supported for this version or the enabled extensions
ERROR: 0:24: 'location' : not supported for this version or the enabled extensions ERROR: 0:25: 'location' : not supported for this version or the enabled extensions
ERROR: 0:24: 'location qualifier on input' : not supported for this version or the enabled extensions ERROR: 0:25: 'location qualifier on input' : not supported for this version or the enabled extensions
ERROR: 0:26: 'location' : not supported for this version or the enabled extensions ERROR: 0:27: 'location' : not supported for this version or the enabled extensions
ERROR: 0:26: 'location qualifier on output' : not supported for this version or the enabled extensions ERROR: 0:27: 'location qualifier on output' : not supported for this version or the enabled extensions
ERROR: 0:40: 'assign' : l-value required "v" (can't modify shader input) ERROR: 0:41: 'assign' : l-value required "v" (can't modify shader input)
ERROR: 0:40: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters. ERROR: 0:41: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters.
ERROR: 8 compilation errors. No code generated. ERROR: 0:56: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
ERROR: 9 compilation errors. No code generated.
Shader version: 140 Shader version: 140
@ -25,80 +26,80 @@ ERROR: node is still EOpNull!
0:12 'gl_ClipDistance' ( smooth in 5-element array of float ClipDistance) 0:12 'gl_ClipDistance' ( smooth in 5-element array of float ClipDistance)
0:12 Constant: 0:12 Constant:
0:12 2 (const int) 0:12 2 (const int)
0:22 Sequence 0:23 Sequence
0:22 move second child to first child ( temp float) 0:23 move second child to first child ( temp float)
0:22 'patch' ( global float) 0:23 'patch' ( global float)
0:22 Constant: 0:23 Constant:
0:22 3.100000 0:23 3.100000
0:38 Function Definition: foo( ( global void) 0:39 Function Definition: foo( ( global void)
0:38 Function Parameters: 0:39 Function Parameters:
0:40 Sequence 0:41 Sequence
0:40 Sequence
0:40 move second child to first child ( temp 2-component vector of float)
0:40 'r1' ( temp 2-component vector of float)
0:40 modf ( global 2-component vector of float)
0:40 vector swizzle ( temp 2-component vector of float)
0:40 'v' ( smooth in 4-component vector of float)
0:40 Sequence
0:40 Constant:
0:40 0 (const int)
0:40 Constant:
0:40 1 (const int)
0:40 vector swizzle ( temp 2-component vector of float)
0:40 'v' ( smooth in 4-component vector of float)
0:40 Sequence
0:40 Constant:
0:40 2 (const int)
0:40 Constant:
0:40 3 (const int)
0:41 Sequence 0:41 Sequence
0:41 move second child to first child ( temp 2-component vector of float) 0:41 move second child to first child ( temp 2-component vector of float)
0:41 'r2' ( temp 2-component vector of float) 0:41 'r1' ( temp 2-component vector of float)
0:41 modf ( global 2-component vector of float) 0:41 modf ( global 2-component vector of float)
0:41 vector swizzle ( temp 2-component vector of float) 0:41 vector swizzle ( temp 2-component vector of float)
0:41 'o' ( out 4-component vector of float) 0:41 'v' ( smooth in 4-component vector of float)
0:41 Sequence 0:41 Sequence
0:41 Constant: 0:41 Constant:
0:41 0 (const int) 0:41 0 (const int)
0:41 Constant: 0:41 Constant:
0:41 1 (const int) 0:41 1 (const int)
0:41 vector swizzle ( temp 2-component vector of float) 0:41 vector swizzle ( temp 2-component vector of float)
0:41 'o' ( out 4-component vector of float) 0:41 'v' ( smooth in 4-component vector of float)
0:41 Sequence 0:41 Sequence
0:41 Constant: 0:41 Constant:
0:41 2 (const int) 0:41 2 (const int)
0:41 Constant: 0:41 Constant:
0:41 3 (const int) 0:41 3 (const int)
0:42 move second child to first child ( temp float) 0:42 Sequence
0:42 direct index ( temp float) 0:42 move second child to first child ( temp 2-component vector of float)
0:42 'r2' ( temp 2-component vector of float)
0:42 modf ( global 2-component vector of float)
0:42 vector swizzle ( temp 2-component vector of float)
0:42 'o' ( out 4-component vector of float) 0:42 'o' ( out 4-component vector of float)
0:42 Sequence
0:42 Constant:
0:42 0 (const int)
0:42 Constant:
0:42 1 (const int)
0:42 vector swizzle ( temp 2-component vector of float)
0:42 'o' ( out 4-component vector of float)
0:42 Sequence
0:42 Constant: 0:42 Constant:
0:42 2 (const int) 0:42 2 (const int)
0:42 Function Call: fooi( ( global float) 0:42 Constant:
0:47 Sequence 0:42 3 (const int)
0:47 move second child to first child ( temp float) 0:43 move second child to first child ( temp float)
0:47 'i1' ( global float) 0:43 direct index ( temp float)
0:47 Test condition and select ( temp float) 0:43 'o' ( out 4-component vector of float)
0:47 Condition 0:43 Constant:
0:47 'gl_FrontFacing' ( gl_FrontFacing bool Face) 0:43 2 (const int)
0:47 true case 0:43 Function Call: fooi( ( global float)
0:47 Constant:
0:47 -2.000000
0:47 false case
0:47 Constant:
0:47 2.000000
0:48 Sequence 0:48 Sequence
0:48 move second child to first child ( temp float) 0:48 move second child to first child ( temp float)
0:48 'i2' ( global float) 0:48 'i1' ( global float)
0:48 Test condition and select ( temp float)
0:48 Condition
0:48 'gl_FrontFacing' ( gl_FrontFacing bool Face)
0:48 true case
0:48 Constant: 0:48 Constant:
0:48 102.000000 0:48 -2.000000
0:50 Function Definition: fooi( ( global float) 0:48 false case
0:50 Function Parameters: 0:48 Constant:
0:52 Sequence 0:48 2.000000
0:52 Branch: Return with expression 0:49 Sequence
0:52 add ( temp float) 0:49 move second child to first child ( temp float)
0:52 'i1' ( global float) 0:49 'i2' ( global float)
0:52 'i2' ( global float) 0:49 Constant:
0:49 102.000000
0:51 Function Definition: fooi( ( global float)
0:51 Function Parameters:
0:53 Sequence
0:53 Branch: Return with expression
0:53 add ( temp float)
0:53 'i1' ( global float)
0:53 'i2' ( global float)
0:? Linker Objects 0:? Linker Objects
0:? 'v' ( smooth in 4-component vector of float) 0:? 'v' ( smooth in 4-component vector of float)
0:? 'i' ( smooth in 4-component vector of float) 0:? 'i' ( smooth in 4-component vector of float)
@ -131,28 +132,28 @@ ERROR: node is still EOpNull!
0:12 'gl_ClipDistance' ( smooth in 5-element array of float ClipDistance) 0:12 'gl_ClipDistance' ( smooth in 5-element array of float ClipDistance)
0:12 Constant: 0:12 Constant:
0:12 2 (const int) 0:12 2 (const int)
0:22 Sequence 0:23 Sequence
0:22 move second child to first child ( temp float) 0:23 move second child to first child ( temp float)
0:22 'patch' ( global float) 0:23 'patch' ( global float)
0:22 Constant: 0:23 Constant:
0:22 3.100000 0:23 3.100000
0:47 Sequence
0:47 move second child to first child ( temp float)
0:47 'i1' ( global float)
0:47 Test condition and select ( temp float)
0:47 Condition
0:47 'gl_FrontFacing' ( gl_FrontFacing bool Face)
0:47 true case
0:47 Constant:
0:47 -2.000000
0:47 false case
0:47 Constant:
0:47 2.000000
0:48 Sequence 0:48 Sequence
0:48 move second child to first child ( temp float) 0:48 move second child to first child ( temp float)
0:48 'i2' ( global float) 0:48 'i1' ( global float)
0:48 Test condition and select ( temp float)
0:48 Condition
0:48 'gl_FrontFacing' ( gl_FrontFacing bool Face)
0:48 true case
0:48 Constant: 0:48 Constant:
0:48 102.000000 0:48 -2.000000
0:48 false case
0:48 Constant:
0:48 2.000000
0:49 Sequence
0:49 move second child to first child ( temp float)
0:49 'i2' ( global float)
0:49 Constant:
0:49 102.000000
0:? Linker Objects 0:? Linker Objects
0:? 'v' ( smooth in 4-component vector of float) 0:? 'v' ( smooth in 4-component vector of float)
0:? 'i' ( smooth in 4-component vector of float) 0:? 'i' ( smooth in 4-component vector of float)

View File

@ -5,10 +5,15 @@ ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_cent
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
ERROR: 0:50: 'gl_PerFragment' : cannot be used (maybe an instance name is needed) ERROR: 0:50: 'gl_PerFragment' : cannot be used (maybe an instance name is needed)
ERROR: 0:50: 'gl_PerFragment' : undeclared identifier ERROR: 0:50: 'gl_PerFragment' : undeclared identifier
ERROR: 6 compilation errors. No code generated. ERROR: 0:53: 'double' : Reserved word.
ERROR: 0:53: 'double' : not supported for this version or the enabled extensions
ERROR: 0:53: 'double' : must be qualified as flat in
ERROR: 0:57: '=' : cannot convert from ' global double' to ' global int'
ERROR: 10 compilation errors. No code generated.
Shader version: 150 Shader version: 150
Requested GL_ARB_gpu_shader_fp64
gl_FragCoord pixel center is integer gl_FragCoord pixel center is integer
gl_FragCoord origin is upper left gl_FragCoord origin is upper left
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
@ -109,6 +114,26 @@ ERROR: node is still EOpNull!
0:49 Branch: Return with expression 0:49 Branch: Return with expression
0:49 'gl_PrimitiveID' ( flat in int PrimitiveID) 0:49 'gl_PrimitiveID' ( flat in int PrimitiveID)
0:50 'gl_PerFragment' ( temp float) 0:50 'gl_PerFragment' ( temp float)
0:56 Sequence
0:56 move second child to first child ( temp double)
0:56 'type3' ( global double)
0:56 Constant:
0:56 2.000000
0:58 Sequence
0:58 move second child to first child ( temp double)
0:58 'absTest2' ( global double)
0:58 sqrt ( global double)
0:58 'type3' ( global double)
0:59 Sequence
0:59 move second child to first child ( temp double)
0:59 'absTest3' ( global double)
0:59 Constant:
0:59 1.414214
0:60 Sequence
0:60 move second child to first child ( temp float)
0:60 'dk' ( global float)
0:60 Constant:
0:60 3.316625
0:? Linker Objects 0:? Linker Objects
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord) 0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
0:? 'foo' ( smooth in 4-component vector of float) 0:? 'foo' ( smooth in 4-component vector of float)
@ -123,12 +148,20 @@ ERROR: node is still EOpNull!
0:? 'p2' ( flat in 2-component vector of int) 0:? 'p2' ( flat in 2-component vector of int)
0:? 'p3' ( flat in 3-component vector of int) 0:? 'p3' ( flat in 3-component vector of int)
0:? 'samp' ( flat in int) 0:? 'samp' ( flat in int)
0:? 'type1' ( smooth in double)
0:? 'type2' ( global double)
0:? 'type3' ( global double)
0:? 'absTest' ( global int)
0:? 'absTest2' ( global double)
0:? 'absTest3' ( global double)
0:? 'dk' ( global float)
Linked fragment stage: Linked fragment stage:
Shader version: 150 Shader version: 150
Requested GL_ARB_gpu_shader_fp64
gl_FragCoord pixel center is integer gl_FragCoord pixel center is integer
gl_FragCoord origin is upper left gl_FragCoord origin is upper left
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
@ -144,6 +177,26 @@ ERROR: node is still EOpNull!
0:18 'patch' ( global float) 0:18 'patch' ( global float)
0:18 Constant: 0:18 Constant:
0:18 3.100000 0:18 3.100000
0:56 Sequence
0:56 move second child to first child ( temp double)
0:56 'type3' ( global double)
0:56 Constant:
0:56 2.000000
0:58 Sequence
0:58 move second child to first child ( temp double)
0:58 'absTest2' ( global double)
0:58 sqrt ( global double)
0:58 'type3' ( global double)
0:59 Sequence
0:59 move second child to first child ( temp double)
0:59 'absTest3' ( global double)
0:59 Constant:
0:59 1.414214
0:60 Sequence
0:60 move second child to first child ( temp float)
0:60 'dk' ( global float)
0:60 Constant:
0:60 3.316625
0:? Linker Objects 0:? Linker Objects
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord) 0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
0:? 'foo' ( smooth in 4-component vector of float) 0:? 'foo' ( smooth in 4-component vector of float)
@ -158,4 +211,11 @@ ERROR: node is still EOpNull!
0:? 'p2' ( flat in 2-component vector of int) 0:? 'p2' ( flat in 2-component vector of int)
0:? 'p3' ( flat in 3-component vector of int) 0:? 'p3' ( flat in 3-component vector of int)
0:? 'samp' ( flat in int) 0:? 'samp' ( flat in int)
0:? 'type1' ( smooth in double)
0:? 'type2' ( global double)
0:? 'type3' ( global double)
0:? 'absTest' ( global int)
0:? 'absTest2' ( global double)
0:? 'absTest3' ( global double)
0:? 'dk' ( global float)

View File

@ -3,6 +3,12 @@ Shader version: 410
0:? Sequence 0:? Sequence
0:7 Function Definition: main( ( global void) 0:7 Function Definition: main( ( global void)
0:7 Function Parameters: 0:7 Function Parameters:
0:9 Sequence
0:9 Sequence
0:9 move second child to first child ( temp int)
0:9 'test' ( temp int)
0:9 Constant:
0:9 16 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'd' ( in double) 0:? 'd' ( in double)
0:? 'd3' ( in 3-component vector of double) 0:? 'd3' ( in 3-component vector of double)
@ -18,6 +24,12 @@ Shader version: 410
0:? Sequence 0:? Sequence
0:7 Function Definition: main( ( global void) 0:7 Function Definition: main( ( global void)
0:7 Function Parameters: 0:7 Function Parameters:
0:9 Sequence
0:9 Sequence
0:9 move second child to first child ( temp int)
0:9 'test' ( temp int)
0:9 Constant:
0:9 16 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'd' ( in double) 0:? 'd' ( in double)
0:? 'd3' ( in 3-component vector of double) 0:? 'd3' ( in 3-component vector of double)

View File

@ -1,14 +1,15 @@
450.comp 450.comp
ERROR: 0:2: 'local_size_x' : must be at least 1 ERROR: 0:2: 'local_size_x' : must be at least 1
ERROR: 0:5: 'shared' : not allowed in nested scope ERROR: 0:4: 'binding' : atomic_uint binding is too large
ERROR: 2 compilation errors. No code generated. ERROR: 0:8: 'shared' : not allowed in nested scope
ERROR: 3 compilation errors. No code generated.
Shader version: 450 Shader version: 450
local_size = (1, 1, 1) local_size = (1, 1, 1)
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
0:3 Function Definition: main( ( global void) 0:6 Function Definition: main( ( global void)
0:3 Function Parameters: 0:6 Function Parameters:
0:? Linker Objects 0:? Linker Objects
@ -18,7 +19,7 @@ Linked compute stage:
Shader version: 450 Shader version: 450
local_size = (1, 1, 1) local_size = (1, 1, 1)
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
0:3 Function Definition: main( ( global void) 0:6 Function Definition: main( ( global void)
0:3 Function Parameters: 0:6 Function Parameters:
0:? Linker Objects 0:? Linker Objects

View File

@ -1,64 +1,65 @@
atomic_uint.frag atomic_uint.frag
ERROR: 0:10: 'atomic_uint' : samplers and atomic_uints cannot be output parameters ERROR: 0:4: 'counter' : redefinition
ERROR: 0:12: 'return' : type does not match, or is not convertible to, the function's return type ERROR: 0:11: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
ERROR: 0:18: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter ERROR: 0:13: 'return' : type does not match, or is not convertible to, the function's return type
ERROR: 0:23: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings ERROR: 0:19: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
ERROR: 0:28: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( binding=0 offset=0) uniform atomic_uint' and a right operand of type 'layout( binding=0 offset=0) uniform atomic_uint' (or there is no acceptable conversion) ERROR: 0:24: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
ERROR: 0:29: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( binding=0 offset=0) uniform atomic_uint (or there is no acceptable conversion) ERROR: 0:29: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( binding=0 offset=0) uniform atomic_uint' and a right operand of type 'layout( binding=0 offset=0) uniform atomic_uint' (or there is no acceptable conversion)
ERROR: 0:31: '[]' : scalar integer expression required ERROR: 0:30: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( binding=0 offset=0) uniform atomic_uint (or there is no acceptable conversion)
ERROR: 0:34: 'assign' : l-value required "counter" (can't modify a uniform) ERROR: 0:32: '[]' : scalar integer expression required
ERROR: 0:34: 'assign' : cannot convert from ' const int' to 'layout( binding=0 offset=0) uniform atomic_uint' ERROR: 0:35: 'assign' : l-value required "counter" (can't modify a uniform)
ERROR: 0:37: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acin ERROR: 0:35: 'assign' : cannot convert from ' const int' to 'layout( binding=0 offset=0) uniform atomic_uint'
ERROR: 0:38: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acg ERROR: 0:38: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acin
ERROR: 0:47: 'offset' : atomic counters sharing the same offset: 12 ERROR: 0:39: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acg
ERROR: 0:48: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings ERROR: 0:48: 'offset' : atomic counters sharing the same offset: 12
ERROR: 13 compilation errors. No code generated. ERROR: 0:49: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
ERROR: 14 compilation errors. No code generated.
Shader version: 420 Shader version: 420
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
0:5 Function Definition: func(au1; ( global uint) 0:6 Function Definition: func(au1; ( global uint)
0:5 Function Parameters: 0:6 Function Parameters:
0:5 'c' ( in atomic_uint) 0:6 'c' ( in atomic_uint)
0:7 Sequence 0:8 Sequence
0:7 Branch: Return with expression 0:8 Branch: Return with expression
0:7 AtomicCounterIncrement ( global uint) 0:8 AtomicCounterIncrement ( global uint)
0:7 'c' ( in atomic_uint) 0:8 'c' ( in atomic_uint)
0:10 Function Definition: func2(au1; ( global uint) 0:11 Function Definition: func2(au1; ( global uint)
0:10 Function Parameters: 0:11 Function Parameters:
0:10 'c' ( out atomic_uint) 0:11 'c' ( out atomic_uint)
0:12 Sequence 0:13 Sequence
0:12 Branch: Return with expression
0:12 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:13 Branch: Return with expression 0:13 Branch: Return with expression
0:13 AtomicCounter ( global uint)
0:13 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:13 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:16 Function Definition: main( ( global void) 0:14 Branch: Return with expression
0:16 Function Parameters: 0:14 AtomicCounter ( global uint)
0:14 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:17 Function Definition: main( ( global void)
0:17 Function Parameters:
0:? Sequence 0:? Sequence
0:19 Sequence 0:20 Sequence
0:19 move second child to first child ( temp uint) 0:20 move second child to first child ( temp uint)
0:19 'val' ( temp uint) 0:20 'val' ( temp uint)
0:19 AtomicCounter ( global uint) 0:20 AtomicCounter ( global uint)
0:19 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:20 AtomicCounterDecrement ( global uint)
0:20 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:20 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:26 Function Definition: opac( ( global void) 0:21 AtomicCounterDecrement ( global uint)
0:26 Function Parameters: 0:21 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:28 Sequence 0:27 Function Definition: opac( ( global void)
0:28 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:27 Function Parameters:
0:29 Sequence
0:29 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:29 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:31 indirect index ( temp int) 0:30 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:31 'a' ( temp 3-element array of int) 0:32 indirect index ( temp int)
0:31 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:32 'a' ( temp 3-element array of int)
0:32 direct index (layout( binding=1 offset=3) temp atomic_uint) 0:32 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:32 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint) 0:33 direct index (layout( binding=1 offset=3) temp atomic_uint)
0:32 Constant:
0:32 2 (const int)
0:33 indirect index (layout( binding=1 offset=3) temp atomic_uint)
0:33 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint) 0:33 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint)
0:33 'i' ( uniform int) 0:33 Constant:
0:34 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:33 2 (const int)
0:34 indirect index (layout( binding=1 offset=3) temp atomic_uint)
0:34 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint)
0:34 'i' ( uniform int)
0:35 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:? Linker Objects 0:? Linker Objects
0:? 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:? 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:? 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint) 0:? 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint)
@ -68,8 +69,8 @@ ERROR: node is still EOpNull!
0:? 'aNoBind' ( uniform atomic_uint) 0:? 'aNoBind' ( uniform atomic_uint)
0:? 'aOffset' (layout( binding=0 offset=32) uniform atomic_uint) 0:? 'aOffset' (layout( binding=0 offset=32) uniform atomic_uint)
0:? 'bar3' (layout( binding=0 offset=4) uniform atomic_uint) 0:? 'bar3' (layout( binding=0 offset=4) uniform atomic_uint)
0:? 'ac' (layout( binding=0 offset=8) uniform 3-element array of atomic_uint) 0:? 'ac' (layout( binding=0 offset=8) uniform 2-element array of atomic_uint)
0:? 'ad' (layout( binding=0 offset=20) uniform atomic_uint) 0:? 'ad' (layout( binding=0 offset=16) uniform atomic_uint)
0:? 'bar4' (layout( offset=8) uniform atomic_uint) 0:? 'bar4' (layout( offset=8) uniform atomic_uint)
0:? 'overlap' (layout( binding=0 offset=12) uniform atomic_uint) 0:? 'overlap' (layout( binding=0 offset=12) uniform atomic_uint)
0:? 'bigBind' (layout( binding=20) uniform atomic_uint) 0:? 'bigBind' (layout( binding=20) uniform atomic_uint)
@ -80,16 +81,16 @@ Linked fragment stage:
Shader version: 420 Shader version: 420
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
0:16 Function Definition: main( ( global void) 0:17 Function Definition: main( ( global void)
0:16 Function Parameters: 0:17 Function Parameters:
0:? Sequence 0:? Sequence
0:19 Sequence 0:20 Sequence
0:19 move second child to first child ( temp uint) 0:20 move second child to first child ( temp uint)
0:19 'val' ( temp uint) 0:20 'val' ( temp uint)
0:19 AtomicCounter ( global uint) 0:20 AtomicCounter ( global uint)
0:19 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:20 AtomicCounterDecrement ( global uint)
0:20 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:20 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:21 AtomicCounterDecrement ( global uint)
0:21 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:? Linker Objects 0:? Linker Objects
0:? 'counter' (layout( binding=0 offset=0) uniform atomic_uint) 0:? 'counter' (layout( binding=0 offset=0) uniform atomic_uint)
0:? 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint) 0:? 'countArr' (layout( binding=1 offset=3) uniform 4-element array of atomic_uint)
@ -99,8 +100,8 @@ ERROR: node is still EOpNull!
0:? 'aNoBind' ( uniform atomic_uint) 0:? 'aNoBind' ( uniform atomic_uint)
0:? 'aOffset' (layout( binding=0 offset=32) uniform atomic_uint) 0:? 'aOffset' (layout( binding=0 offset=32) uniform atomic_uint)
0:? 'bar3' (layout( binding=0 offset=4) uniform atomic_uint) 0:? 'bar3' (layout( binding=0 offset=4) uniform atomic_uint)
0:? 'ac' (layout( binding=0 offset=8) uniform 3-element array of atomic_uint) 0:? 'ac' (layout( binding=0 offset=8) uniform 2-element array of atomic_uint)
0:? 'ad' (layout( binding=0 offset=20) uniform atomic_uint) 0:? 'ad' (layout( binding=0 offset=16) uniform atomic_uint)
0:? 'bar4' (layout( offset=8) uniform atomic_uint) 0:? 'bar4' (layout( offset=8) uniform atomic_uint)
0:? 'overlap' (layout( binding=0 offset=12) uniform atomic_uint) 0:? 'overlap' (layout( binding=0 offset=12) uniform atomic_uint)
0:? 'bigBind' (layout( binding=20) uniform atomic_uint) 0:? 'bigBind' (layout( binding=20) uniform atomic_uint)

View File

@ -1,7 +1,6 @@
hlsl.gs-hs-mix.tesc hlsl.gs-hs-mix.tesc
Shader version: 500 Shader version: 500
vertices = 3 vertices = 3
input primitive = triangles
vertex spacing = fractional_odd_spacing vertex spacing = fractional_odd_spacing
triangle order = ccw triangle order = ccw
0:? Sequence 0:? Sequence
@ -402,7 +401,6 @@ Linked tessellation control stage:
Shader version: 500 Shader version: 500
vertices = 3 vertices = 3
input primitive = triangles
vertex spacing = fractional_odd_spacing vertex spacing = fractional_odd_spacing
triangle order = ccw triangle order = ccw
0:? Sequence 0:? Sequence

View File

@ -295,7 +295,7 @@ gl_FragCoord origin is upper left
39: 17(ivec2) Load 19(i3) 39: 17(ivec2) Load 19(i3)
40: 17(ivec2) IMul 38 39 40: 17(ivec2) IMul 38 39
41: 11(int) CompositeExtract 40 0 41: 11(int) CompositeExtract 40 0
42: 11(int) CompositeExtract 38 1 42: 11(int) CompositeExtract 40 1
43: 11(int) IAdd 41 42 43: 11(int) IAdd 41 42
44: 17(ivec2) CompositeConstruct 43 43 44: 17(ivec2) CompositeConstruct 43 43
Store 19(i3) 44 Store 19(i3) 44
@ -303,9 +303,9 @@ gl_FragCoord origin is upper left
46: 22(ivec3) Load 24(i4) 46: 22(ivec3) Load 24(i4)
47: 22(ivec3) IMul 45 46 47: 22(ivec3) IMul 45 46
48: 11(int) CompositeExtract 47 0 48: 11(int) CompositeExtract 47 0
49: 11(int) CompositeExtract 45 1 49: 11(int) CompositeExtract 47 1
50: 11(int) IAdd 48 49 50: 11(int) IAdd 48 49
51: 11(int) CompositeExtract 45 2 51: 11(int) CompositeExtract 47 2
52: 11(int) IAdd 50 51 52: 11(int) IAdd 50 51
53: 22(ivec3) CompositeConstruct 52 52 52 53: 22(ivec3) CompositeConstruct 52 52 52
Store 24(i4) 53 Store 24(i4) 53
@ -313,11 +313,11 @@ gl_FragCoord origin is upper left
55: 27(ivec4) Load 29(i5) 55: 27(ivec4) Load 29(i5)
56: 27(ivec4) IMul 54 55 56: 27(ivec4) IMul 54 55
57: 11(int) CompositeExtract 56 0 57: 11(int) CompositeExtract 56 0
58: 11(int) CompositeExtract 54 1 58: 11(int) CompositeExtract 56 1
59: 11(int) IAdd 57 58 59: 11(int) IAdd 57 58
60: 11(int) CompositeExtract 54 2 60: 11(int) CompositeExtract 56 2
61: 11(int) IAdd 59 60 61: 11(int) IAdd 59 60
62: 11(int) CompositeExtract 54 3 62: 11(int) CompositeExtract 56 3
63: 11(int) IAdd 61 62 63: 11(int) IAdd 61 62
64: 27(ivec4) CompositeConstruct 63 63 63 63 64: 27(ivec4) CompositeConstruct 63 63 63 63
Store 29(i5) 64 Store 29(i5) 64

View File

@ -66,6 +66,58 @@ output primitive = line_strip
0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void) 0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
0:? 'VertexID' ( temp 3-element array of uint) 0:? 'VertexID' ( temp 3-element array of uint)
0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:21 Function Definition: notmain(u1[2];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
0:21 Function Parameters:
0:21 'VertexID' ( in 2-element array of uint)
0:21 'OutputStream' ( out structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:? Sequence
0:23 Sequence
0:23 Sequence
0:23 move second child to first child ( temp float)
0:? 'OutputStream.clip0' ( out float Position)
0:23 clip0: direct index for structure ( temp float)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 0 (const int)
0:? Sequence
0:23 move second child to first child ( temp float)
0:23 direct index ( out float ClipDistance)
0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance)
0:23 Constant:
0:23 0 (const int)
0:23 clip0: direct index for structure ( temp float)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 1 (const int)
0:? Sequence
0:23 move second child to first child ( temp float)
0:23 direct index ( out float CullDistance)
0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance)
0:23 Constant:
0:23 0 (const int)
0:23 cull0: direct index for structure ( temp float)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 2 (const int)
0:23 move second child to first child ( temp uint)
0:? 'OutputStream.vpai' ( out uint ViewportIndex)
0:23 vpai: direct index for structure ( temp uint)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 3 (const int)
0:23 move second child to first child ( temp uint)
0:? 'OutputStream.rtai' ( out uint Layer)
0:23 rtai: direct index for structure ( temp uint)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 4 (const int)
0:23 move second child to first child ( temp int)
0:? 'OutputStream.ii' (layout( location=0) out int)
0:23 ii: direct index for structure ( temp int)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 5 (const int)
0:23 EmitVertex ( temp void)
0:? Linker Objects 0:? Linker Objects
0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint)
0:? 'OutputStream.clip0' ( out float Position) 0:? 'OutputStream.clip0' ( out float Position)
@ -146,6 +198,58 @@ output primitive = line_strip
0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void) 0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
0:? 'VertexID' ( temp 3-element array of uint) 0:? 'VertexID' ( temp 3-element array of uint)
0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:21 Function Definition: notmain(u1[2];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
0:21 Function Parameters:
0:21 'VertexID' ( in 2-element array of uint)
0:21 'OutputStream' ( out structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:? Sequence
0:23 Sequence
0:23 Sequence
0:23 move second child to first child ( temp float)
0:? 'OutputStream.clip0' ( out float Position)
0:23 clip0: direct index for structure ( temp float)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 0 (const int)
0:? Sequence
0:23 move second child to first child ( temp float)
0:23 direct index ( out float ClipDistance)
0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance)
0:23 Constant:
0:23 0 (const int)
0:23 clip0: direct index for structure ( temp float)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 1 (const int)
0:? Sequence
0:23 move second child to first child ( temp float)
0:23 direct index ( out float CullDistance)
0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance)
0:23 Constant:
0:23 0 (const int)
0:23 cull0: direct index for structure ( temp float)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 2 (const int)
0:23 move second child to first child ( temp uint)
0:? 'OutputStream.vpai' ( out uint ViewportIndex)
0:23 vpai: direct index for structure ( temp uint)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 3 (const int)
0:23 move second child to first child ( temp uint)
0:? 'OutputStream.rtai' ( out uint Layer)
0:23 rtai: direct index for structure ( temp uint)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 4 (const int)
0:23 move second child to first child ( temp int)
0:? 'OutputStream.ii' (layout( location=0) out int)
0:23 ii: direct index for structure ( temp int)
0:23 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:23 Constant:
0:23 5 (const int)
0:23 EmitVertex ( temp void)
0:? Linker Objects 0:? Linker Objects
0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint)
0:? 'OutputStream.clip0' ( out float Position) 0:? 'OutputStream.clip0' ( out float Position)
@ -158,7 +262,7 @@ output primitive = line_strip
Validation failed Validation failed
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80008 // Generated by (magic number): 80008
// Id's are bound by 65 // Id's are bound by 88
Capability Geometry Capability Geometry
Capability ClipDistance Capability ClipDistance
@ -166,7 +270,7 @@ Validation failed
Capability MultiViewport Capability MultiViewport
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 20 29 34 40 45 50 57 EntryPoint Geometry 4 "main" 28 37 42 48 53 58 65
ExecutionMode 4 Triangles ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputLineStrip ExecutionMode 4 OutputLineStrip
@ -183,25 +287,29 @@ Validation failed
Name 17 "@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;" Name 17 "@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;"
Name 15 "VertexID" Name 15 "VertexID"
Name 16 "OutputStream" Name 16 "OutputStream"
Name 20 "OutputStream.clip0" Name 25 "notmain(u1[2];struct-S-f1-f1-f1-u1-u1-i11;"
Name 21 "s" Name 23 "VertexID"
Name 29 "OutputStream.clip0" Name 24 "OutputStream"
Name 34 "OutputStream.cull0" Name 28 "OutputStream.clip0"
Name 40 "OutputStream.vpai" Name 29 "s"
Name 45 "OutputStream.rtai" Name 37 "OutputStream.clip0"
Name 50 "OutputStream.ii" Name 42 "OutputStream.cull0"
Name 55 "VertexID" Name 48 "OutputStream.vpai"
Name 57 "VertexID" Name 53 "OutputStream.rtai"
Name 59 "OutputStream" Name 58 "OutputStream.ii"
Name 60 "param" Name 63 "VertexID"
Name 62 "param" Name 65 "VertexID"
Decorate 20(OutputStream.clip0) BuiltIn Position Name 67 "OutputStream"
Decorate 29(OutputStream.clip0) BuiltIn ClipDistance Name 68 "param"
Decorate 34(OutputStream.cull0) BuiltIn CullDistance Name 70 "param"
Decorate 40(OutputStream.vpai) BuiltIn ViewportIndex Name 73 "s"
Decorate 45(OutputStream.rtai) BuiltIn Layer Decorate 28(OutputStream.clip0) BuiltIn Position
Decorate 50(OutputStream.ii) Location 0 Decorate 37(OutputStream.clip0) BuiltIn ClipDistance
Decorate 57(VertexID) Location 0 Decorate 42(OutputStream.cull0) BuiltIn CullDistance
Decorate 48(OutputStream.vpai) BuiltIn ViewportIndex
Decorate 53(OutputStream.rtai) BuiltIn Layer
Decorate 58(OutputStream.ii) Location 0
Decorate 65(VertexID) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -213,69 +321,101 @@ Validation failed
12(S): TypeStruct 10(float) 10(float) 10(float) 6(int) 6(int) 11(int) 12(S): TypeStruct 10(float) 10(float) 10(float) 6(int) 6(int) 11(int)
13: TypePointer Function 12(S) 13: TypePointer Function 12(S)
14: TypeFunction 2 9(ptr) 13(ptr) 14: TypeFunction 2 9(ptr) 13(ptr)
19: TypePointer Output 10(float) 19: 6(int) Constant 2
20(OutputStream.clip0): 19(ptr) Variable Output 20: TypeArray 6(int) 19
22: 11(int) Constant 0 21: TypePointer Function 20
23: TypePointer Function 10(float) 22: TypeFunction 2 21(ptr) 13(ptr)
26: 6(int) Constant 1 27: TypePointer Output 10(float)
27: TypeArray 10(float) 26 28(OutputStream.clip0): 27(ptr) Variable Output
28: TypePointer Output 27 30: 11(int) Constant 0
29(OutputStream.clip0): 28(ptr) Variable Output 31: TypePointer Function 10(float)
30: 11(int) Constant 1 34: 6(int) Constant 1
34(OutputStream.cull0): 28(ptr) Variable Output 35: TypeArray 10(float) 34
35: 11(int) Constant 2 36: TypePointer Output 35
39: TypePointer Output 6(int) 37(OutputStream.clip0): 36(ptr) Variable Output
40(OutputStream.vpai): 39(ptr) Variable Output 38: 11(int) Constant 1
41: 11(int) Constant 3 42(OutputStream.cull0): 36(ptr) Variable Output
42: TypePointer Function 6(int) 43: 11(int) Constant 2
45(OutputStream.rtai): 39(ptr) Variable Output 47: TypePointer Output 6(int)
46: 11(int) Constant 4 48(OutputStream.vpai): 47(ptr) Variable Output
49: TypePointer Output 11(int) 49: 11(int) Constant 3
50(OutputStream.ii): 49(ptr) Variable Output 50: TypePointer Function 6(int)
51: 11(int) Constant 5 53(OutputStream.rtai): 47(ptr) Variable Output
52: TypePointer Function 11(int) 54: 11(int) Constant 4
56: TypePointer Input 8 57: TypePointer Output 11(int)
57(VertexID): 56(ptr) Variable Input 58(OutputStream.ii): 57(ptr) Variable Output
59: 11(int) Constant 5
60: TypePointer Function 11(int)
64: TypePointer Input 8
65(VertexID): 64(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
55(VertexID): 9(ptr) Variable Function 63(VertexID): 9(ptr) Variable Function
59(OutputStream): 13(ptr) Variable Function 67(OutputStream): 13(ptr) Variable Function
60(param): 9(ptr) Variable Function 68(param): 9(ptr) Variable Function
62(param): 13(ptr) Variable Function 70(param): 13(ptr) Variable Function
58: 8 Load 57(VertexID) 66: 8 Load 65(VertexID)
Store 55(VertexID) 58 Store 63(VertexID) 66
61: 8 Load 55(VertexID) 69: 8 Load 63(VertexID)
Store 60(param) 61 Store 68(param) 69
63: 2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 60(param) 62(param) 71: 2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 68(param) 70(param)
64: 12(S) Load 62(param) 72: 12(S) Load 70(param)
Store 59(OutputStream) 64 Store 67(OutputStream) 72
Return Return
FunctionEnd FunctionEnd
17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;): 2 Function None 14 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;): 2 Function None 14
15(VertexID): 9(ptr) FunctionParameter 15(VertexID): 9(ptr) FunctionParameter
16(OutputStream): 13(ptr) FunctionParameter 16(OutputStream): 13(ptr) FunctionParameter
18: Label 18: Label
21(s): 13(ptr) Variable Function 29(s): 13(ptr) Variable Function
24: 23(ptr) AccessChain 21(s) 22 32: 31(ptr) AccessChain 29(s) 30
25: 10(float) Load 24 33: 10(float) Load 32
Store 20(OutputStream.clip0) 25 Store 28(OutputStream.clip0) 33
31: 23(ptr) AccessChain 21(s) 30 39: 31(ptr) AccessChain 29(s) 38
32: 10(float) Load 31 40: 10(float) Load 39
33: 19(ptr) AccessChain 29(OutputStream.clip0) 22 41: 27(ptr) AccessChain 37(OutputStream.clip0) 30
Store 33 32 Store 41 40
36: 23(ptr) AccessChain 21(s) 35 44: 31(ptr) AccessChain 29(s) 43
37: 10(float) Load 36 45: 10(float) Load 44
38: 19(ptr) AccessChain 34(OutputStream.cull0) 22 46: 27(ptr) AccessChain 42(OutputStream.cull0) 30
Store 38 37 Store 46 45
43: 42(ptr) AccessChain 21(s) 41 51: 50(ptr) AccessChain 29(s) 49
44: 6(int) Load 43 52: 6(int) Load 51
Store 40(OutputStream.vpai) 44 Store 48(OutputStream.vpai) 52
47: 42(ptr) AccessChain 21(s) 46 55: 50(ptr) AccessChain 29(s) 54
48: 6(int) Load 47 56: 6(int) Load 55
Store 45(OutputStream.rtai) 48 Store 53(OutputStream.rtai) 56
53: 52(ptr) AccessChain 21(s) 51 61: 60(ptr) AccessChain 29(s) 59
54: 11(int) Load 53 62: 11(int) Load 61
Store 50(OutputStream.ii) 54 Store 58(OutputStream.ii) 62
EmitVertex
Return
FunctionEnd
25(notmain(u1[2];struct-S-f1-f1-f1-u1-u1-i11;): 2 Function None 22
23(VertexID): 21(ptr) FunctionParameter
24(OutputStream): 13(ptr) FunctionParameter
26: Label
73(s): 13(ptr) Variable Function
74: 31(ptr) AccessChain 73(s) 30
75: 10(float) Load 74
Store 28(OutputStream.clip0) 75
76: 31(ptr) AccessChain 73(s) 38
77: 10(float) Load 76
78: 27(ptr) AccessChain 37(OutputStream.clip0) 30
Store 78 77
79: 31(ptr) AccessChain 73(s) 43
80: 10(float) Load 79
81: 27(ptr) AccessChain 42(OutputStream.cull0) 30
Store 81 80
82: 50(ptr) AccessChain 73(s) 49
83: 6(int) Load 82
Store 48(OutputStream.vpai) 83
84: 50(ptr) AccessChain 73(s) 54
85: 6(int) Load 84
Store 53(OutputStream.rtai) 85
86: 60(ptr) AccessChain 73(s) 59
87: 11(int) Load 86
Store 58(OutputStream.ii) 87
EmitVertex EmitVertex
Return Return
FunctionEnd FunctionEnd

View File

@ -14,3 +14,11 @@ void main(triangle in uint VertexID[3] : VertexID,
S s; S s;
OutputStream.Append(s); OutputStream.Append(s);
} }
[maxvertexcount(4)]
void notmain(line in uint VertexID[2] : VertexID,
inout LineStream<S> OutputStream)
{
S s;
OutputStream.Append(s);
}

View File

@ -176,9 +176,9 @@ diff -b $BASEDIR/hlsl.pp.line3.frag.out $TARGETDIR/hlsl.pp.line3.frag.out || HAS
# Testing -D and -U # Testing -D and -U
# #
echo "Testing -D and -U" echo "Testing -D and -U"
$EXE -DUNDEFED -UIN_SHADER -DFOO=200 -i -l -UUNDEFED -DMUL=FOO*2 glsl.-D-U.frag > $TARGETDIR/glsl.-D-U.frag.out $EXE -DUNDEFED -UIN_SHADER -DFOO=200 -i -l --U UNDEFED --define-macro MUL=FOO*2 glsl.-D-U.frag > $TARGETDIR/glsl.-D-U.frag.out
diff -b $BASEDIR/glsl.-D-U.frag.out $TARGETDIR/glsl.-D-U.frag.out || HASERROR=1 diff -b $BASEDIR/glsl.-D-U.frag.out $TARGETDIR/glsl.-D-U.frag.out || HASERROR=1
$EXE -D -Od -e main -V -i -DUNDEFED -UIN_SHADER -DFOO=200 -UUNDEFED -Od hlsl.-D-U.frag > $TARGETDIR/hlsl.-D-U.frag.out $EXE -D -Od -e main -V -i -DUNDEFED -UIN_SHADER --D FOO=200 --undef-macro UNDEFED -Od hlsl.-D-U.frag > $TARGETDIR/hlsl.-D-U.frag.out
diff -b $BASEDIR/hlsl.-D-U.frag.out $TARGETDIR/hlsl.-D-U.frag.out || HASERROR=1 diff -b $BASEDIR/hlsl.-D-U.frag.out $TARGETDIR/hlsl.-D-U.frag.out || HASERROR=1
# #
@ -189,6 +189,7 @@ $EXE --client vulkan100 spv.targetVulkan.vert || HASERROR=1
$EXE --client opengl100 spv.targetOpenGL.vert || HASERROR=1 $EXE --client opengl100 spv.targetOpenGL.vert || HASERROR=1
$EXE --target-env vulkan1.0 spv.targetVulkan.vert || HASERROR=1 $EXE --target-env vulkan1.0 spv.targetVulkan.vert || HASERROR=1
$EXE --target-env vulkan1.1 spv.targetVulkan.vert || HASERROR=1 $EXE --target-env vulkan1.1 spv.targetVulkan.vert || HASERROR=1
$EXE --target-env vulkan1.2 spv.targetVulkan.vert || HASERROR=1
$EXE --target-env opengl spv.targetOpenGL.vert || HASERROR=1 $EXE --target-env opengl spv.targetOpenGL.vert || HASERROR=1
$EXE -V100 spv.targetVulkan.vert || HASERROR=1 $EXE -V100 spv.targetVulkan.vert || HASERROR=1
$EXE -G100 spv.targetOpenGL.vert || HASERROR=1 $EXE -G100 spv.targetOpenGL.vert || HASERROR=1

View File

@ -1,3 +1,3 @@
// This header is generated by the make-revision script. // This header is generated by the make-revision script.
#define GLSLANG_PATCH_LEVEL 3500 #define GLSLANG_PATCH_LEVEL 3559

View File

@ -690,7 +690,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
// //
// double functions added to desktop 4.00, but not fma, frexp, ldexp, or pack/unpack // double functions added to desktop 4.00, but not fma, frexp, ldexp, or pack/unpack
// //
if (profile != EEsProfile && version >= 400) { if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append( commonBuiltins.append(
"double sqrt(double);" "double sqrt(double);"
@ -1298,8 +1298,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"vec3 fma(vec3, vec3, vec3 );" "vec3 fma(vec3, vec3, vec3 );"
"vec4 fma(vec4, vec4, vec4 );" "vec4 fma(vec4, vec4, vec4 );"
"\n"); "\n");
}
if (profile != EEsProfile) { if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append( commonBuiltins.append(
"double fma(double, double, double);" "double fma(double, double, double);"
"dvec2 fma(dvec2, dvec2, dvec2 );" "dvec2 fma(dvec2, dvec2, dvec2 );"
@ -1307,7 +1308,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"dvec4 fma(dvec4, dvec4, dvec4 );" "dvec4 fma(dvec4, dvec4, dvec4 );"
"\n"); "\n");
} }
}
if ((profile == EEsProfile && version >= 310) || if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 400)) { (profile != EEsProfile && version >= 400)) {
@ -1325,7 +1325,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n"); "\n");
} }
if (profile != EEsProfile && version >= 400) { if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append( commonBuiltins.append(
"double frexp(double, out int);" "double frexp(double, out int);"
"dvec2 frexp( dvec2, out ivec2);" "dvec2 frexp( dvec2, out ivec2);"
@ -5178,18 +5178,24 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"flat in int gl_PrimitiveID;" "flat in int gl_PrimitiveID;"
); );
if (version >= 400) { if (version >= 130) { // ARB_sample_shading
stageBuiltins[EShLangFragment].append( stageBuiltins[EShLangFragment].append(
"flat in int gl_SampleID;" "flat in int gl_SampleID;"
" in vec2 gl_SamplePosition;" " in vec2 gl_SamplePosition;"
"flat in int gl_SampleMaskIn[];"
" out int gl_SampleMask[];" " out int gl_SampleMask[];"
); );
if (spvVersion.spv == 0)
if (spvVersion.spv == 0) {
stageBuiltins[EShLangFragment].append( stageBuiltins[EShLangFragment].append(
"uniform int gl_NumSamples;" "uniform int gl_NumSamples;"
); );
} }
}
if (version >= 400)
stageBuiltins[EShLangFragment].append(
"flat in int gl_SampleMaskIn[];"
);
if (version >= 430) if (version >= 430)
stageBuiltins[EShLangFragment].append( stageBuiltins[EShLangFragment].append(
@ -6621,6 +6627,14 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
} else { } else {
// non-ES profile // non-ES profile
if (version > 400) {
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformVectors = %d;", resources.maxVertexUniformVectors);
s.append(builtInConstant);
snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors);
s.append(builtInConstant);
}
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs); snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs);
s.append(builtInConstant); s.append(builtInConstant);
@ -7422,12 +7436,22 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable); BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
} }
if ((profile != EEsProfile && version >= 400) || if ((profile != EEsProfile && version >= 130) ||
(profile == EEsProfile && version >= 310)) { (profile == EEsProfile && version >= 310)) {
BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable); BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable); BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable);
BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable);
BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable); BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable);
if (profile != EEsProfile && version < 400) {
BuiltInVariable("gl_NumSamples", EbvSampleMask, symbolTable);
symbolTable.setVariableExtensions("gl_SampleMask", 1, &E_GL_ARB_sample_shading);
symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_ARB_sample_shading);
symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_ARB_sample_shading);
symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_ARB_sample_shading);
} else {
BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable);
if (profile == EEsProfile && version < 320) { if (profile == EEsProfile && version < 320) {
symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_OES_sample_variables);
symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables);
@ -7436,6 +7460,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_OES_sample_variables);
} }
} }
}
BuiltInVariable("gl_Layer", EbvLayer, symbolTable); BuiltInVariable("gl_Layer", EbvLayer, symbolTable);
BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable); BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable);

View File

@ -6035,6 +6035,10 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
offset = qualifier.layoutOffset; offset = qualifier.layoutOffset;
else else
offset = atomicUintOffsets[qualifier.layoutBinding]; offset = atomicUintOffsets[qualifier.layoutBinding];
if (offset % 4 != 0)
error(loc, "atomic counters offset should align based on 4:", "offset", "%d", offset);
symbol.getWritableType().getQualifier().layoutOffset = offset; symbol.getWritableType().getQualifier().layoutOffset = offset;
// Check for overlap // Check for overlap
@ -6087,7 +6091,7 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct
if (isEsProfile() || version < 120) if (isEsProfile() || version < 120)
function = findFunctionExact(loc, call, builtIn); function = findFunctionExact(loc, call, builtIn);
else if (version < 400) else if (version < 400)
function = findFunction120(loc, call, builtIn); function = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn);
else if (explicitTypesEnabled) else if (explicitTypesEnabled)
function = findFunctionExplicitTypes(loc, call, builtIn); function = findFunctionExplicitTypes(loc, call, builtIn);
else else
@ -6380,13 +6384,15 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc,
void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType)
{ {
#ifndef GLSLANG_WEB #ifndef GLSLANG_WEB
if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding() && if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding()) {
publicType.qualifier.hasOffset()) {
if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
error(loc, "atomic_uint binding is too large", "binding", ""); error(loc, "atomic_uint binding is too large", "binding", "");
return; return;
} }
if(publicType.qualifier.hasOffset()) {
atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset; atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset;
}
return; return;
} }
@ -7609,7 +7615,7 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
switch (qualifier.storage) { switch (qualifier.storage) {
case EvqUniform: case EvqUniform:
profileRequires(loc, EEsProfile, 300, nullptr, "uniform block"); profileRequires(loc, EEsProfile, 300, nullptr, "uniform block");
profileRequires(loc, ENoProfile, 140, nullptr, "uniform block"); profileRequires(loc, ENoProfile, 140, E_GL_ARB_uniform_buffer_object, "uniform block");
if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.isPushConstant()) if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.isPushConstant())
requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "std430 requires the buffer storage qualifier"); requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "std430 requires the buffer storage qualifier");
break; break;

View File

@ -1166,7 +1166,10 @@ int TScanContext::tokenizeIdentifier()
case DVEC3: case DVEC3:
case DVEC4: case DVEC4:
afterType = true; afterType = true;
if (parseContext.isEsProfile() || parseContext.version < 400) if (parseContext.isEsProfile() || parseContext.version < 150 ||
(!parseContext.symbolTable.atBuiltInLevel() &&
parseContext.version < 400 &&
!parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64)))
reservedWord(); reservedWord();
return keyword; return keyword;
@ -1421,6 +1424,9 @@ int TScanContext::tokenizeIdentifier()
afterType = true; afterType = true;
if (parseContext.isEsProfile() && parseContext.version >= 310) if (parseContext.isEsProfile() && parseContext.version >= 310)
return keyword; return keyword;
if (!parseContext.isEsProfile() && (parseContext.version > 140 ||
(parseContext.version == 140 && parseContext.extensionsTurnedOn(1, &E_GL_ARB_texture_multisample))))
return keyword;
return es30ReservedFromGLSL(150); return es30ReservedFromGLSL(150);
case SAMPLER2DMSARRAY: case SAMPLER2DMSARRAY:
@ -1430,6 +1436,9 @@ int TScanContext::tokenizeIdentifier()
if ((parseContext.isEsProfile() && parseContext.version >= 320) || if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array)) parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array))
return keyword; return keyword;
if (!parseContext.isEsProfile() && (parseContext.version > 140 ||
(parseContext.version == 140 && parseContext.extensionsTurnedOn(1, &E_GL_ARB_texture_multisample))))
return keyword;
return es30ReservedFromGLSL(150); return es30ReservedFromGLSL(150);
case SAMPLER1D: case SAMPLER1D:
@ -1735,7 +1744,9 @@ int TScanContext::dMat()
return keyword; return keyword;
} }
if (!parseContext.isEsProfile() && parseContext.version >= 400) if (!parseContext.isEsProfile() && (parseContext.version >= 400 ||
parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64))))
return keyword; return keyword;
if (parseContext.isForwardCompatible()) if (parseContext.isForwardCompatible())

View File

@ -172,6 +172,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_ARB_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_ARB_tessellation_shader] = EBhDisable;
extensionBehavior[E_GL_ARB_enhanced_layouts] = EBhDisable; extensionBehavior[E_GL_ARB_enhanced_layouts] = EBhDisable;
extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable; extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable;
extensionBehavior[E_GL_ARB_texture_multisample] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable;
extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable; extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable;
extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable; extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable;
@ -183,6 +184,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_ARB_shader_texture_image_samples] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_image_samples] = EBhDisable;
extensionBehavior[E_GL_ARB_viewport_array] = EBhDisable; extensionBehavior[E_GL_ARB_viewport_array] = EBhDisable;
extensionBehavior[E_GL_ARB_gpu_shader_int64] = EBhDisable; extensionBehavior[E_GL_ARB_gpu_shader_int64] = EBhDisable;
extensionBehavior[E_GL_ARB_gpu_shader_fp64] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_ballot] = EBhDisable; extensionBehavior[E_GL_ARB_shader_ballot] = EBhDisable;
extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable;
extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable;
@ -192,6 +194,8 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_ARB_shader_viewport_layer_array] = EBhDisable; extensionBehavior[E_GL_ARB_shader_viewport_layer_array] = EBhDisable;
extensionBehavior[E_GL_ARB_fragment_shader_interlock] = EBhDisable; extensionBehavior[E_GL_ARB_fragment_shader_interlock] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_clock] = EBhDisable; extensionBehavior[E_GL_ARB_shader_clock] = EBhDisable;
extensionBehavior[E_GL_ARB_uniform_buffer_object] = EBhDisable;
extensionBehavior[E_GL_ARB_sample_shading] = EBhDisable;
extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable;
extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable;
@ -335,7 +339,6 @@ void TParseVersions::getPreamble(std::string& preamble)
// AEP // AEP
"#define GL_ANDROID_extension_pack_es31a 1\n" "#define GL_ANDROID_extension_pack_es31a 1\n"
"#define GL_KHR_blend_equation_advanced 1\n"
"#define GL_OES_sample_variables 1\n" "#define GL_OES_sample_variables 1\n"
"#define GL_OES_shader_image_atomic 1\n" "#define GL_OES_shader_image_atomic 1\n"
"#define GL_OES_shader_multisample_interpolation 1\n" "#define GL_OES_shader_multisample_interpolation 1\n"
@ -379,6 +382,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_ARB_tessellation_shader 1\n" "#define GL_ARB_tessellation_shader 1\n"
"#define GL_ARB_enhanced_layouts 1\n" "#define GL_ARB_enhanced_layouts 1\n"
"#define GL_ARB_texture_cube_map_array 1\n" "#define GL_ARB_texture_cube_map_array 1\n"
"#define GL_ARB_texture_multisample 1\n"
"#define GL_ARB_shader_texture_lod 1\n" "#define GL_ARB_shader_texture_lod 1\n"
"#define GL_ARB_explicit_attrib_location 1\n" "#define GL_ARB_explicit_attrib_location 1\n"
"#define GL_ARB_explicit_uniform_location 1\n" "#define GL_ARB_explicit_uniform_location 1\n"
@ -390,13 +394,16 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_ARB_shader_texture_image_samples 1\n" "#define GL_ARB_shader_texture_image_samples 1\n"
"#define GL_ARB_viewport_array 1\n" "#define GL_ARB_viewport_array 1\n"
"#define GL_ARB_gpu_shader_int64 1\n" "#define GL_ARB_gpu_shader_int64 1\n"
"#define GL_ARB_gpu_shader_fp64 1\n"
"#define GL_ARB_shader_ballot 1\n" "#define GL_ARB_shader_ballot 1\n"
"#define GL_ARB_sparse_texture2 1\n" "#define GL_ARB_sparse_texture2 1\n"
"#define GL_ARB_sparse_texture_clamp 1\n" "#define GL_ARB_sparse_texture_clamp 1\n"
"#define GL_ARB_shader_stencil_export 1\n" "#define GL_ARB_shader_stencil_export 1\n"
"#define GL_ARB_sample_shading 1\n"
// "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members // "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members
"#define GL_ARB_post_depth_coverage 1\n" "#define GL_ARB_post_depth_coverage 1\n"
"#define GL_ARB_fragment_shader_interlock 1\n" "#define GL_ARB_fragment_shader_interlock 1\n"
"#define GL_ARB_uniform_buffer_object 1\n"
"#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n"
"#define GL_EXT_shader_image_load_formatted 1\n" "#define GL_EXT_shader_image_load_formatted 1\n"
"#define GL_EXT_post_depth_coverage 1\n" "#define GL_EXT_post_depth_coverage 1\n"
@ -499,6 +506,7 @@ void TParseVersions::getPreamble(std::string& preamble)
preamble += preamble +=
"#define GL_GOOGLE_cpp_style_line_directive 1\n" "#define GL_GOOGLE_cpp_style_line_directive 1\n"
"#define GL_GOOGLE_include_directive 1\n" "#define GL_GOOGLE_include_directive 1\n"
"#define GL_KHR_blend_equation_advanced 1\n"
; ;
#endif #endif
@ -919,8 +927,8 @@ void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
// Call for any operation needing GLSL double data-type support. // Call for any operation needing GLSL double data-type support.
void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op) void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op)
{ {
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); //requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader_fp64, op);
} }
// Call for any operation needing GLSL float16 data-type support. // Call for any operation needing GLSL float16 data-type support.

View File

@ -124,6 +124,7 @@ const char* const E_GL_ARB_compute_shader = "GL_ARB_compute_shader
const char* const E_GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader"; const char* const E_GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader";
const char* const E_GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layouts"; const char* const E_GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layouts";
const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array"; const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array";
const char* const E_GL_ARB_texture_multisample = "GL_ARB_texture_multisample";
const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod"; const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod";
const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location"; const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location";
const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location"; const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location";
@ -135,6 +136,7 @@ const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_con
const char* const E_GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples"; const char* const E_GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples";
const char* const E_GL_ARB_viewport_array = "GL_ARB_viewport_array"; const char* const E_GL_ARB_viewport_array = "GL_ARB_viewport_array";
const char* const E_GL_ARB_gpu_shader_int64 = "GL_ARB_gpu_shader_int64"; const char* const E_GL_ARB_gpu_shader_int64 = "GL_ARB_gpu_shader_int64";
const char* const E_GL_ARB_gpu_shader_fp64 = "GL_ARB_gpu_shader_fp64";
const char* const E_GL_ARB_shader_ballot = "GL_ARB_shader_ballot"; const char* const E_GL_ARB_shader_ballot = "GL_ARB_shader_ballot";
const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2"; const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2";
const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp"; const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp";
@ -144,6 +146,8 @@ const char* const E_GL_ARB_post_depth_coverage = "GL_ARB_post_depth_cov
const char* const E_GL_ARB_shader_viewport_layer_array = "GL_ARB_shader_viewport_layer_array"; const char* const E_GL_ARB_shader_viewport_layer_array = "GL_ARB_shader_viewport_layer_array";
const char* const E_GL_ARB_fragment_shader_interlock = "GL_ARB_fragment_shader_interlock"; const char* const E_GL_ARB_fragment_shader_interlock = "GL_ARB_fragment_shader_interlock";
const char* const E_GL_ARB_shader_clock = "GL_ARB_shader_clock"; const char* const E_GL_ARB_shader_clock = "GL_ARB_shader_clock";
const char* const E_GL_ARB_uniform_buffer_object = "GL_ARB_uniform_buffer_object";
const char* const E_GL_ARB_sample_shading = "GL_ARB_sample_shading";
const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic"; const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote"; const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";

View File

@ -402,6 +402,8 @@ GLSLANG_WEB_EXCLUDE_ON
$$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true);
} }
| DOUBLECONSTANT { | DOUBLECONSTANT {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double literal");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double literal"); parseContext.doubleCheck($1.loc, "double literal");
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true);
} }
@ -1751,6 +1753,8 @@ type_specifier_nonarray
} }
GLSLANG_WEB_EXCLUDE_ON GLSLANG_WEB_EXCLUDE_ON
| DOUBLE { | DOUBLE {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double"); parseContext.doubleCheck($1.loc, "double");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
@ -1811,18 +1815,24 @@ GLSLANG_WEB_EXCLUDE_ON
$$.basicType = EbtUint64; $$.basicType = EbtUint64;
} }
| DVEC2 { | DVEC2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setVector(2); $$.setVector(2);
} }
| DVEC3 { | DVEC3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setVector(3); $$.setVector(3);
} }
| DVEC4 { | DVEC4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
@ -2027,72 +2037,96 @@ GLSLANG_WEB_EXCLUDE_ON
$$.setVector(4); $$.setVector(4);
} }
| DMAT2 { | DMAT2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
} }
| DMAT3 { | DMAT3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
} }
| DMAT4 { | DMAT4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
} }
| DMAT2X2 { | DMAT2X2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
} }
| DMAT2X3 { | DMAT2X3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 3); $$.setMatrix(2, 3);
} }
| DMAT2X4 { | DMAT2X4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 4); $$.setMatrix(2, 4);
} }
| DMAT3X2 { | DMAT3X2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 2); $$.setMatrix(3, 2);
} }
| DMAT3X3 { | DMAT3X3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
} }
| DMAT3X4 { | DMAT3X4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 4); $$.setMatrix(3, 4);
} }
| DMAT4X2 { | DMAT4X2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 2); $$.setMatrix(4, 2);
} }
| DMAT4X3 { | DMAT4X3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 3); $$.setMatrix(4, 3);
} }
| DMAT4X4 { | DMAT4X4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;

View File

@ -402,6 +402,8 @@ primary_expression
$$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true);
} }
| DOUBLECONSTANT { | DOUBLECONSTANT {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double literal");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double literal"); parseContext.doubleCheck($1.loc, "double literal");
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true);
} }
@ -1751,6 +1753,8 @@ type_specifier_nonarray
} }
| DOUBLE { | DOUBLE {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double"); parseContext.doubleCheck($1.loc, "double");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
@ -1811,18 +1815,24 @@ type_specifier_nonarray
$$.basicType = EbtUint64; $$.basicType = EbtUint64;
} }
| DVEC2 { | DVEC2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setVector(2); $$.setVector(2);
} }
| DVEC3 { | DVEC3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setVector(3); $$.setVector(3);
} }
| DVEC4 { | DVEC4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
@ -2027,72 +2037,96 @@ type_specifier_nonarray
$$.setVector(4); $$.setVector(4);
} }
| DMAT2 { | DMAT2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
} }
| DMAT3 { | DMAT3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
} }
| DMAT4 { | DMAT4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
} }
| DMAT2X2 { | DMAT2X2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
} }
| DMAT2X3 { | DMAT2X3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 3); $$.setMatrix(2, 3);
} }
| DMAT2X4 { | DMAT2X4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 4); $$.setMatrix(2, 4);
} }
| DMAT3X2 { | DMAT3X2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 2); $$.setMatrix(3, 2);
} }
| DMAT3X3 { | DMAT3X3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
} }
| DMAT3X4 { | DMAT3X4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 4); $$.setMatrix(3, 4);
} }
| DMAT4X2 { | DMAT4X2 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 2); $$.setMatrix(4, 2);
} }
| DMAT4X3 { | DMAT4X3 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 3); $$.setMatrix(4, 3);
} }
| DMAT4X4 { | DMAT4X4 {
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;

View File

@ -4279,6 +4279,8 @@ yyreduce:
case 15: case 15:
#line 404 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 404 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true);
} }
@ -6498,6 +6500,8 @@ yyreduce:
case 228: case 228:
#line 1753 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 1753 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -6618,6 +6622,8 @@ yyreduce:
case 240: case 240:
#line 1813 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 1813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -6629,6 +6635,8 @@ yyreduce:
case 241: case 241:
#line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -6640,6 +6648,8 @@ yyreduce:
case 242: case 242:
#line 1825 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 1825 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7014,6 +7024,8 @@ yyreduce:
case 276: case 276:
#line 2029 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2029 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7025,6 +7037,8 @@ yyreduce:
case 277: case 277:
#line 2035 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2035 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7036,6 +7050,8 @@ yyreduce:
case 278: case 278:
#line 2041 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2041 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7047,6 +7063,8 @@ yyreduce:
case 279: case 279:
#line 2047 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2047 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7058,6 +7076,8 @@ yyreduce:
case 280: case 280:
#line 2053 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2053 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7069,6 +7089,8 @@ yyreduce:
case 281: case 281:
#line 2059 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2059 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7080,6 +7102,8 @@ yyreduce:
case 282: case 282:
#line 2065 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2065 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7091,6 +7115,8 @@ yyreduce:
case 283: case 283:
#line 2071 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2071 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7102,6 +7128,8 @@ yyreduce:
case 284: case 284:
#line 2077 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7113,6 +7141,8 @@ yyreduce:
case 285: case 285:
#line 2083 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2083 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7124,6 +7154,8 @@ yyreduce:
case 286: case 286:
#line 2089 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2089 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;
@ -7135,6 +7167,8 @@ yyreduce:
case 287: case 287:
#line 2095 "MachineIndependent/glslang.y" /* yacc.c:1646 */ #line 2095 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ {
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).basicType = EbtDouble;

View File

@ -831,6 +831,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) { if (iter->second != location) {
TString errorMsg = "Invalid location: " + name; TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
} }
} }
} }
@ -856,6 +857,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) { if (iter->second != location) {
TString errorMsg = "Invalid location: " + name; TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
} }
} }
} }
@ -884,6 +886,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != binding) { if (iter->second != binding) {
TString errorMsg = "Invalid binding: " + name; TString errorMsg = "Invalid binding: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
} }
} }
} }

View File

@ -129,6 +129,7 @@ public:
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage); uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
TSlotSetMap slots; TSlotSetMap slots;
bool hasError = false;
protected: protected:
TDefaultIoResolverBase(TDefaultIoResolverBase&); TDefaultIoResolverBase(TDefaultIoResolverBase&);

View File

@ -332,6 +332,9 @@ public:
case EShTargetVulkan_1_1: case EShTargetVulkan_1_1:
processes.addProcess("target-env vulkan1.1"); processes.addProcess("target-env vulkan1.1");
break; break;
case EShTargetVulkan_1_2:
processes.addProcess("target-env vulkan1.2");
break;
default: default:
processes.addProcess("target-env vulkanUnknown"); processes.addProcess("target-env vulkanUnknown");
break; break;

View File

@ -145,6 +145,7 @@ typedef enum {
typedef enum { typedef enum {
EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0 EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1 EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2
EShTargetOpenGL_450 = 450, // OpenGL EShTargetOpenGL_450 = 450, // OpenGL
} EShTargetClientVersion; } EShTargetClientVersion;

View File

@ -2516,6 +2516,8 @@ bool HlslGrammar::acceptMemberFunctionDefinition(TIntermNode*& nodeList, const T
// //
bool HlslGrammar::acceptFunctionParameters(TFunction& function) bool HlslGrammar::acceptFunctionParameters(TFunction& function)
{ {
parseContext.beginParameterParsing(function);
// LEFT_PAREN // LEFT_PAREN
if (! acceptTokenClass(EHTokLeftParen)) if (! acceptTokenClass(EHTokLeftParen))
return false; return false;

View File

@ -69,7 +69,8 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
clipDistanceOutput(nullptr), clipDistanceOutput(nullptr),
cullDistanceOutput(nullptr), cullDistanceOutput(nullptr),
clipDistanceInput(nullptr), clipDistanceInput(nullptr),
cullDistanceInput(nullptr) cullDistanceInput(nullptr),
parsingEntrypointParameters(false)
{ {
globalUniformDefaults.clear(); globalUniformDefaults.clear();
globalUniformDefaults.layoutMatrix = ElmRowMajor; globalUniformDefaults.layoutMatrix = ElmRowMajor;
@ -2049,7 +2050,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
}; };
// if we aren't in the entry point, fix the IO as such and exit // if we aren't in the entry point, fix the IO as such and exit
if (userFunction.getName().compare(intermediate.getEntryPointName().c_str()) != 0) { if (! isEntrypointName(userFunction.getName())) {
remapNonEntryPointIO(userFunction); remapNonEntryPointIO(userFunction);
return nullptr; return nullptr;
} }
@ -8884,6 +8885,10 @@ void HlslParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier
// //
bool HlslParseContext::handleInputGeometry(const TSourceLoc& loc, const TLayoutGeometry& geometry) bool HlslParseContext::handleInputGeometry(const TSourceLoc& loc, const TLayoutGeometry& geometry)
{ {
// these can be declared on non-entry-points, in which case they lose their meaning
if (! parsingEntrypointParameters)
return true;
switch (geometry) { switch (geometry) {
case ElgPoints: // fall through case ElgPoints: // fall through
case ElgLines: // ... case ElgLines: // ...
@ -8914,6 +8919,10 @@ bool HlslParseContext::handleOutputGeometry(const TSourceLoc& loc, const TLayout
if (language != EShLangGeometry) if (language != EShLangGeometry)
return true; return true;
// these can be declared on non-entry-points, in which case they lose their meaning
if (! parsingEntrypointParameters)
return true;
switch (geometry) { switch (geometry) {
case ElgPoints: case ElgPoints:
case ElgLineStrip: case ElgLineStrip:

View File

@ -183,6 +183,11 @@ public:
void getFullNamespaceName(TString*&) const; void getFullNamespaceName(TString*&) const;
void addScopeMangler(TString&); void addScopeMangler(TString&);
void beginParameterParsing(TFunction& function)
{
parsingEntrypointParameters = isEntrypointName(function.getName());
}
void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); } void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); }
void popSwitchSequence() { switchSequenceStack.pop_back(); } void popSwitchSequence() { switchSequenceStack.pop_back(); }
@ -241,6 +246,7 @@ protected:
TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit);
bool isScalarConstructor(const TIntermNode*); bool isScalarConstructor(const TIntermNode*);
TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage); TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage);
bool isEntrypointName(const TString& name) { return name.compare(intermediate.getEntryPointName().c_str()) == 0; }
// Return true if this node requires L-value conversion (e.g, to an imageStore). // Return true if this node requires L-value conversion (e.g, to an imageStore).
bool shouldConvertLValue(const TIntermNode*) const; bool shouldConvertLValue(const TIntermNode*) const;
@ -494,6 +500,7 @@ protected:
}; };
TMap<int, tShadowTextureSymbols*> textureShadowVariant; TMap<int, tShadowTextureSymbols*> textureShadowVariant;
bool parsingEntrypointParameters;
}; };
// This is the prefix we use for built-in methods to avoid namespace collisions with // This is the prefix we use for built-in methods to avoid namespace collisions with

View File

@ -5,7 +5,7 @@
"site" : "github", "site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools", "subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools", "subdir" : "External/spirv-tools",
"commit" : "5c019b5923c1f6bf00a3ac28114ec4a7b1faa0e2" "commit" : "323a81fc5e30e43a04e5e22af4cba98ca2a161e6"
}, },
{ {
"name" : "spirv-tools/external/spirv-headers", "name" : "spirv-tools/external/spirv-headers",