diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-09-22 12:40:17 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-09-22 12:56:15 +0200 |
commit | fd641ac85c6170c34845db5e345d3bf9cedce8d7 (patch) | |
tree | c8bc0b91e3cb2b81fa8560d9a7d6b3763561ef40 /thirdparty/glslang | |
parent | 211cb401db71021beef5b475e52fd6ea8a161777 (diff) |
Vulkan: Update volk and Vulkan SDK components to 1.2.190
Diffstat (limited to 'thirdparty/glslang')
48 files changed, 8464 insertions, 3475 deletions
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h index 20b9e54014..f48f1304d6 100644 --- a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h +++ b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h @@ -36,6 +36,8 @@ static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fu static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density"; static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation"; static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add"; +static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add"; +static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max"; static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64"; #endif // #ifndef GLSLextEXT_H diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h index 9610c6eeee..5eb3e94482 100644 --- a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h +++ b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h @@ -50,5 +50,7 @@ static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_t static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query"; static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragment_shading_rate"; static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation"; +static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout"; +static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow"; #endif // #ifndef GLSLextKHR_H diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.NV.h b/thirdparty/glslang/SPIRV/GLSL.ext.NV.h index 50146da104..93c98bf626 100644 --- a/thirdparty/glslang/SPIRV/GLSL.ext.NV.h +++ b/thirdparty/glslang/SPIRV/GLSL.ext.NV.h @@ -69,6 +69,9 @@ const char* const E_SPV_NV_mesh_shader = "SPV_NV_mesh_shader"; //SPV_NV_raytracing const char* const E_SPV_NV_ray_tracing = "SPV_NV_ray_tracing"; +//SPV_NV_ray_tracing_motion_blur +const char* const E_SPV_NV_ray_tracing_motion_blur = "SPV_NV_ray_tracing_motion_blur"; + //SPV_NV_shading_rate const char* const E_SPV_NV_shading_rate = "SPV_NV_shading_rate"; diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp index 1adebef878..c323bcdb09 100644 --- a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -160,6 +160,7 @@ protected: spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const; spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector<unsigned int>& operands) const; spv::StorageClass TranslateStorageClass(const glslang::TType&); + void TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>&, std::vector<unsigned>&) const; void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType); spv::Id createSpvVariable(const glslang::TIntermSymbol*, spv::Id forcedType); spv::Id getSampledType(const glslang::TSampler&); @@ -178,6 +179,7 @@ protected: spv::Id accessChainLoad(const glslang::TType& type); void accessChainStore(const glslang::TType& type, spv::Id rvalue); void multiTypeStore(const glslang::TType&, spv::Id rValue); + spv::Id convertLoadedBoolInUniformToUint(const glslang::TType& type, spv::Id nominalTypeId, spv::Id loadedId); glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const; int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix); int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix); @@ -255,17 +257,17 @@ protected: bool nanMinMaxClamp; // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp spv::Id stdBuiltins; spv::Id nonSemanticDebugPrintf; - std::unordered_map<const char*, spv::Id> extBuiltinMap; + std::unordered_map<std::string, spv::Id> extBuiltinMap; - std::unordered_map<int, spv::Id> symbolValues; - std::unordered_set<int> rValueParameters; // set of formal function parameters passed as rValues, + std::unordered_map<long long, spv::Id> symbolValues; + std::unordered_set<long long> rValueParameters; // set of formal function parameters passed as rValues, // rather than a pointer std::unordered_map<std::string, spv::Function*> functionMap; 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): - std::unordered_map<int, std::vector<int>> memberRemapper; + std::unordered_map<long long, std::vector<int>> memberRemapper; // for mapping glslang symbol struct to symbol Id - std::unordered_map<const glslang::TTypeList*, int> glslangTypeToIdMap; + std::unordered_map<const glslang::TTypeList*, long long> glslangTypeToIdMap; std::stack<bool> breakForLoop; // false means break for switch std::unordered_map<std::string, const glslang::TIntermSymbol*> counterOriginator; // Map pointee types for EbtReference to their forward pointers @@ -380,6 +382,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock; case glslang::EvqVaryingIn: return spv::DecorationBlock; case glslang::EvqVaryingOut: return spv::DecorationBlock; + case glslang::EvqShared: return spv::DecorationBlock; #ifndef GLSLANG_WEB case glslang::EvqPayload: return spv::DecorationBlock; case glslang::EvqPayloadIn: return spv::DecorationBlock; @@ -436,6 +439,7 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T break; case glslang::EbtBlock: switch (type.getQualifier().storage) { + case glslang::EvqShared: case glslang::EvqUniform: case glslang::EvqBuffer: switch (type.getQualifier().layoutPacking) { @@ -1029,6 +1033,10 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInIncomingRayFlagsKHR; case glslang::EbvGeometryIndex: return spv::BuiltInRayGeometryIndexKHR; + case glslang::EbvCurrentRayTimeNV: + builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur); + builder.addCapability(spv::CapabilityRayTracingMotionBlurNV); + return spv::BuiltInCurrentRayTimeNV; // barycentrics case glslang::EbvBaryCoordNV: @@ -1247,6 +1255,10 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T { if (type.getBasicType() == glslang::EbtRayQuery) return spv::StorageClassPrivate; +#ifndef GLSLANG_WEB + if (type.getQualifier().isSpirvByReference()) + return spv::StorageClassFunction; +#endif if (type.getQualifier().isPipeInput()) return spv::StorageClassInput; if (type.getQualifier().isPipeOutput()) @@ -1278,6 +1290,12 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T return spv::StorageClassUniformConstant; } + if (type.getQualifier().storage == glslang::EvqShared && type.getBasicType() == glslang::EbtBlock) { + builder.addExtension(spv::E_SPV_KHR_workgroup_memory_explicit_layout); + builder.addCapability(spv::CapabilityWorkgroupMemoryExplicitLayoutKHR); + return spv::StorageClassWorkgroup; + } + switch (type.getQualifier().storage) { case glslang::EvqGlobal: return spv::StorageClassPrivate; case glslang::EvqConstReadOnly: return spv::StorageClassFunction; @@ -1289,6 +1307,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR; case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR; case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR; + case glslang::EvqSpirvStorageClass: return static_cast<spv::StorageClass>(type.getQualifier().spirvStorageClass); #endif default: assert(0); @@ -1298,6 +1317,52 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T return spv::StorageClassFunction; } +// Translate glslang constants to SPIR-V literals +void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>& constants, + std::vector<unsigned>& literals) const +{ + for (auto constant : constants) { + if (constant->getBasicType() == glslang::EbtFloat) { + float floatValue = static_cast<float>(constant->getConstArray()[0].getDConst()); + unsigned literal = *reinterpret_cast<unsigned*>(&floatValue); + literals.push_back(literal); + } else if (constant->getBasicType() == glslang::EbtInt) { + unsigned literal = constant->getConstArray()[0].getIConst(); + literals.push_back(literal); + } else if (constant->getBasicType() == glslang::EbtUint) { + unsigned literal = constant->getConstArray()[0].getUConst(); + literals.push_back(literal); + } else if (constant->getBasicType() == glslang::EbtBool) { + unsigned literal = constant->getConstArray()[0].getBConst(); + literals.push_back(literal); + } else if (constant->getBasicType() == glslang::EbtString) { + auto str = constant->getConstArray()[0].getSConst()->c_str(); + unsigned literal = 0; + char* literalPtr = reinterpret_cast<char*>(&literal); + unsigned charCount = 0; + char ch = 0; + do { + ch = *(str++); + *(literalPtr++) = ch; + ++charCount; + if (charCount == 4) { + literals.push_back(literal); + literalPtr = reinterpret_cast<char*>(&literal); + charCount = 0; + } + } while (ch != 0); + + // Partial literal is padded with 0 + if (charCount > 0) { + for (; charCount < 4; ++charCount) + *(literalPtr++) = 0; + literals.push_back(literal); + } + } else + assert(0); // Unexpected type + } +} + // Add capabilities pertaining to how an array is indexed. void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType) @@ -1485,7 +1550,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, if (glslangIntermediate->usingPhysicalStorageBuffer()) { addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT; - builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5); + builder.addIncorporatedExtension(spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5); builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT); } if (glslangIntermediate->usingVulkanMemoryModel()) { @@ -1518,6 +1583,13 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR); } +#ifndef GLSLANG_WEB + if (glslangIntermediate->getSubgroupUniformControlFlow()) { + builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeSubgroupUniformControlFlowKHR); + } +#endif + unsigned int mode; switch (glslangIntermediate->getStage()) { case EShLangVertex: @@ -1543,15 +1615,16 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExtension(spv::E_SPV_KHR_post_depth_coverage); } - if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing()) + if (glslangIntermediate->isDepthReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing); #ifndef GLSLANG_WEB switch(glslangIntermediate->getDepth()) { - case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break; - case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break; - default: mode = spv::ExecutionModeMax; break; + case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break; + case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break; + case glslang::EldUnchanged: mode = spv::ExecutionModeDepthUnchanged; break; + default: mode = spv::ExecutionModeMax; break; } if (mode != spv::ExecutionModeMax) builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode); @@ -1719,6 +1792,53 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, default: break; } + +#ifndef GLSLANG_WEB + // + // Add SPIR-V requirements (GL_EXT_spirv_intrinsics) + // + if (glslangIntermediate->hasSpirvRequirement()) { + const glslang::TSpirvRequirement& spirvRequirement = glslangIntermediate->getSpirvRequirement(); + + // Add SPIR-V extension requirement + for (auto& extension : spirvRequirement.extensions) + builder.addExtension(extension.c_str()); + + // Add SPIR-V capability requirement + for (auto capability : spirvRequirement.capabilities) + builder.addCapability(static_cast<spv::Capability>(capability)); + } + + // + // Add SPIR-V execution mode qualifiers (GL_EXT_spirv_intrinsics) + // + if (glslangIntermediate->hasSpirvExecutionMode()) { + const glslang::TSpirvExecutionMode spirvExecutionMode = glslangIntermediate->getSpirvExecutionMode(); + + // Add spirv_execution_mode + for (auto& mode : spirvExecutionMode.modes) { + if (!mode.second.empty()) { + std::vector<unsigned> literals; + TranslateLiterals(mode.second, literals); + builder.addExecutionMode(shaderEntry, static_cast<spv::ExecutionMode>(mode.first), literals); + } else + builder.addExecutionMode(shaderEntry, static_cast<spv::ExecutionMode>(mode.first)); + } + + // Add spirv_execution_mode_id + for (auto& modeId : spirvExecutionMode.modeIds) { + std::vector<spv::Id> operandIds; + assert(!modeId.second.empty()); + for (auto extraOperand : modeId.second) { + int nextConst = 0; + spv::Id operandId = createSpvConstantFromConstUnionArray( + extraOperand->getType(), extraOperand->getConstArray(), nextConst, false); + operandIds.push_back(operandId); + } + builder.addExecutionModeId(shaderEntry, static_cast<spv::ExecutionMode>(modeId.first), operandIds); + } + } +#endif } // Finish creating SPV, after the traversal is complete. @@ -1986,7 +2106,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T { // This may be, e.g., an anonymous block-member selection, which generally need // index remapping due to hidden members in anonymous blocks. - int glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()]; + long long glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()]; if (memberRemapper.find(glslangId) != memberRemapper.end()) { std::vector<int>& remapper = memberRemapper[glslangId]; assert(remapper.size() > 0); @@ -2116,6 +2236,49 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T } } +spv::Id TGlslangToSpvTraverser::convertLoadedBoolInUniformToUint(const glslang::TType& type, + spv::Id nominalTypeId, + spv::Id loadedId) +{ + if (builder.isScalarType(nominalTypeId)) { + // Conversion for bool + spv::Id boolType = builder.makeBoolType(); + if (nominalTypeId != boolType) + return builder.createBinOp(spv::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0)); + } else if (builder.isVectorType(nominalTypeId)) { + // Conversion for bvec + int vecSize = builder.getNumTypeComponents(nominalTypeId); + spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); + if (nominalTypeId != bvecType) + loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId, + makeSmearedConstant(builder.makeUintConstant(0), vecSize)); + } else if (builder.isArrayType(nominalTypeId)) { + // Conversion for bool array + spv::Id boolArrayTypeId = convertGlslangToSpvType(type); + if (nominalTypeId != boolArrayTypeId) + { + // Use OpCopyLogical from SPIR-V 1.4 if available. + if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4) + return builder.createUnaryOp(spv::OpCopyLogical, boolArrayTypeId, loadedId); + + glslang::TType glslangElementType(type, 0); + spv::Id elementNominalTypeId = builder.getContainedTypeId(nominalTypeId); + std::vector<spv::Id> constituents; + for (int index = 0; index < type.getOuterArraySize(); ++index) { + // get the element + spv::Id elementValue = builder.createCompositeExtract(loadedId, elementNominalTypeId, index); + + // recursively convert it + spv::Id elementConvertedValue = convertLoadedBoolInUniformToUint(glslangElementType, elementNominalTypeId, elementValue); + constituents.push_back(elementConvertedValue); + } + return builder.createCompositeConstruct(boolArrayTypeId, constituents); + } + } + + return loadedId; +} + // Figure out what, if any, type changes are needed when accessing a specific built-in. // Returns <the type SPIR-V requires for declarion, the type to translate to on use>. // Also see comment for 'forceType', regarding tracking SPIR-V-required types. @@ -2292,7 +2455,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI if (node->getOp() == glslang::EOpAtomicCounterIncrement || node->getOp() == glslang::EOpAtomicCounterDecrement || node->getOp() == glslang::EOpAtomicCounter || - node->getOp() == glslang::EOpInterpolateAtCentroid || + (node->getOp() == glslang::EOpInterpolateAtCentroid && + glslangIntermediate->getSource() != glslang::EShSourceHlsl) || node->getOp() == glslang::EOpRayQueryProceed || node->getOp() == glslang::EOpRayQueryGetRayTMin || node->getOp() == glslang::EOpRayQueryGetRayFlags || @@ -2300,10 +2464,14 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI node->getOp() == glslang::EOpRayQueryGetWorldRayDirection || node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque || node->getOp() == glslang::EOpRayQueryTerminate || - node->getOp() == glslang::EOpRayQueryConfirmIntersection) { + node->getOp() == glslang::EOpRayQueryConfirmIntersection || + (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) { operand = builder.accessChainGetLValue(); // Special case l-value operands lvalueCoherentFlags = builder.getAccessChain().coherentFlags; lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType()); + } else if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) { + // Will be translated to a literal value, make a placeholder here + operand = spv::NoResult; } else #endif { @@ -2324,6 +2492,38 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags); +#ifndef GLSLANG_WEB + // it could be attached to a SPIR-V intruction + if (!result) { + if (node->getOp() == glslang::EOpSpirvInst) { + const auto& spirvInst = node->getSpirvInstruction(); + if (spirvInst.set == "") { + spv::IdImmediate idImmOp = {true, operand}; + if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) { + // Translate the constant to a literal value + std::vector<unsigned> literals; + glslang::TVector<const glslang::TIntermConstantUnion*> constants; + constants.push_back(operandNode->getAsConstantUnion()); + TranslateLiterals(constants, literals); + idImmOp = {false, literals[0]}; + } + + if (node->getBasicType() == glslang::EbtVoid) + builder.createNoResultOp(static_cast<spv::Op>(spirvInst.id), {idImmOp}); + else + result = builder.createOp(static_cast<spv::Op>(spirvInst.id), resultType(), {idImmOp}); + } else { + result = builder.createBuiltinCall( + resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()), + spirvInst.id, {operand}); + } + + if (node->getBasicType() == glslang::EbtVoid) + return false; // done with this node + } + } +#endif + if (result) { if (invertedType) { result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result); @@ -2775,6 +2975,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; case glslang::EOpAtomicAdd: + case glslang::EOpAtomicSubtract: case glslang::EOpAtomicMin: case glslang::EOpAtomicMax: case glslang::EOpAtomicAnd: @@ -2821,6 +3022,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpIgnoreIntersectionNV: case glslang::EOpTerminateRayNV: case glslang::EOpTraceNV: + case glslang::EOpTraceRayMotionNV: case glslang::EOpTraceKHR: case glslang::EOpExecuteCallableNV: case glslang::EOpExecuteCallableKHR: @@ -2946,6 +3148,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; case glslang::EOpAtomicAdd: + case glslang::EOpAtomicSubtract: case glslang::EOpAtomicMin: case glslang::EOpAtomicMax: case glslang::EOpAtomicAnd: @@ -2966,7 +3169,13 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpInterpolateAtOffset: case glslang::EOpInterpolateAtVertex: if (arg == 0) { - lvalue = true; + // If GLSL, use the address of the interpolant argument. + // If HLSL, use an internal version of OpInterolates that takes + // the rvalue of the interpolant. A fixup pass in spirv-opt + // legalization will remove the OpLoad and convert to an lvalue. + // Had to do this because legalization will only propagate a + // builtin into an rvalue. + lvalue = glslangIntermediate->getSource() != glslang::EShSourceHlsl; // Does it need a swizzle inversion? If so, evaluation is inverted; // operate first on the swizzle base, then apply the swizzle. @@ -3012,6 +3221,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt if (arg == 1) lvalue = true; break; + case glslang::EOpSpirvInst: + if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference()) + lvalue = true; + break; #endif default: break; @@ -3109,15 +3322,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst(); operands.push_back(builder.makeIntConstant(cond ? 1 : 0)); } else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) || + (arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) || (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) { - const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : 1; - const int set = glslangOp == glslang::EOpTraceKHR ? 0 : 1; + const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : (glslangOp == glslang::EOpTraceRayMotionNV ? 11 : 1); + const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0; + const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst(); auto itNode = locationToSymbol[set].find(location); visitSymbol(itNode->second); spv::Id symId = getSymbolId(itNode->second); operands.push_back(symId); - } else { +#ifndef GLSLANG_WEB + } else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) { + // Will be translated to a literal value, make a placeholder here + operands.push_back(spv::NoResult); +#endif + } else { operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } } @@ -3155,8 +3375,38 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt #endif if (atomic) { // Handle all atomics - result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), + glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore) + ? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType(); + result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy, lvalueCoherentFlags); +#ifndef GLSLANG_WEB + } else if (node->getOp() == glslang::EOpSpirvInst) { + const auto& spirvInst = node->getSpirvInstruction(); + if (spirvInst.set == "") { + std::vector<spv::IdImmediate> idImmOps; + for (int i = 0; i < glslangOperands.size(); ++i) { + if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) { + // Translate the constant to a literal value + std::vector<unsigned> literals; + glslang::TVector<const glslang::TIntermConstantUnion*> constants; + constants.push_back(glslangOperands[i]->getAsConstantUnion()); + TranslateLiterals(constants, literals); + idImmOps.push_back({false, literals[0]}); + } else + idImmOps.push_back({true, operands[i]}); + } + + if (node->getBasicType() == glslang::EbtVoid) + builder.createNoResultOp(static_cast<spv::Op>(spirvInst.id), idImmOps); + else + result = builder.createOp(static_cast<spv::Op>(spirvInst.id), resultType(), idImmOps); + } else { + result = builder.createBuiltinCall( + resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()), + spirvInst.id, operands); + } + noReturnValue = node->getBasicType() == glslang::EbtVoid; +#endif } else if (node->getOp() == glslang::EOpDebugPrintf) { if (!nonSemanticDebugPrintf) { nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf"); @@ -3437,6 +3687,11 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node) { +#ifndef GLSLANG_WEB + if (node->getQualifier().isSpirvLiteral()) + return; // Translated to a literal value, skip further processing +#endif + int nextConst = 0; spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false); @@ -3623,6 +3878,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* break; #endif default: + if (storageClass == spv::StorageClassWorkgroup && + node->getType().getBasicType() == glslang::EbtBlock) { + builder.addCapability(spv::CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR); + break; + } if (node->getType().contains16BitFloat()) builder.addCapability(spv::CapabilityFloat16); if (node->getType().contains16BitInt()) @@ -3641,6 +3901,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* } else if (storageClass == spv::StorageClassStorageBuffer) { builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5); builder.addCapability(spv::CapabilityStorageBuffer8BitAccess); + } else if (storageClass == spv::StorageClassWorkgroup && + node->getType().getBasicType() == glslang::EbtBlock) { + builder.addCapability(spv::CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR); } else { builder.addCapability(spv::CapabilityInt8); } @@ -3652,13 +3915,14 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* spv::Id initializer = spv::NoResult; - if (node->getType().getQualifier().storage == glslang::EvqUniform && - !node->getConstArray().empty()) { - int nextConst = 0; - initializer = createSpvConstantFromConstUnionArray(node->getType(), - node->getConstArray(), - nextConst, - false /* specConst */); + if (node->getType().getQualifier().storage == glslang::EvqUniform && !node->getConstArray().empty()) { + int nextConst = 0; + initializer = createSpvConstantFromConstUnionArray(node->getType(), + node->getConstArray(), + nextConst, + false /* specConst */); + } else if (node->getType().getQualifier().isNullInit()) { + initializer = builder.makeNullConstant(spvType); } return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer); @@ -3876,6 +4140,77 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtString: // no type used for OpString return 0; +#ifndef GLSLANG_WEB + case glslang::EbtSpirvType: { + // GL_EXT_spirv_intrinsics + const auto& spirvType = type.getSpirvType(); + const auto& spirvInst = spirvType.spirvInst; + + std::vector<spv::Id> operands; + for (const auto& typeParam : spirvType.typeParams) { + if (typeParam.isConstant) { + // Constant expression + if (typeParam.constant->isLiteral()) { + if (typeParam.constant->getBasicType() == glslang::EbtFloat) { + float floatValue = static_cast<float>(typeParam.constant->getConstArray()[0].getDConst()); + unsigned literal = *reinterpret_cast<unsigned*>(&floatValue); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtInt) { + unsigned literal = typeParam.constant->getConstArray()[0].getIConst(); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtUint) { + unsigned literal = typeParam.constant->getConstArray()[0].getUConst(); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtBool) { + unsigned literal = typeParam.constant->getConstArray()[0].getBConst(); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtString) { + auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str(); + unsigned literal = 0; + char* literalPtr = reinterpret_cast<char*>(&literal); + unsigned charCount = 0; + char ch = 0; + do { + ch = *(str++); + *(literalPtr++) = ch; + ++charCount; + if (charCount == 4) { + operands.push_back(literal); + literalPtr = reinterpret_cast<char*>(&literal); + charCount = 0; + } + } while (ch != 0); + + // Partial literal is padded with 0 + if (charCount > 0) { + for (; charCount < 4; ++charCount) + *(literalPtr++) = 0; + operands.push_back(literal); + } + } else + assert(0); // Unexpected type + } else { + int nextConst = 0; + spv::Id constant = createSpvConstantFromConstUnionArray( + typeParam.constant->getType(), typeParam.constant->getConstArray(), nextConst, false); + operands.push_back(constant); + } + } else { + // Type specifier + spv::Id typeId = convertGlslangToSpvType(*typeParam.type); + operands.push_back(typeId); + } + } + + if (spirvInst.set == "") + spvType = builder.createOp(static_cast<spv::Op>(spirvInst.id), spv::NoType, operands); + else { + spvType = builder.createBuiltinCall( + spv::NoType, getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, operands); + } + break; + } +#endif default: assert(0); break; @@ -4072,7 +4407,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, { // Name and decorate the non-hidden members int offset = -1; - int locationOffset = 0; // for use within the members of this struct bool memberLocationInvalid = type.isArrayOfArrays() || (type.isArray() && (type.getQualifier().isArrayedIo(glslangIntermediate->getStage()) == false)); for (int i = 0; i < (int)glslangMembers->size(); i++) { @@ -4130,10 +4464,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, if (!memberLocationInvalid && memberQualifier.hasLocation()) builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation); - if (qualifier.hasLocation()) // track for upcoming inheritance - locationOffset += glslangIntermediate->computeTypeLocationSize( - glslangMember, glslangIntermediate->getStage()); - // component, XFB, others if (glslangMember.getQualifier().hasComponent()) builder.addMemberDecoration(spvType, member, spv::DecorationComponent, @@ -4189,6 +4519,38 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV); builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); } + + // + // Add SPIR-V decorations for members (GL_EXT_spirv_intrinsics) + // + if (glslangMember.getQualifier().hasSprivDecorate()) { + const glslang::TSpirvDecorate& spirvDecorate = glslangMember.getQualifier().getSpirvDecorate(); + + // Add spirv_decorate + for (auto& decorate : spirvDecorate.decorates) { + if (!decorate.second.empty()) { + std::vector<unsigned> literals; + TranslateLiterals(decorate.second, literals); + builder.addMemberDecoration(spvType, member, static_cast<spv::Decoration>(decorate.first), literals); + } + else + builder.addMemberDecoration(spvType, member, static_cast<spv::Decoration>(decorate.first)); + } + + // spirv_decorate_id not applied to members + assert(spirvDecorate.decorateIds.empty()); + + // Add spirv_decorate_string + for (auto& decorateString : spirvDecorate.decorateStrings) { + std::vector<const char*> strings; + assert(!decorateString.second.empty()); + for (auto extraOperand : decorateString.second) { + const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); + strings.push_back(string); + } + builder.addDecoration(spvType, static_cast<spv::Decoration>(decorateString.first), strings); + } + } #endif } @@ -4207,6 +4569,8 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim); if (specNode != nullptr) { builder.clearAccessChain(); + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); + spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); specNode->traverse(this); return accessChainLoad(specNode->getAsTyped()->getType()); } @@ -4242,19 +4606,7 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) // Need to convert to abstract types when necessary if (type.getBasicType() == glslang::EbtBool) { - if (builder.isScalarType(nominalTypeId)) { - // Conversion for bool - spv::Id boolType = builder.makeBoolType(); - if (nominalTypeId != boolType) - loadedId = builder.createBinOp(spv::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0)); - } else if (builder.isVectorType(nominalTypeId)) { - // Conversion for bvec - int vecSize = builder.getNumTypeComponents(nominalTypeId); - spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); - if (nominalTypeId != bvecType) - loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId, - makeSmearedConstant(builder.makeUintConstant(0), vecSize)); - } + loadedId = convertLoadedBoolInUniformToUint(type, nominalTypeId, loadedId); } return loadedId; @@ -4406,6 +4758,7 @@ glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang: // has to be a uniform or buffer block or task in/out blocks if (type.getQualifier().storage != glslang::EvqUniform && type.getQualifier().storage != glslang::EvqBuffer && + type.getQualifier().storage != glslang::EvqShared && !type.getQualifier().isTaskMemory()) return glslang::ElpNone; @@ -4575,6 +4928,9 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) return paramType.getBasicType() == glslang::EbtBlock; return paramType.containsOpaque() || // sampler, etc. +#ifndef GLSLANG_WEB + paramType.getQualifier().isSpirvByReference() || // spirv_by_reference +#endif (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO } @@ -4968,7 +5324,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO int components = node->getType().getVectorSize(); - if (node->getOp() == glslang::EOpTextureFetch) { + if (node->getOp() == glslang::EOpImageLoad || + node->getOp() == glslang::EOpImageLoadLod || + node->getOp() == glslang::EOpTextureFetch || + node->getOp() == glslang::EOpTextureFetchOffset) { // These must produce 4 components, per SPIR-V spec. We'll add a conversion constructor if needed. // This will only happen through the HLSL path for operator[], so we do not have to handle e.g. // the EOpTexture/Proj/Lod/etc family. It would be harmless to do so, but would need more logic @@ -5530,7 +5889,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg ++lValueCount; } else { // process r-value, which involves a copy for a type mismatch - if (function->getParamType(a) != convertGlslangToSpvType(*argTypes[a]) || + if (function->getParamType(a) != builder.getTypeId(rValues[rValueCount]) || TranslatePrecisionDecoration(*argTypes[a]) != function->getParamPrecision(a)) { spv::Id argCopy = builder.createVariable(function->getParamPrecision(a), spv::StorageClassFunction, function->getParamType(a), "arg"); @@ -6813,9 +7172,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora break; case glslang::EOpConvPtrToUvec2: case glslang::EOpConvUvec2ToPtr: - if (builder.isVector(operand)) - builder.promoteIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, - spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5); convOp = spv::OpBitcast; break; #endif @@ -6864,29 +7220,58 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv case glslang::EOpImageAtomicAdd: case glslang::EOpAtomicCounterAdd: opCode = spv::OpAtomicIAdd; - if (typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { + if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { opCode = spv::OpAtomicFAddEXT; builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add); - if (typeProxy == glslang::EbtFloat) + if (typeProxy == glslang::EbtFloat16) { + builder.addExtension(spv::E_SPV_EXT_shader_atomic_float16_add); + builder.addCapability(spv::CapabilityAtomicFloat16AddEXT); + } else if (typeProxy == glslang::EbtFloat) { builder.addCapability(spv::CapabilityAtomicFloat32AddEXT); - else + } else { builder.addCapability(spv::CapabilityAtomicFloat64AddEXT); + } } break; + case glslang::EOpAtomicSubtract: case glslang::EOpAtomicCounterSubtract: opCode = spv::OpAtomicISub; break; case glslang::EOpAtomicMin: case glslang::EOpImageAtomicMin: case glslang::EOpAtomicCounterMin: - opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? - spv::OpAtomicUMin : spv::OpAtomicSMin; + if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { + opCode = spv::OpAtomicFMinEXT; + builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max); + if (typeProxy == glslang::EbtFloat16) + builder.addCapability(spv::CapabilityAtomicFloat16MinMaxEXT); + else if (typeProxy == glslang::EbtFloat) + builder.addCapability(spv::CapabilityAtomicFloat32MinMaxEXT); + else + builder.addCapability(spv::CapabilityAtomicFloat64MinMaxEXT); + } else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) { + opCode = spv::OpAtomicUMin; + } else { + opCode = spv::OpAtomicSMin; + } break; case glslang::EOpAtomicMax: case glslang::EOpImageAtomicMax: case glslang::EOpAtomicCounterMax: - opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? - spv::OpAtomicUMax : spv::OpAtomicSMax; + if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { + opCode = spv::OpAtomicFMaxEXT; + builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max); + if (typeProxy == glslang::EbtFloat16) + builder.addCapability(spv::CapabilityAtomicFloat16MinMaxEXT); + else if (typeProxy == glslang::EbtFloat) + builder.addCapability(spv::CapabilityAtomicFloat32MinMaxEXT); + else + builder.addCapability(spv::CapabilityAtomicFloat64MinMaxEXT); + } else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) { + opCode = spv::OpAtomicUMax; + } else { + opCode = spv::OpAtomicSMax; + } break; case glslang::EOpAtomicAnd: case glslang::EOpImageAtomicAnd: @@ -6995,6 +7380,10 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } + if (builder.getConstantScalar(scopeId) == spv::ScopeQueueFamily) { + builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); + } + if (glslangIntermediate->usingVulkanMemoryModel() && builder.getConstantScalar(scopeId) == spv::ScopeDevice) { builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR); } @@ -7940,6 +8329,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: case glslang::EOpTraceNV: builder.createNoResultOp(spv::OpTraceNV, operands); return 0; + case glslang::EOpTraceRayMotionNV: + builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur); + builder.addCapability(spv::CapabilityRayTracingMotionBlurNV); + builder.createNoResultOp(spv::OpTraceRayMotionNV, operands); + return 0; case glslang::EOpTraceKHR: builder.createNoResultOp(spv::OpTraceRayKHR, operands); return 0; @@ -7991,7 +8385,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR; break; case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: - typeId = builder.makeIntType(32); + typeId = builder.makeUintType(32); opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR; break; case glslang::EOpRayQueryGetIntersectionGeometryIndex: @@ -8424,6 +8818,48 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, symbol->getType().getQualifier().restrict ? spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT); } + + // + // Add SPIR-V decorations for structure (GL_EXT_spirv_intrinsics) + // + if (symbol->getType().getQualifier().hasSprivDecorate()) { + const glslang::TSpirvDecorate& spirvDecorate = symbol->getType().getQualifier().getSpirvDecorate(); + + // Add spirv_decorate + for (auto& decorate : spirvDecorate.decorates) { + if (!decorate.second.empty()) { + std::vector<unsigned> literals; + TranslateLiterals(decorate.second, literals); + builder.addDecoration(id, static_cast<spv::Decoration>(decorate.first), literals); + } + else + builder.addDecoration(id, static_cast<spv::Decoration>(decorate.first)); + } + + // Add spirv_decorate_id + for (auto& decorateId : spirvDecorate.decorateIds) { + std::vector<spv::Id> operandIds; + assert(!decorateId.second.empty()); + for (auto extraOperand : decorateId.second) { + int nextConst = 0; + spv::Id operandId = createSpvConstantFromConstUnionArray( + extraOperand->getType(), extraOperand->getConstArray(), nextConst, false); + operandIds.push_back(operandId); + } + builder.addDecoration(id, static_cast<spv::Decoration>(decorateId.first), operandIds); + } + + // Add spirv_decorate_string + for (auto& decorateString : spirvDecorate.decorateStrings) { + std::vector<const char*> strings; + assert(!decorateString.second.empty()); + for (auto extraOperand : decorateString.second) { + const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); + strings.push_back(string); + } + builder.addDecoration(id, static_cast<spv::Decoration>(decorateString.first), strings); + } + } #endif return id; diff --git a/thirdparty/glslang/SPIRV/SPVRemapper.cpp b/thirdparty/glslang/SPIRV/SPVRemapper.cpp index 56d7f431a7..56d6d5d4a5 100644 --- a/thirdparty/glslang/SPIRV/SPVRemapper.cpp +++ b/thirdparty/glslang/SPIRV/SPVRemapper.cpp @@ -544,6 +544,9 @@ namespace spv { // Extended instructions: currently, assume everything is an ID. // TODO: add whatever data we need for exceptions to that if (opCode == spv::OpExtInst) { + + idFn(asId(word)); // Instruction set is an ID that also needs to be mapped + word += 2; // instruction set, and instruction from set numOperands -= 2; diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.cpp b/thirdparty/glslang/SPIRV/SpvBuilder.cpp index c8fbcc450e..e83306ebcb 100644 --- a/thirdparty/glslang/SPIRV/SpvBuilder.cpp +++ b/thirdparty/glslang/SPIRV/SpvBuilder.cpp @@ -743,6 +743,26 @@ Id Builder::getContainedTypeId(Id typeId, int member) const } } +// Figure out the final resulting type of the access chain. +Id Builder::getResultingAccessChainType() const +{ + assert(accessChain.base != NoResult); + Id typeId = getTypeId(accessChain.base); + + assert(isPointerType(typeId)); + typeId = getContainedTypeId(typeId); + + for (int i = 0; i < (int)accessChain.indexChain.size(); ++i) { + if (isStructType(typeId)) { + assert(isConstantScalar(accessChain.indexChain[i])); + typeId = getContainedTypeId(typeId, getConstantScalar(accessChain.indexChain[i])); + } else + typeId = getContainedTypeId(typeId, accessChain.indexChain[i]); + } + + return typeId; +} + // Return the immediately contained type of a given composite type. Id Builder::getContainedTypeId(Id typeId) const { @@ -869,6 +889,30 @@ bool Builder::isSpecConstantOpCode(Op opcode) const } } +Id Builder::makeNullConstant(Id typeId) +{ + Instruction* constant; + + // See if we already made it. + Id existing = NoResult; + for (int i = 0; i < (int)nullConstants.size(); ++i) { + constant = nullConstants[i]; + if (constant->getTypeId() == typeId) + existing = constant->getResultId(); + } + + if (existing != NoResult) + return existing; + + // Make it + Instruction* c = new Instruction(getUniqueId(), typeId, OpConstantNull); + constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c)); + nullConstants.push_back(c); + module.mapInstruction(c); + + return c->getResultId(); +} + Id Builder::makeBoolConstant(bool b, bool specConstant) { Id typeId = makeBoolType(); @@ -1561,16 +1605,7 @@ Id Builder::createLoad(Id lValue, spv::Decoration precision, spv::MemoryAccessMa Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vector<Id>& offsets) { // Figure out the final resulting type. - spv::Id typeId = getTypeId(base); - assert(isPointerType(typeId) && offsets.size() > 0); - typeId = getContainedTypeId(typeId); - for (int i = 0; i < (int)offsets.size(); ++i) { - if (isStructType(typeId)) { - assert(isConstantScalar(offsets[i])); - typeId = getContainedTypeId(typeId, getConstantScalar(offsets[i])); - } else - typeId = getContainedTypeId(typeId, offsets[i]); - } + Id typeId = getResultingAccessChainType(); typeId = makePointer(storageClass, typeId); // Make the instruction @@ -2519,7 +2554,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>& int row = 0; int col = 0; - for (int arg = 0; arg < (int)sources.size(); ++arg) { + for (int arg = 0; arg < (int)sources.size() && col < numCols; ++arg) { Id argComp = sources[arg]; for (int comp = 0; comp < getNumComponents(sources[arg]); ++comp) { if (getNumComponents(sources[arg]) > 1) { @@ -2531,6 +2566,10 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>& row = 0; col++; } + if (col == numCols) { + // If more components are provided than fit the matrix, discard the rest. + break; + } } } } @@ -2766,28 +2805,59 @@ void Builder::accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAcce assert(accessChain.isRValue == false); transferAccessChainSwizzle(true); - Id base = collapseAccessChain(); - addDecoration(base, nonUniform); - Id source = rvalue; + // If a swizzle exists and is not full and is not dynamic, then the swizzle will be broken into individual stores. + if (accessChain.swizzle.size() > 0 && + getNumTypeComponents(getResultingAccessChainType()) != (int)accessChain.swizzle.size() && + accessChain.component == NoResult) { + for (unsigned int i = 0; i < accessChain.swizzle.size(); ++i) { + accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle[i])); + accessChain.instr = NoResult; - // dynamic component should be gone - assert(accessChain.component == NoResult); + Id base = collapseAccessChain(); + addDecoration(base, nonUniform); - // If swizzle still exists, it is out-of-order or not full, we must load the target vector, - // extract and insert elements to perform writeMask and/or swizzle. - if (accessChain.swizzle.size() > 0) { - Id tempBaseId = createLoad(base, spv::NoPrecision); - source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle); - } + accessChain.indexChain.pop_back(); + accessChain.instr = NoResult; + + // dynamic component should be gone + assert(accessChain.component == NoResult); + + Id source = createCompositeExtract(rvalue, getContainedTypeId(getTypeId(rvalue)), i); + + // take LSB of alignment + alignment = alignment & ~(alignment & (alignment-1)); + if (getStorageClass(base) == StorageClassPhysicalStorageBufferEXT) { + memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask); + } - // take LSB of alignment - alignment = alignment & ~(alignment & (alignment-1)); - if (getStorageClass(base) == StorageClassPhysicalStorageBufferEXT) { - memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask); + createStore(source, base, memoryAccess, scope, alignment); + } } + else { + Id base = collapseAccessChain(); + addDecoration(base, nonUniform); + + Id source = rvalue; + + // dynamic component should be gone + assert(accessChain.component == NoResult); + + // If swizzle still exists, it may be out-of-order, we must load the target vector, + // extract and insert elements to perform writeMask and/or swizzle. + if (accessChain.swizzle.size() > 0) { + Id tempBaseId = createLoad(base, spv::NoPrecision); + source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle); + } - createStore(source, base, memoryAccess, scope, alignment); + // take LSB of alignment + alignment = alignment & ~(alignment & (alignment-1)); + if (getStorageClass(base) == StorageClassPhysicalStorageBufferEXT) { + memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask); + } + + createStore(source, base, memoryAccess, scope, alignment); + } } // Comments in header diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.h b/thirdparty/glslang/SPIRV/SpvBuilder.h index 911ea58b12..251b9ee823 100644 --- a/thirdparty/glslang/SPIRV/SpvBuilder.h +++ b/thirdparty/glslang/SPIRV/SpvBuilder.h @@ -202,6 +202,7 @@ public: StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); } ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); } + Id getResultingAccessChainType() const; bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } @@ -293,6 +294,7 @@ public: } // For making new constants (will return old constant if the requested one was already made). + Id makeNullConstant(Id typeId); Id makeBoolConstant(bool b, bool specConstant = false); Id makeInt8Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); } @@ -838,6 +840,8 @@ public: std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants; // map type opcodes to type instructions std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes; + // list of OpConstantNull instructions + std::vector<Instruction*> nullConstants; // stack of switches std::stack<Block*> switchMerges; diff --git a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp index d40174d172..23d7b5a461 100644 --- a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp +++ b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp @@ -436,6 +436,38 @@ void Builder::postProcessFeatures() { } } } + + // If any Vulkan memory model-specific functionality is used, update the + // OpMemoryModel to match. + if (capabilities.find(spv::CapabilityVulkanMemoryModelKHR) != capabilities.end()) { + memoryModel = spv::MemoryModelVulkanKHR; + addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5); + } + + // Add Aliased decoration if there's more than one Workgroup Block variable. + if (capabilities.find(spv::CapabilityWorkgroupMemoryExplicitLayoutKHR) != capabilities.end()) { + assert(entryPoints.size() == 1); + auto &ep = entryPoints[0]; + + std::vector<Id> workgroup_variables; + for (int i = 0; i < (int)ep->getNumOperands(); i++) { + if (!ep->isIdOperand(i)) + continue; + + const Id id = ep->getIdOperand(i); + const Instruction *instr = module.getInstruction(id); + if (instr->getOpCode() != spv::OpVariable) + continue; + + if (instr->getImmediateOperand(0) == spv::StorageClassWorkgroup) + workgroup_variables.push_back(id); + } + + if (workgroup_variables.size() > 1) { + for (size_t i = 0; i < workgroup_variables.size(); i++) + addDecoration(workgroup_variables[i], spv::DecorationAliased); + } + } } #endif diff --git a/thirdparty/glslang/SPIRV/SpvTools.cpp b/thirdparty/glslang/SPIRV/SpvTools.cpp index 16d051a9b2..8acf9b139a 100644 --- a/thirdparty/glslang/SPIRV/SpvTools.cpp +++ b/thirdparty/glslang/SPIRV/SpvTools.cpp @@ -153,6 +153,8 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector< spv_validator_options options = spvValidatorOptionsCreate(); spvValidatorOptionsSetRelaxBlockLayout(options, intermediate.usingHlslOffsets()); spvValidatorOptionsSetBeforeHlslLegalization(options, prelegalization); + spvValidatorOptionsSetScalarBlockLayout(options, intermediate.usingScalarBlockLayout()); + spvValidatorOptionsSetWorkgroupScalarBlockLayout(options, intermediate.usingScalarBlockLayout()); spvValidateWithOptions(context, options, &binary, &diagnostic); // report @@ -205,6 +207,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateVectorDCEPass()); optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass()); + optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass()); if (options->optimizeSize) { optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass()); } diff --git a/thirdparty/glslang/SPIRV/doc.cpp b/thirdparty/glslang/SPIRV/doc.cpp index 5327f2212d..dbdf7077a6 100644 --- a/thirdparty/glslang/SPIRV/doc.cpp +++ b/thirdparty/glslang/SPIRV/doc.cpp @@ -188,6 +188,7 @@ const char* ExecutionModeString(int mode) case ExecutionModeRoundingModeRTE: return "RoundingModeRTE"; case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlow"; case ExecutionModeOutputLinesNV: return "OutputLinesNV"; case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV"; @@ -425,6 +426,7 @@ const char* BuiltInString(int builtIn) case BuiltInSMCountNV: return "SMCountNV"; case BuiltInWarpIDNV: return "WarpIDNV"; case BuiltInSMIDNV: return "SMIDNV"; + case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; default: return "Bad"; } @@ -915,8 +917,10 @@ const char* CapabilityString(int info) case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; case CapabilityRayTracingNV: return "RayTracingNV"; + case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; case CapabilityRayTracingKHR: return "RayTracingKHR"; case CapabilityRayQueryKHR: return "RayQueryKHR"; + case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; @@ -964,8 +968,16 @@ const char* CapabilityString(int info) case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL"; + case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + + case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR"; + case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR"; + case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR"; default: return "Bad"; } @@ -1346,6 +1358,8 @@ const char* OpcodeString(int op) case 4432: return "OpSubgroupReadInvocationKHR"; case OpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case OpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; case 5000: return "OpGroupIAddNonUniformAMD"; case 5001: return "OpGroupFAddNonUniformAMD"; @@ -1370,6 +1384,7 @@ const char* OpcodeString(int op) case OpTerminateRayNV: return "OpTerminateRayNV"; case OpTerminateRayKHR: return "OpTerminateRayKHR"; case OpTraceNV: return "OpTraceNV"; + case OpTraceRayMotionNV: return "OpTraceRayMotionNV"; case OpTraceRayKHR: return "OpTraceRayKHR"; case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; case OpExecuteCallableNV: return "OpExecuteCallableNV"; @@ -2336,6 +2351,16 @@ void Parameterize() InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'"); InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'"); @@ -2714,7 +2739,7 @@ void Parameterize() InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'"); InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); @@ -2790,6 +2815,20 @@ void Parameterize() InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'"); InstructionDesc[OpTraceNV].setResultAndType(false, false); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'"); InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'"); diff --git a/thirdparty/glslang/SPIRV/spirv.hpp b/thirdparty/glslang/SPIRV/spirv.hpp index 43dd2aaeec..e0fe24980d 100644 --- a/thirdparty/glslang/SPIRV/spirv.hpp +++ b/thirdparty/glslang/SPIRV/spirv.hpp @@ -150,6 +150,7 @@ enum ExecutionMode { ExecutionModeSubgroupsPerWorkgroupId = 37, ExecutionModeLocalSizeId = 38, ExecutionModeLocalSizeHintId = 39, + ExecutionModeSubgroupUniformControlFlowKHR = 4421, ExecutionModePostDepthCoverage = 4446, ExecutionModeDenormPreserve = 4459, ExecutionModeDenormFlushToZero = 4460, @@ -168,10 +169,16 @@ enum ExecutionMode { ExecutionModeSampleInterlockUnorderedEXT = 5369, ExecutionModeShadingRateInterlockOrderedEXT = 5370, ExecutionModeShadingRateInterlockUnorderedEXT = 5371, + ExecutionModeSharedLocalMemorySizeINTEL = 5618, + ExecutionModeRoundingModeRTPINTEL = 5620, + ExecutionModeRoundingModeRTNINTEL = 5621, + ExecutionModeFloatingPointModeALTINTEL = 5622, + ExecutionModeFloatingPointModeIEEEINTEL = 5623, ExecutionModeMaxWorkgroupSizeINTEL = 5893, ExecutionModeMaxWorkDimINTEL = 5894, ExecutionModeNoGlobalOffsetINTEL = 5895, ExecutionModeNumSIMDWorkitemsINTEL = 5896, + ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, ExecutionModeMax = 0x7fffffff, }; @@ -204,6 +211,8 @@ enum StorageClass { StorageClassPhysicalStorageBuffer = 5349, StorageClassPhysicalStorageBufferEXT = 5349, StorageClassCodeSectionINTEL = 5605, + StorageClassDeviceOnlyINTEL = 5936, + StorageClassHostOnlyINTEL = 5937, StorageClassMax = 0x7fffffff, }; @@ -374,6 +383,8 @@ enum FPFastMathModeShift { FPFastMathModeNSZShift = 2, FPFastMathModeAllowRecipShift = 3, FPFastMathModeFastShift = 4, + FPFastMathModeAllowContractFastINTELShift = 16, + FPFastMathModeAllowReassocINTELShift = 17, FPFastMathModeMax = 0x7fffffff, }; @@ -384,6 +395,8 @@ enum FPFastMathModeMask { FPFastMathModeNSZMask = 0x00000004, FPFastMathModeAllowRecipMask = 0x00000008, FPFastMathModeFastMask = 0x00000010, + FPFastMathModeAllowContractFastINTELMask = 0x00010000, + FPFastMathModeAllowReassocINTELMask = 0x00020000, }; enum FPRoundingMode { @@ -397,6 +410,7 @@ enum FPRoundingMode { enum LinkageType { LinkageTypeExport = 0, LinkageTypeImport = 1, + LinkageTypeLinkOnceODR = 2, LinkageTypeMax = 0x7fffffff, }; @@ -484,12 +498,22 @@ enum Decoration { DecorationRestrictPointerEXT = 5355, DecorationAliasedPointer = 5356, DecorationAliasedPointerEXT = 5356, + DecorationSIMTCallINTEL = 5599, DecorationReferencedIndirectlyINTEL = 5602, + DecorationClobberINTEL = 5607, + DecorationSideEffectsINTEL = 5608, + DecorationVectorComputeVariableINTEL = 5624, + DecorationFuncParamIOKindINTEL = 5625, + DecorationVectorComputeFunctionINTEL = 5626, + DecorationStackCallINTEL = 5627, + DecorationGlobalVariableOffsetINTEL = 5628, DecorationCounterBuffer = 5634, DecorationHlslCounterBufferGOOGLE = 5634, DecorationHlslSemanticGOOGLE = 5635, DecorationUserSemantic = 5635, DecorationUserTypeGOOGLE = 5636, + DecorationFunctionRoundingModeINTEL = 5822, + DecorationFunctionDenormModeINTEL = 5823, DecorationRegisterINTEL = 5825, DecorationMemoryINTEL = 5826, DecorationNumbanksINTEL = 5827, @@ -502,6 +526,17 @@ enum Decoration { DecorationMergeINTEL = 5834, DecorationBankBitsINTEL = 5835, DecorationForcePow2DepthINTEL = 5836, + DecorationBurstCoalesceINTEL = 5899, + DecorationCacheSizeINTEL = 5900, + DecorationDontStaticallyCoalesceINTEL = 5901, + DecorationPrefetchINTEL = 5902, + DecorationStallEnableINTEL = 5905, + DecorationFuseLoopsInFunctionINTEL = 5907, + DecorationBufferLocationINTEL = 5921, + DecorationIOPipeStorageINTEL = 5944, + DecorationFunctionFloatingPointModeINTEL = 6080, + DecorationSingleElementVectorINTEL = 6085, + DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationMax = 0x7fffffff, }; @@ -617,6 +652,7 @@ enum BuiltIn { BuiltInHitTNV = 5332, BuiltInHitKindKHR = 5333, BuiltInHitKindNV = 5333, + BuiltInCurrentRayTimeNV = 5334, BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsNV = 5351, BuiltInRayGeometryIndexKHR = 5352, @@ -656,6 +692,7 @@ enum LoopControlShift { LoopControlLoopCoalesceINTELShift = 20, LoopControlMaxInterleavingINTELShift = 21, LoopControlSpeculatedIterationsINTELShift = 22, + LoopControlNoFusionINTELShift = 23, LoopControlMax = 0x7fffffff, }; @@ -677,6 +714,7 @@ enum LoopControlMask { LoopControlLoopCoalesceINTELMask = 0x00100000, LoopControlMaxInterleavingINTELMask = 0x00200000, LoopControlSpeculatedIterationsINTELMask = 0x00400000, + LoopControlNoFusionINTELMask = 0x00800000, }; enum FunctionControlShift { @@ -876,6 +914,9 @@ enum Capability { CapabilityFragmentShadingRateKHR = 4422, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, + CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428, + CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, + CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, CapabilitySubgroupVoteKHR = 4431, CapabilityStorageBuffer16BitAccess = 4433, CapabilityStorageUniformBufferBlock16 = 4433, @@ -948,6 +989,7 @@ enum Capability { CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, CapabilityRayTracingNV = 5340, + CapabilityRayTracingMotionBlurNV = 5341, CapabilityVulkanMemoryModel = 5345, CapabilityVulkanMemoryModelKHR = 5345, CapabilityVulkanMemoryModelDeviceScope = 5346, @@ -966,21 +1008,42 @@ enum Capability { CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, CapabilitySubgroupImageMediaBlockIOINTEL = 5579, + CapabilityRoundToInfinityINTEL = 5582, + CapabilityFloatingPointModeINTEL = 5583, CapabilityIntegerFunctions2INTEL = 5584, CapabilityFunctionPointersINTEL = 5603, CapabilityIndirectReferencesINTEL = 5604, + CapabilityAsmINTEL = 5606, + CapabilityAtomicFloat32MinMaxEXT = 5612, + CapabilityAtomicFloat64MinMaxEXT = 5613, + CapabilityAtomicFloat16MinMaxEXT = 5616, + CapabilityVectorComputeINTEL = 5617, + CapabilityVectorAnyINTEL = 5619, + CapabilityExpectAssumeKHR = 5629, CapabilitySubgroupAvcMotionEstimationINTEL = 5696, CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697, CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698, + CapabilityVariableLengthArrayINTEL = 5817, + CapabilityFunctionFloatControlINTEL = 5821, CapabilityFPGAMemoryAttributesINTEL = 5824, + CapabilityFPFastMathModeINTEL = 5837, + CapabilityArbitraryPrecisionIntegersINTEL = 5844, CapabilityUnstructuredLoopControlsINTEL = 5886, CapabilityFPGALoopControlsINTEL = 5888, CapabilityKernelAttributesINTEL = 5892, CapabilityFPGAKernelAttributesINTEL = 5897, + CapabilityFPGAMemoryAccessesINTEL = 5898, + CapabilityFPGAClusterAttributesINTEL = 5904, + CapabilityLoopFuseINTEL = 5906, + CapabilityFPGABufferLocationINTEL = 5920, + CapabilityUSMStorageClassesINTEL = 5935, + CapabilityIOPipesINTEL = 5943, CapabilityBlockingPipesINTEL = 5945, CapabilityFPGARegINTEL = 5948, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, + CapabilityLongConstantCompositeINTEL = 6089, + CapabilityAtomicFloat16AddEXT = 6095, CapabilityMax = 0x7fffffff, }; @@ -1047,6 +1110,18 @@ enum FragmentShadingRateMask { FragmentShadingRateHorizontal4PixelsMask = 0x00000008, }; +enum FPDenormMode { + FPDenormModePreserve = 0, + FPDenormModeFlushToZero = 1, + FPDenormModeMax = 0x7fffffff, +}; + +enum FPOperationMode { + FPOperationModeIEEE = 0, + FPOperationModeALT = 1, + FPOperationModeMax = 0x7fffffff, +}; + enum Op { OpNop = 0, OpUndef = 1, @@ -1430,6 +1505,8 @@ enum Op { OpIgnoreIntersectionNV = 5335, OpTerminateRayNV = 5336, OpTraceNV = 5337, + OpTraceMotionNV = 5338, + OpTraceRayMotionNV = 5339, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1466,8 +1543,15 @@ enum Op { OpUSubSatINTEL = 5596, OpIMul32x16INTEL = 5597, OpUMul32x16INTEL = 5598, - OpFunctionPointerINTEL = 5600, + OpConstFunctionPointerINTEL = 5600, OpFunctionPointerCallINTEL = 5601, + OpAsmTargetINTEL = 5609, + OpAsmINTEL = 5610, + OpAsmCallINTEL = 5611, + OpAtomicFMinEXT = 5614, + OpAtomicFMaxEXT = 5615, + OpAssumeTrueKHR = 5630, + OpExpectKHR = 5631, OpDecorateString = 5632, OpDecorateStringGOOGLE = 5632, OpMemberDecorateString = 5633, @@ -1590,7 +1674,12 @@ enum Op { OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, + OpVariableLengthArrayINTEL = 5818, + OpSaveMemoryINTEL = 5819, + OpRestoreMemoryINTEL = 5820, OpLoopControlINTEL = 5887, + OpPtrCastToCrossWorkgroupINTEL = 5934, + OpCrossWorkgroupCastToPtrINTEL = 5938, OpReadPipeBlockingINTEL = 5946, OpWritePipeBlockingINTEL = 5947, OpFPGARegINTEL = 5949, @@ -1612,6 +1701,10 @@ enum Op { OpRayQueryGetIntersectionObjectToWorldKHR = 6031, OpRayQueryGetIntersectionWorldToObjectKHR = 6032, OpAtomicFAddEXT = 6035, + OpTypeBufferSurfaceINTEL = 6086, + OpTypeStructContinuedINTEL = 6090, + OpConstantCompositeContinuedINTEL = 6091, + OpSpecConstantCompositeContinuedINTEL = 6092, OpMax = 0x7fffffff, }; @@ -2001,6 +2094,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case OpTraceNV: *hasResult = false; *hasResultType = false; break; + case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; + case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; @@ -2036,8 +2131,15 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case OpFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; + case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; + case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break; + case OpAsmINTEL: *hasResult = true; *hasResultType = true; break; + case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break; + case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break; + case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break; + case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break; + case OpExpectKHR: *hasResult = true; *hasResultType = true; break; case OpDecorateString: *hasResult = false; *hasResultType = false; break; case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break; case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; @@ -2158,7 +2260,12 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; + case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; + case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; + case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; + case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; @@ -2180,6 +2287,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; + case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; } } #endif /* SPV_ENABLE_UTILITY_CODE */ diff --git a/thirdparty/glslang/StandAlone/DirStackFileIncluder.h b/thirdparty/glslang/StandAlone/DirStackFileIncluder.h index 18734130e7..5a33c78fa2 100644 --- a/thirdparty/glslang/StandAlone/DirStackFileIncluder.h +++ b/thirdparty/glslang/StandAlone/DirStackFileIncluder.h @@ -40,6 +40,7 @@ #include <string> #include <fstream> #include <algorithm> +#include <set> #include "./../glslang/Public/ShaderLang.h" @@ -84,12 +85,18 @@ public: } } + virtual std::set<std::string> getIncludedFiles() + { + return includedFiles; + } + virtual ~DirStackFileIncluder() override { } protected: typedef char tUserDataElement; std::vector<std::string> directoryStack; int externalLocalDirectoryCount; + std::set<std::string> includedFiles; // Search for a valid "local" path based on combining the stack of include // directories and the nominal name of the header. @@ -108,6 +115,7 @@ protected: std::ifstream file(path, std::ios_base::binary | std::ios_base::ate); if (file) { directoryStack.push_back(getDirectory(path)); + includedFiles.insert(path); return newIncludeResult(path, file, (int)file.tellg()); } } diff --git a/thirdparty/glslang/glslang/Include/BaseTypes.h b/thirdparty/glslang/glslang/Include/BaseTypes.h index 55bdd25da5..c8203c2232 100644 --- a/thirdparty/glslang/glslang/Include/BaseTypes.h +++ b/thirdparty/glslang/glslang/Include/BaseTypes.h @@ -65,6 +65,10 @@ enum TBasicType { EbtAccStruct, EbtReference, EbtRayQuery, +#ifndef GLSLANG_WEB + // SPIR-V type defined by spirv_type + EbtSpirvType, +#endif // HLSL types that live only temporarily. EbtString, @@ -91,6 +95,9 @@ enum TStorageQualifier { EvqUniform, // read only, shared with app EvqBuffer, // read/write, shared with app EvqShared, // compute shader's read/write 'shared' qualifier +#ifndef GLSLANG_WEB + EvqSpirvStorageClass, // spirv_storage_class +#endif EvqPayload, EvqPayloadIn, @@ -263,6 +270,7 @@ enum TBuiltInVariable { EbvWorldToObject, EbvWorldToObject3x4, EbvIncomingRayFlags, + EbvCurrentRayTimeNV, // barycentrics EbvBaryCoordNV, EbvBaryCoordNoPerspNV, @@ -321,6 +329,9 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q) case EvqGlobal: return "global"; break; case EvqConst: return "const"; break; case EvqConstReadOnly: return "const (read only)"; break; +#ifndef GLSLANG_WEB + case EvqSpirvStorageClass: return "spirv_storage_class"; break; +#endif case EvqVaryingIn: return "in"; break; case EvqVaryingOut: return "out"; break; case EvqUniform: return "uniform"; break; @@ -465,6 +476,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvIncomingRayFlags: return "IncomingRayFlagsNV"; case EbvObjectToWorld: return "ObjectToWorldNV"; case EbvWorldToObject: return "WorldToObjectNV"; + case EbvCurrentRayTimeNV: return "CurrentRayTimeNV"; case EbvBaryCoordNV: return "BaryCoordNV"; case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV"; diff --git a/thirdparty/glslang/glslang/Include/Common.h b/thirdparty/glslang/glslang/Include/Common.h index b628cdc2f0..1e47239a7a 100644 --- a/thirdparty/glslang/glslang/Include/Common.h +++ b/thirdparty/glslang/glslang/Include/Common.h @@ -194,6 +194,10 @@ template <class K, class D, class HASH = std::hash<K>, class PRED = std::equal_t class TUnorderedMap : public std::unordered_map<K, D, HASH, PRED, pool_allocator<std::pair<K const, D> > > { }; +template <class K, class CMP = std::less<K> > +class TSet : public std::set<K, CMP, pool_allocator<K> > { +}; + // // Persistent string memory. Should only be used for strings that survive // across compiles/links. @@ -286,6 +290,18 @@ template <class T> bool IsMultipleOfPow2(T number, int powerOf2) return ! (number & (powerOf2 - 1)); } +// Returns log2 of an integer power of 2. +// T should be integral. +template <class T> int IntLog2(T n) +{ + assert(IsPow2(n)); + int result = 0; + while ((T(1) << result) != n) { + result++; + } + return result; +} + } // end namespace glslang #endif // _COMMON_INCLUDED_ diff --git a/thirdparty/glslang/glslang/Include/SpirvIntrinsics.h b/thirdparty/glslang/glslang/Include/SpirvIntrinsics.h new file mode 100644 index 0000000000..e7a999d408 --- /dev/null +++ b/thirdparty/glslang/glslang/Include/SpirvIntrinsics.h @@ -0,0 +1,136 @@ +// +// Copyright(C) 2021 Advanced Micro Devices, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#pragma once + +#ifndef GLSLANG_WEB + +// +// GL_EXT_spirv_intrinsics +// +#include "Common.h" + +namespace glslang { + +class TIntermTyped; +class TIntermConstantUnion; +class TType; + +// SPIR-V requirements +struct TSpirvRequirement { + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + // capability = [..] + TSet<TString> extensions; + // extension = [..] + TSet<int> capabilities; +}; + +// SPIR-V execution modes +struct TSpirvExecutionMode { + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + // spirv_execution_mode + TMap<int, TVector<const TIntermConstantUnion*>> modes; + // spirv_execution_mode_id + TMap<int, TVector<const TIntermConstantUnion*> > modeIds; +}; + +// SPIR-V decorations +struct TSpirvDecorate { + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + // spirv_decorate + TMap<int, TVector<const TIntermConstantUnion*> > decorates; + // spirv_decorate_id + TMap<int, TVector<const TIntermConstantUnion*> > decorateIds; + // spirv_decorate_string + TMap<int, TVector<const TIntermConstantUnion*> > decorateStrings; +}; + +// SPIR-V instruction +struct TSpirvInstruction { + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + TSpirvInstruction() { set = ""; id = -1; } + + bool operator==(const TSpirvInstruction& rhs) const { return set == rhs.set && id == rhs.id; } + bool operator!=(const TSpirvInstruction& rhs) const { return !operator==(rhs); } + + // spirv_instruction + TString set; + int id; +}; + +// SPIR-V type parameter +struct TSpirvTypeParameter { + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + TSpirvTypeParameter(const TIntermConstantUnion* arg) { isConstant = true; constant = arg; } + TSpirvTypeParameter(const TType* arg) { isConstant = false; type = arg; } + + bool operator==(const TSpirvTypeParameter& rhs) const + { + return isConstant == rhs.isConstant && ((isConstant && constant == rhs.constant) || (!isConstant && type == rhs.type)); + } + bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); } + + bool isConstant; + union { + const TIntermConstantUnion* constant; + const TType* type; + }; +}; + +typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters; + +// SPIR-V type +struct TSpirvType { + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + bool operator==(const TSpirvType& rhs) const + { + return spirvInst == rhs.spirvInst && typeParams == rhs.typeParams; + } + bool operator!=(const TSpirvType& rhs) const { return !operator==(rhs); } + + // spirv_type + TSpirvInstruction spirvInst; + TSpirvTypeParameters typeParams; +}; + +} // end namespace glslang + +#endif // GLSLANG_WEB diff --git a/thirdparty/glslang/glslang/Include/Types.h b/thirdparty/glslang/glslang/Include/Types.h index 696daf6dfa..a6bf191d75 100644 --- a/thirdparty/glslang/glslang/Include/Types.h +++ b/thirdparty/glslang/glslang/Include/Types.h @@ -44,11 +44,14 @@ #include "../Include/BaseTypes.h" #include "../Public/ShaderLang.h" #include "arrays.h" +#include "SpirvIntrinsics.h" #include <algorithm> namespace glslang { +class TIntermAggregate; + const int GlslangMaxTypeLength = 200; // TODO: need to print block/struct one member per line, so this can stay bounded const char* const AnonymousPrefix = "anon@"; // for something like a block whose members can be directly accessed @@ -115,6 +118,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler, #endif bool is1D() const { return dim == Esd1D; } + bool is2D() const { return dim == Esd2D; } bool isBuffer() const { return dim == EsdBuffer; } bool isRect() const { return dim == EsdRect; } bool isSubpass() const { return dim == EsdSubpass; } @@ -486,7 +490,6 @@ enum TShaderInterface EsiCount }; - class TQualifier { public: static const int layoutNotSet = -1; @@ -499,7 +502,11 @@ public: declaredBuiltIn = EbvNone; #ifndef GLSLANG_WEB noContraction = false; + nullInit = false; + spirvByReference = false; + spirvLiteral = false; #endif + defaultBlock = false; } // drop qualifiers that don't belong in a temporary variable @@ -512,7 +519,15 @@ public: clearMemory(); specConstant = false; nonUniform = false; + nullInit = false; + defaultBlock = false; clearLayout(); +#ifndef GLSLANG_WEB + spirvStorageClass = -1; + spirvDecorate = nullptr; + spirvByReference = false; + spirvLiteral = false; +#endif } void clearInterstage() @@ -570,6 +585,7 @@ public: bool specConstant : 1; bool nonUniform : 1; bool explicitOffset : 1; + bool defaultBlock : 1; // default blocks with matching names have structures merged when linking #ifdef GLSLANG_WEB bool isWriteOnly() const { return false; } @@ -588,6 +604,12 @@ public: bool isNoContraction() const { return false; } void setNoContraction() { } bool isPervertexNV() const { return false; } + void setNullInit() { } + bool isNullInit() const { return false; } + void setSpirvByReference() { } + bool isSpirvByReference() { return false; } + void setSpirvLiteral() { } + bool isSpirvLiteral() { return false; } #else bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects bool nopersp : 1; @@ -609,6 +631,9 @@ public: bool subgroupcoherent : 1; bool shadercallcoherent : 1; bool nonprivate : 1; + bool nullInit : 1; + bool spirvByReference : 1; + bool spirvLiteral : 1; bool isWriteOnly() const { return writeonly; } bool isReadOnly() const { return readonly; } bool isRestrict() const { return restrict; } @@ -644,6 +669,12 @@ public: bool isNoContraction() const { return noContraction; } void setNoContraction() { noContraction = true; } bool isPervertexNV() const { return pervertexNV; } + void setNullInit() { nullInit = true; } + bool isNullInit() const { return nullInit; } + void setSpirvByReference() { spirvByReference = true; } + bool isSpirvByReference() const { return spirvByReference; } + void setSpirvLiteral() { spirvLiteral = true; } + bool isSpirvLiteral() const { return spirvLiteral; } #endif bool isPipeInput() const @@ -749,6 +780,46 @@ public: } } + TBlockStorageClass getBlockStorage() const { + if (storage == EvqUniform && !isPushConstant()) { + return EbsUniform; + } + else if (storage == EvqUniform) { + return EbsPushConstant; + } + else if (storage == EvqBuffer) { + return EbsStorageBuffer; + } + return EbsNone; + } + + void setBlockStorage(TBlockStorageClass newBacking) { +#ifndef GLSLANG_WEB + layoutPushConstant = (newBacking == EbsPushConstant); +#endif + switch (newBacking) { + case EbsUniform : + if (layoutPacking == ElpStd430) { + // std430 would not be valid + layoutPacking = ElpStd140; + } + storage = EvqUniform; + break; + case EbsStorageBuffer : + storage = EvqBuffer; + break; +#ifndef GLSLANG_WEB + case EbsPushConstant : + storage = EvqUniform; + layoutSet = TQualifier::layoutSetEnd; + layoutBinding = TQualifier::layoutBindingEnd; + break; +#endif + default: + break; + } + } + #ifdef GLSLANG_WEB bool isPerView() const { return false; } bool isTaskMemory() const { return false; } @@ -845,6 +916,7 @@ public: return hasNonXfbLayout() || hasXfb(); } + TLayoutMatrix layoutMatrix : 3; TLayoutPacking layoutPacking : 4; int layoutOffset; @@ -896,6 +968,10 @@ public: bool layoutViewportRelative; int layoutSecondaryViewportRelativeOffset; bool layoutShaderRecord; + + // GL_EXT_spirv_intrinsics + int spirvStorageClass; + TSpirvDecorate* spirvDecorate; #endif bool hasUniformLayout() const @@ -1027,6 +1103,15 @@ public: { return nonUniform; } + + // GL_EXT_spirv_intrinsics + bool hasSprivDecorate() const { return spirvDecorate != nullptr; } + void setSpirvDecorate(int decoration, const TIntermAggregate* args = nullptr); + void setSpirvDecorateId(int decoration, const TIntermAggregate* args); + void setSpirvDecorateString(int decoration, const TIntermAggregate* args); + const TSpirvDecorate& getSpirvDecorate() const { assert(spirvDecorate); return *spirvDecorate; } + TSpirvDecorate& getSpirvDecorate() { assert(spirvDecorate); return *spirvDecorate; } + TString getSpirvDecorateQualifierString() const; #endif bool hasSpecConstantId() const { @@ -1371,6 +1456,10 @@ public: const TType* userDef; TSourceLoc loc; TArraySizes* typeParameters; +#ifndef GLSLANG_WEB + // SPIR-V type defined by spirv_type directive + TSpirvType* spirvType; +#endif #ifdef GLSLANG_WEB bool isCoopmat() const { return false; } @@ -1389,6 +1478,9 @@ public: loc = l; typeParameters = nullptr; coopmat = false; +#ifndef GLSLANG_WEB + spirvType = nullptr; +#endif } void initQualifiers(bool global = false) @@ -1425,6 +1517,11 @@ public: return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr; } +#ifndef GLSLANG_WEB + // GL_EXT_spirv_intrinsics + void setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams = nullptr); +#endif + // "Image" is a superset of "Subpass" bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } @@ -1442,6 +1539,9 @@ public: bool isVector = false) : basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) +#ifndef GLSLANG_WEB + , spirvType(nullptr) +#endif { sampler.clear(); qualifier.clear(); @@ -1453,6 +1553,9 @@ public: bool isVector = false) : basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) +#ifndef GLSLANG_WEB + , spirvType(nullptr) +#endif { sampler.clear(); qualifier.clear(); @@ -1466,6 +1569,9 @@ public: basicType(p.basicType), vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat), arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters) +#ifndef GLSLANG_WEB + , spirvType(p.spirvType) +#endif { if (basicType == EbtSampler) sampler = p.sampler; @@ -1500,6 +1606,9 @@ public: basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr), sampler(sampler), typeParameters(nullptr) +#ifndef GLSLANG_WEB + , spirvType(nullptr) +#endif { qualifier.clear(); qualifier.storage = q; @@ -1550,6 +1659,9 @@ public: TType(TTypeList* userDef, const TString& n) : basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr) +#ifndef GLSLANG_WEB + , spirvType(nullptr) +#endif { sampler.clear(); qualifier.clear(); @@ -1559,6 +1671,9 @@ public: TType(TTypeList* userDef, const TString& n, const TQualifier& q) : basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr) +#ifndef GLSLANG_WEB + , spirvType(nullptr) +#endif { sampler.clear(); typeName = NewPoolTString(n.c_str()); @@ -1567,6 +1682,9 @@ public: explicit TType(TBasicType t, const TType &p, const TString& n) : basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr) +#ifndef GLSLANG_WEB + , spirvType(nullptr) +#endif { assert(t == EbtReference); typeName = NewPoolTString(n.c_str()); @@ -1597,6 +1715,9 @@ public: referentType = copyOf.referentType; } typeParameters = copyOf.typeParameters; +#ifndef GLSLANG_WEB + spirvType = copyOf.spirvType; +#endif coopmat = copyOf.isCoopMat(); } @@ -1687,6 +1808,7 @@ public: virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); } virtual bool isScalarOrVec1() const { return isScalar() || vector1; } + virtual bool isScalarOrVector() const { return !isMatrix() && !isStruct() && !isArray(); } virtual bool isVector() const { return vectorSize > 1 || vector1; } virtual bool isMatrix() const { return matrixCols ? true : false; } virtual bool isArray() const { return arraySizes != nullptr; } @@ -1717,7 +1839,7 @@ public: } virtual bool isOpaque() const { return basicType == EbtSampler #ifndef GLSLANG_WEB - || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery + || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery #endif ; } virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } @@ -1965,8 +2087,6 @@ public: } } - - const char* getBasicString() const { return TType::getBasicString(basicType); @@ -1997,6 +2117,7 @@ public: case EbtRayQuery: return "rayQueryEXT"; case EbtReference: return "reference"; case EbtString: return "string"; + case EbtSpirvType: return "spirv_type"; #endif default: return "unknown type"; } @@ -2017,6 +2138,9 @@ public: const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); }; const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); }; + if (qualifier.hasSprivDecorate()) + appendStr(qualifier.getSpirvDecorateQualifierString().c_str()); + if (qualifier.hasLayout()) { // To reduce noise, skip this if the only layout is an xfb_buffer // with no triggering xfb_offset. @@ -2164,6 +2288,12 @@ public: appendStr(" specialization-constant"); if (qualifier.nonUniform) appendStr(" nonuniform"); + if (qualifier.isNullInit()) + appendStr(" null-init"); + if (qualifier.isSpirvByReference()) + appendStr(" spirv_by_reference"); + if (qualifier.isSpirvLiteral()) + appendStr(" spirv_literal"); appendStr(" "); appendStr(getStorageQualifierString()); if (isArray()) { @@ -2283,6 +2413,17 @@ public: name += ';' ; } + // These variables are inconsistently declared inside and outside of gl_PerVertex in glslang right now. + // They are declared inside of 'in gl_PerVertex', but sitting as standalone when they are 'out'puts. + bool isInconsistentGLPerVertexMember(const TString& name) const + { + if (name == "gl_SecondaryPositionNV" || + name == "gl_PositionPerViewNV") + return true; + return false; + } + + // Do two structure types match? They could be declared independently, // in different places, but still might satisfy the definition of matching. // From the spec: @@ -2298,22 +2439,48 @@ public: (isStruct() && right.isStruct() && structure == right.structure)) return true; - // Both being nullptr was caught above, now they both have to be structures of the same number of elements - if (!isStruct() || !right.isStruct() || - structure->size() != right.structure->size()) - return false; - // Structure names have to match if (*typeName != *right.typeName) return false; - // Compare the names and types of all the members, which have to match - for (unsigned int i = 0; i < structure->size(); ++i) { - if ((*structure)[i].type->getFieldName() != (*right.structure)[i].type->getFieldName()) - return false; + // There are inconsistencies with how gl_PerVertex is setup. For now ignore those as errors if they + // are known inconsistencies. + bool isGLPerVertex = *typeName == "gl_PerVertex"; - if (*(*structure)[i].type != *(*right.structure)[i].type) - return false; + // Both being nullptr was caught above, now they both have to be structures of the same number of elements + if (!isStruct() || !right.isStruct() || + (structure->size() != right.structure->size() && !isGLPerVertex)) + return false; + + // Compare the names and types of all the members, which have to match + for (size_t li = 0, ri = 0; li < structure->size() || ri < right.structure->size(); ++li, ++ri) { + if (li < structure->size() && ri < right.structure->size()) { + if ((*structure)[li].type->getFieldName() == (*right.structure)[ri].type->getFieldName()) { + if (*(*structure)[li].type != *(*right.structure)[ri].type) + return false; + } else { + // If one of the members is something that's inconsistently declared, skip over it + // for now. + if (isGLPerVertex) { + if (isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) { + ri--; + continue; + } else if (isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) { + li--; + continue; + } + } else { + return false; + } + } + // If we get here, then there should only be inconsistently declared members left + } else if (li < structure->size()) { + if (!isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) + return false; + } else { + if (!isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) + return false; + } } return true; @@ -2363,6 +2530,15 @@ public: (typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters)); } +#ifndef GLSLANG_WEB + // See if two type's SPIR-V type contents match + bool sameSpirvType(const TType& right) const + { + return ((spirvType == nullptr && right.spirvType == nullptr) || + (spirvType != nullptr && right.spirvType != nullptr && *spirvType == *right.spirvType)); + } +#endif + // See if two type's elements match in all ways except basic type bool sameElementShape(const TType& right) const { @@ -2401,7 +2577,11 @@ public: // See if two types match in all ways (just the actual type, not qualification) bool operator==(const TType& right) const { +#ifndef GLSLANG_WEB + return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameSpirvType(right); +#else return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right); +#endif } bool operator!=(const TType& right) const @@ -2420,6 +2600,10 @@ public: return 0; } +#ifndef GLSLANG_WEB + const TSpirvType& getSpirvType() const { assert(spirvType); return *spirvType; } +#endif + protected: // Require consumer to pick between deep copy and shallow copy. TType(const TType& type); @@ -2432,6 +2616,19 @@ protected: { shallowCopy(copyOf); +#ifndef GLSLANG_WEB + // GL_EXT_spirv_intrinsics + if (copyOf.qualifier.spirvDecorate) { + qualifier.spirvDecorate = new TSpirvDecorate; + *qualifier.spirvDecorate = *copyOf.qualifier.spirvDecorate; + } + + if (copyOf.spirvType) { + spirvType = new TSpirvType; + *spirvType = *copyOf.spirvType; + } +#endif + if (copyOf.arraySizes) { arraySizes = new TArraySizes; *arraySizes = *copyOf.arraySizes; @@ -2491,6 +2688,9 @@ protected: TString *typeName; // for structure type name TSampler sampler; TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types +#ifndef GLSLANG_WEB + TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive +#endif }; } // end namespace glslang diff --git a/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h b/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h index d01a115f69..f100a9aa82 100644 --- a/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h +++ b/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h @@ -100,8 +100,9 @@ typedef enum { typedef enum { GLSLANG_TARGET_VULKAN_1_0 = (1 << 22), GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12), + GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12), GLSLANG_TARGET_OPENGL_450 = 450, - LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT), + LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 4), } glslang_target_client_version_t; /* SH_TARGET_LanguageVersion counterpart */ @@ -112,7 +113,7 @@ typedef enum { GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8), GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8), GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8), - LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT), + LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT = 6), } glslang_target_language_version_t; /* EShExecutable counterpart */ diff --git a/thirdparty/glslang/glslang/Include/intermediate.h b/thirdparty/glslang/glslang/Include/intermediate.h index 19cd32e9a8..1e6ab4aa7a 100644 --- a/thirdparty/glslang/glslang/Include/intermediate.h +++ b/thirdparty/glslang/glslang/Include/intermediate.h @@ -71,6 +71,9 @@ enum TOperator { EOpFunctionCall, EOpFunction, // For function definition EOpParameters, // an aggregate listing the parameters to a function +#ifndef GLSLANG_WEB + EOpSpirvInst, +#endif // // Unary operators @@ -593,6 +596,7 @@ enum TOperator { EOpTime, EOpAtomicAdd, + EOpAtomicSubtract, EOpAtomicMin, EOpAtomicMax, EOpAtomicAnd, @@ -922,6 +926,7 @@ enum TOperator { EOpMul32x16, EOpTraceNV, + EOpTraceRayMotionNV, EOpTraceKHR, EOpReportIntersection, EOpIgnoreIntersectionNV, @@ -1135,6 +1140,8 @@ public: virtual TBasicType getBasicType() const { return type.getBasicType(); } virtual TQualifier& getQualifier() { return type.getQualifier(); } virtual const TQualifier& getQualifier() const { return type.getQualifier(); } + virtual TArraySizes* getArraySizes() { return type.getArraySizes(); } + virtual const TArraySizes* getArraySizes() const { return type.getArraySizes(); } virtual void propagatePrecision(TPrecisionQualifier); virtual int getVectorSize() const { return type.getVectorSize(); } virtual int getMatrixCols() const { return type.getMatrixCols(); } @@ -1275,15 +1282,15 @@ public: // if symbol is initialized as symbol(sym), the memory comes from the pool allocator of sym. If sym comes from // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol - TIntermSymbol(int i, const TString& n, const TType& t) + TIntermSymbol(long long i, const TString& n, const TType& t) : TIntermTyped(t), id(i), #ifndef GLSLANG_WEB flattenSubset(-1), #endif constSubtree(nullptr) { name = n; } - virtual int getId() const { return id; } - virtual void changeId(int i) { id = i; } + virtual long long getId() const { return id; } + virtual void changeId(long long i) { id = i; } virtual const TString& getName() const { return name; } virtual void traverse(TIntermTraverser*); virtual TIntermSymbol* getAsSymbolNode() { return this; } @@ -1301,10 +1308,10 @@ public: // This is meant for cases where a node has already been constructed, and // later on, it becomes necessary to switch to a different symbol. - virtual void switchId(int newId) { id = newId; } + virtual void switchId(long long newId) { id = newId; } protected: - int id; // the unique id of the symbol this node represents + long long id; // the unique id of the symbol this node represents #ifndef GLSLANG_WEB int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced #endif @@ -1613,8 +1620,15 @@ public: virtual TIntermUnary* getAsUnaryNode() { return this; } virtual const TIntermUnary* getAsUnaryNode() const { return this; } virtual void updatePrecision(); +#ifndef GLSLANG_WEB + void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } + const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } +#endif protected: TIntermTyped* operand; +#ifndef GLSLANG_WEB + TSpirvInstruction spirvInst; +#endif }; typedef TVector<TIntermNode*> TIntermSequence; @@ -1645,6 +1659,10 @@ public: bool getDebug() const { return debug; } void setPragmaTable(const TPragmaTable& pTable); const TPragmaTable& getPragmaTable() const { return *pragmaTable; } +#ifndef GLSLANG_WEB + void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } + const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } +#endif protected: TIntermAggregate(const TIntermAggregate&); // disallow copy constructor TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator @@ -1655,6 +1673,9 @@ protected: bool optimize; bool debug; TPragmaTable* pragmaTable; +#ifndef GLSLANG_WEB + TSpirvInstruction spirvInst; +#endif }; // @@ -1672,8 +1693,11 @@ public: flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermTyped* getCondition() const { return condition; } + virtual void setCondition(TIntermTyped* c) { condition = c; } virtual TIntermNode* getTrueBlock() const { return trueBlock; } + virtual void setTrueBlock(TIntermTyped* tb) { trueBlock = tb; } virtual TIntermNode* getFalseBlock() const { return falseBlock; } + virtual void setFalseBlock(TIntermTyped* fb) { falseBlock = fb; } virtual TIntermSelection* getAsSelectionNode() { return this; } virtual const TIntermSelection* getAsSelectionNode() const { return this; } diff --git a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp index e21cf427f0..4629cc2da5 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp @@ -529,7 +529,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EbtDouble: case EbtFloat16: case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break; - case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break; + // Note: avoid UBSAN error regarding negating 0x80000000 + case EbtInt: newConstArray[i].setIConst( + unionArray[i].getIConst() == 0x80000000 + ? -0x7FFFFFFF - 1 + : -unionArray[i].getIConst()); + break; case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break; #ifndef GLSLANG_WEB case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break; @@ -599,17 +604,11 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) newConstArray[i].setDConst(log(unionArray[i].getDConst())); break; case EOpExp2: - { - const double inv_log2_e = 0.69314718055994530941723212145818; - newConstArray[i].setDConst(exp(unionArray[i].getDConst() * inv_log2_e)); - break; - } + newConstArray[i].setDConst(exp2(unionArray[i].getDConst())); + break; case EOpLog2: - { - const double log2_e = 1.4426950408889634073599246810019; - newConstArray[i].setDConst(log2_e * log(unionArray[i].getDConst())); - break; - } + newConstArray[i].setDConst(log2(unionArray[i].getDConst())); + break; case EOpSqrt: newConstArray[i].setDConst(sqrt(unionArray[i].getDConst())); break; diff --git a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp index a5ef6ccaf6..823406c18d 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp @@ -483,7 +483,8 @@ void TBuiltIns::relateTabledBuiltins(int /* version */, EProfile /* profile */, inline bool IncludeLegacy(int version, EProfile profile, const SpvVersion& spvVersion) { - return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && ARBCompatibility) || profile == ECompatibilityProfile); + return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && version == 140 && ARBCompatibility) || + profile == ECompatibilityProfile); } // Construct TBuiltInParseables base class. This can be used for language-common constructs. @@ -931,7 +932,203 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } - if (profile != EEsProfile && version >= 450) { + if (profile == EEsProfile && version >= 310) { // Explicit Types + commonBuiltins.append( + + "float64_t sqrt(float64_t);" + "f64vec2 sqrt(f64vec2);" + "f64vec3 sqrt(f64vec3);" + "f64vec4 sqrt(f64vec4);" + + "float64_t inversesqrt(float64_t);" + "f64vec2 inversesqrt(f64vec2);" + "f64vec3 inversesqrt(f64vec3);" + "f64vec4 inversesqrt(f64vec4);" + + "float64_t abs(float64_t);" + "f64vec2 abs(f64vec2);" + "f64vec3 abs(f64vec3);" + "f64vec4 abs(f64vec4);" + + "float64_t sign(float64_t);" + "f64vec2 sign(f64vec2);" + "f64vec3 sign(f64vec3);" + "f64vec4 sign(f64vec4);" + + "float64_t floor(float64_t);" + "f64vec2 floor(f64vec2);" + "f64vec3 floor(f64vec3);" + "f64vec4 floor(f64vec4);" + + "float64_t trunc(float64_t);" + "f64vec2 trunc(f64vec2);" + "f64vec3 trunc(f64vec3);" + "f64vec4 trunc(f64vec4);" + + "float64_t round(float64_t);" + "f64vec2 round(f64vec2);" + "f64vec3 round(f64vec3);" + "f64vec4 round(f64vec4);" + + "float64_t roundEven(float64_t);" + "f64vec2 roundEven(f64vec2);" + "f64vec3 roundEven(f64vec3);" + "f64vec4 roundEven(f64vec4);" + + "float64_t ceil(float64_t);" + "f64vec2 ceil(f64vec2);" + "f64vec3 ceil(f64vec3);" + "f64vec4 ceil(f64vec4);" + + "float64_t fract(float64_t);" + "f64vec2 fract(f64vec2);" + "f64vec3 fract(f64vec3);" + "f64vec4 fract(f64vec4);" + + "float64_t mod(float64_t, float64_t);" + "f64vec2 mod(f64vec2 , float64_t);" + "f64vec3 mod(f64vec3 , float64_t);" + "f64vec4 mod(f64vec4 , float64_t);" + "f64vec2 mod(f64vec2 , f64vec2);" + "f64vec3 mod(f64vec3 , f64vec3);" + "f64vec4 mod(f64vec4 , f64vec4);" + + "float64_t modf(float64_t, out float64_t);" + "f64vec2 modf(f64vec2, out f64vec2);" + "f64vec3 modf(f64vec3, out f64vec3);" + "f64vec4 modf(f64vec4, out f64vec4);" + + "float64_t min(float64_t, float64_t);" + "f64vec2 min(f64vec2, float64_t);" + "f64vec3 min(f64vec3, float64_t);" + "f64vec4 min(f64vec4, float64_t);" + "f64vec2 min(f64vec2, f64vec2);" + "f64vec3 min(f64vec3, f64vec3);" + "f64vec4 min(f64vec4, f64vec4);" + + "float64_t max(float64_t, float64_t);" + "f64vec2 max(f64vec2 , float64_t);" + "f64vec3 max(f64vec3 , float64_t);" + "f64vec4 max(f64vec4 , float64_t);" + "f64vec2 max(f64vec2 , f64vec2);" + "f64vec3 max(f64vec3 , f64vec3);" + "f64vec4 max(f64vec4 , f64vec4);" + + "float64_t clamp(float64_t, float64_t, float64_t);" + "f64vec2 clamp(f64vec2 , float64_t, float64_t);" + "f64vec3 clamp(f64vec3 , float64_t, float64_t);" + "f64vec4 clamp(f64vec4 , float64_t, float64_t);" + "f64vec2 clamp(f64vec2 , f64vec2 , f64vec2);" + "f64vec3 clamp(f64vec3 , f64vec3 , f64vec3);" + "f64vec4 clamp(f64vec4 , f64vec4 , f64vec4);" + + "float64_t mix(float64_t, float64_t, float64_t);" + "f64vec2 mix(f64vec2, f64vec2, float64_t);" + "f64vec3 mix(f64vec3, f64vec3, float64_t);" + "f64vec4 mix(f64vec4, f64vec4, float64_t);" + "f64vec2 mix(f64vec2, f64vec2, f64vec2);" + "f64vec3 mix(f64vec3, f64vec3, f64vec3);" + "f64vec4 mix(f64vec4, f64vec4, f64vec4);" + "float64_t mix(float64_t, float64_t, bool);" + "f64vec2 mix(f64vec2, f64vec2, bvec2);" + "f64vec3 mix(f64vec3, f64vec3, bvec3);" + "f64vec4 mix(f64vec4, f64vec4, bvec4);" + + "float64_t step(float64_t, float64_t);" + "f64vec2 step(f64vec2 , f64vec2);" + "f64vec3 step(f64vec3 , f64vec3);" + "f64vec4 step(f64vec4 , f64vec4);" + "f64vec2 step(float64_t, f64vec2);" + "f64vec3 step(float64_t, f64vec3);" + "f64vec4 step(float64_t, f64vec4);" + + "float64_t smoothstep(float64_t, float64_t, float64_t);" + "f64vec2 smoothstep(f64vec2 , f64vec2 , f64vec2);" + "f64vec3 smoothstep(f64vec3 , f64vec3 , f64vec3);" + "f64vec4 smoothstep(f64vec4 , f64vec4 , f64vec4);" + "f64vec2 smoothstep(float64_t, float64_t, f64vec2);" + "f64vec3 smoothstep(float64_t, float64_t, f64vec3);" + "f64vec4 smoothstep(float64_t, float64_t, f64vec4);" + + "float64_t length(float64_t);" + "float64_t length(f64vec2);" + "float64_t length(f64vec3);" + "float64_t length(f64vec4);" + + "float64_t distance(float64_t, float64_t);" + "float64_t distance(f64vec2 , f64vec2);" + "float64_t distance(f64vec3 , f64vec3);" + "float64_t distance(f64vec4 , f64vec4);" + + "float64_t dot(float64_t, float64_t);" + "float64_t dot(f64vec2 , f64vec2);" + "float64_t dot(f64vec3 , f64vec3);" + "float64_t dot(f64vec4 , f64vec4);" + + "f64vec3 cross(f64vec3, f64vec3);" + + "float64_t normalize(float64_t);" + "f64vec2 normalize(f64vec2);" + "f64vec3 normalize(f64vec3);" + "f64vec4 normalize(f64vec4);" + + "float64_t faceforward(float64_t, float64_t, float64_t);" + "f64vec2 faceforward(f64vec2, f64vec2, f64vec2);" + "f64vec3 faceforward(f64vec3, f64vec3, f64vec3);" + "f64vec4 faceforward(f64vec4, f64vec4, f64vec4);" + + "float64_t reflect(float64_t, float64_t);" + "f64vec2 reflect(f64vec2 , f64vec2 );" + "f64vec3 reflect(f64vec3 , f64vec3 );" + "f64vec4 reflect(f64vec4 , f64vec4 );" + + "float64_t refract(float64_t, float64_t, float64_t);" + "f64vec2 refract(f64vec2 , f64vec2 , float64_t);" + "f64vec3 refract(f64vec3 , f64vec3 , float64_t);" + "f64vec4 refract(f64vec4 , f64vec4 , float64_t);" + + "f64mat2 matrixCompMult(f64mat2, f64mat2);" + "f64mat3 matrixCompMult(f64mat3, f64mat3);" + "f64mat4 matrixCompMult(f64mat4, f64mat4);" + "f64mat2x3 matrixCompMult(f64mat2x3, f64mat2x3);" + "f64mat2x4 matrixCompMult(f64mat2x4, f64mat2x4);" + "f64mat3x2 matrixCompMult(f64mat3x2, f64mat3x2);" + "f64mat3x4 matrixCompMult(f64mat3x4, f64mat3x4);" + "f64mat4x2 matrixCompMult(f64mat4x2, f64mat4x2);" + "f64mat4x3 matrixCompMult(f64mat4x3, f64mat4x3);" + + "f64mat2 outerProduct(f64vec2, f64vec2);" + "f64mat3 outerProduct(f64vec3, f64vec3);" + "f64mat4 outerProduct(f64vec4, f64vec4);" + "f64mat2x3 outerProduct(f64vec3, f64vec2);" + "f64mat3x2 outerProduct(f64vec2, f64vec3);" + "f64mat2x4 outerProduct(f64vec4, f64vec2);" + "f64mat4x2 outerProduct(f64vec2, f64vec4);" + "f64mat3x4 outerProduct(f64vec4, f64vec3);" + "f64mat4x3 outerProduct(f64vec3, f64vec4);" + + "f64mat2 transpose(f64mat2);" + "f64mat3 transpose(f64mat3);" + "f64mat4 transpose(f64mat4);" + "f64mat2x3 transpose(f64mat3x2);" + "f64mat3x2 transpose(f64mat2x3);" + "f64mat2x4 transpose(f64mat4x2);" + "f64mat4x2 transpose(f64mat2x4);" + "f64mat3x4 transpose(f64mat4x3);" + "f64mat4x3 transpose(f64mat3x4);" + + "float64_t determinant(f64mat2);" + "float64_t determinant(f64mat3);" + "float64_t determinant(f64mat4);" + + "f64mat2 inverse(f64mat2);" + "f64mat3 inverse(f64mat3);" + "f64mat4 inverse(f64mat4);" + + "\n"); + } + + if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "int64_t abs(int64_t);" @@ -998,25 +1195,25 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "u64vec3 mix(u64vec3, u64vec3, bvec3);" "u64vec4 mix(u64vec4, u64vec4, bvec4);" - "int64_t doubleBitsToInt64(double);" - "i64vec2 doubleBitsToInt64(dvec2);" - "i64vec3 doubleBitsToInt64(dvec3);" - "i64vec4 doubleBitsToInt64(dvec4);" + "int64_t doubleBitsToInt64(float64_t);" + "i64vec2 doubleBitsToInt64(f64vec2);" + "i64vec3 doubleBitsToInt64(f64vec3);" + "i64vec4 doubleBitsToInt64(f64vec4);" - "uint64_t doubleBitsToUint64(double);" - "u64vec2 doubleBitsToUint64(dvec2);" - "u64vec3 doubleBitsToUint64(dvec3);" - "u64vec4 doubleBitsToUint64(dvec4);" + "uint64_t doubleBitsToUint64(float64_t);" + "u64vec2 doubleBitsToUint64(f64vec2);" + "u64vec3 doubleBitsToUint64(f64vec3);" + "u64vec4 doubleBitsToUint64(f64vec4);" - "double int64BitsToDouble(int64_t);" - "dvec2 int64BitsToDouble(i64vec2);" - "dvec3 int64BitsToDouble(i64vec3);" - "dvec4 int64BitsToDouble(i64vec4);" + "float64_t int64BitsToDouble(int64_t);" + "f64vec2 int64BitsToDouble(i64vec2);" + "f64vec3 int64BitsToDouble(i64vec3);" + "f64vec4 int64BitsToDouble(i64vec4);" - "double uint64BitsToDouble(uint64_t);" - "dvec2 uint64BitsToDouble(u64vec2);" - "dvec3 uint64BitsToDouble(u64vec3);" - "dvec4 uint64BitsToDouble(u64vec4);" + "float64_t uint64BitsToDouble(uint64_t);" + "f64vec2 uint64BitsToDouble(u64vec2);" + "f64vec3 uint64BitsToDouble(u64vec3);" + "f64vec4 uint64BitsToDouble(u64vec4);" "int64_t packInt2x32(ivec2);" "uint64_t packUint2x32(uvec2);" @@ -1065,6 +1262,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "bvec3 notEqual(u64vec3, u64vec3);" "bvec4 notEqual(u64vec4, u64vec4);" + "int64_t bitCount(int64_t);" + "i64vec2 bitCount(i64vec2);" + "i64vec3 bitCount(i64vec3);" + "i64vec4 bitCount(i64vec4);" + + "int64_t bitCount(uint64_t);" + "i64vec2 bitCount(u64vec2);" + "i64vec3 bitCount(u64vec3);" + "i64vec4 bitCount(u64vec4);" + "int64_t findLSB(int64_t);" "i64vec2 findLSB(i64vec2);" "i64vec3 findLSB(i64vec3);" @@ -1230,11 +1437,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV " int64_t atomicMin(coherent volatile inout int64_t, int64_t);" "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t, int, int, int);" " int64_t atomicMin(coherent volatile inout int64_t, int64_t, int, int, int);" + "float16_t atomicMin(coherent volatile inout float16_t, float16_t);" + "float16_t atomicMin(coherent volatile inout float16_t, float16_t, int, int, int);" + " float atomicMin(coherent volatile inout float, float);" + " float atomicMin(coherent volatile inout float, float, int, int, int);" + " double atomicMin(coherent volatile inout double, double);" + " double atomicMin(coherent volatile inout double, double, int, int, int);" "uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);" " int64_t atomicMax(coherent volatile inout int64_t, int64_t);" "uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t, int, int, int);" " int64_t atomicMax(coherent volatile inout int64_t, int64_t, int, int, int);" + "float16_t atomicMax(coherent volatile inout float16_t, float16_t);" + "float16_t atomicMax(coherent volatile inout float16_t, float16_t, int, int, int);" + " float atomicMax(coherent volatile inout float, float);" + " float atomicMax(coherent volatile inout float, float, int, int, int);" + " double atomicMax(coherent volatile inout double, double);" + " double atomicMax(coherent volatile inout double, double, int, int, int);" "uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);" " int64_t atomicAnd(coherent volatile inout int64_t, int64_t);" @@ -1255,6 +1474,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV " int64_t atomicAdd(coherent volatile inout int64_t, int64_t);" "uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);" " int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);" + "float16_t atomicAdd(coherent volatile inout float16_t, float16_t);" + "float16_t atomicAdd(coherent volatile inout float16_t, float16_t, int, int, int);" " float atomicAdd(coherent volatile inout float, float);" " float atomicAdd(coherent volatile inout float, float, int, int, int);" " double atomicAdd(coherent volatile inout double, double);" @@ -1264,6 +1485,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV " int64_t atomicExchange(coherent volatile inout int64_t, int64_t);" "uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);" " int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);" + "float16_t atomicExchange(coherent volatile inout float16_t, float16_t);" + "float16_t atomicExchange(coherent volatile inout float16_t, float16_t, int, int, int);" " float atomicExchange(coherent volatile inout float, float);" " float atomicExchange(coherent volatile inout float, float, int, int, int);" " double atomicExchange(coherent volatile inout double, double);" @@ -1276,11 +1499,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);" " int64_t atomicLoad(coherent volatile in int64_t, int, int, int);" + "float16_t atomicLoad(coherent volatile in float16_t, int, int, int);" " float atomicLoad(coherent volatile in float, int, int, int);" " double atomicLoad(coherent volatile in double, int, int, int);" "void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);" "void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);" + "void atomicStore(coherent volatile out float16_t, float16_t, int, int, int);" "void atomicStore(coherent volatile out float, float, int, int, int);" "void atomicStore(coherent volatile out double, double, int, int, int);" "\n"); @@ -1335,6 +1560,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "dvec4 fma(dvec4, dvec4, dvec4 );" "\n"); } + + if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64 + commonBuiltins.append( + "float64_t fma(float64_t, float64_t, float64_t);" + "f64vec2 fma(f64vec2, f64vec2, f64vec2 );" + "f64vec3 fma(f64vec3, f64vec3, f64vec3 );" + "f64vec4 fma(f64vec4, f64vec4, f64vec4 );" + "\n"); + } #endif if ((profile == EEsProfile && version >= 310) || @@ -1371,6 +1605,21 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + + if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64 + commonBuiltins.append( + "float64_t frexp(float64_t, out int);" + "f64vec2 frexp( f64vec2, out ivec2);" + "f64vec3 frexp( f64vec3, out ivec3);" + "f64vec4 frexp( f64vec4, out ivec4);" + + "float64_t ldexp(float64_t, int);" + "f64vec2 ldexp( f64vec2, ivec2);" + "f64vec3 ldexp( f64vec3, ivec3);" + "f64vec4 ldexp( f64vec4, ivec4);" + + "\n"); + } #endif #endif @@ -1615,6 +1864,22 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + if (profile != EEsProfile && version == 450) { + commonBuiltins.append( + "uint atomicCounterAddARB(atomic_uint, uint);" + "uint atomicCounterSubtractARB(atomic_uint, uint);" + "uint atomicCounterMinARB(atomic_uint, uint);" + "uint atomicCounterMaxARB(atomic_uint, uint);" + "uint atomicCounterAndARB(atomic_uint, uint);" + "uint atomicCounterOrARB(atomic_uint, uint);" + "uint atomicCounterXorARB(atomic_uint, uint);" + "uint atomicCounterExchangeARB(atomic_uint, uint);" + "uint atomicCounterCompSwapARB(atomic_uint, uint, uint);" + + "\n"); + } + + if (profile != EEsProfile && version >= 460) { commonBuiltins.append( "uint atomicCounterAdd(atomic_uint, uint);" @@ -1630,6 +1895,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } } + else if (spvVersion.vulkanRelaxed) { + // + // Atomic counter functions act as aliases to normal atomic functions. + // replace definitions to take 'volatile coherent uint' instead of 'atomic_uint' + // and map to equivalent non-counter atomic op + // + if ((profile != EEsProfile && version >= 300) || + (profile == EEsProfile && version >= 310)) { + commonBuiltins.append( + "uint atomicCounterIncrement(volatile coherent uint);" + "uint atomicCounterDecrement(volatile coherent uint);" + "uint atomicCounter(volatile coherent uint);" + + "\n"); + } + if (profile != EEsProfile && version >= 460) { + commonBuiltins.append( + "uint atomicCounterAdd(volatile coherent uint, uint);" + "uint atomicCounterSubtract(volatile coherent uint, uint);" + "uint atomicCounterMin(volatile coherent uint, uint);" + "uint atomicCounterMax(volatile coherent uint, uint);" + "uint atomicCounterAnd(volatile coherent uint, uint);" + "uint atomicCounterOr(volatile coherent uint, uint);" + "uint atomicCounterXor(volatile coherent uint, uint);" + "uint atomicCounterExchange(volatile coherent uint, uint);" + "uint atomicCounterCompSwap(volatile coherent uint, uint, uint);" + + "\n"); + } + } #endif // !GLSLANG_ANGLE // Bitfield @@ -3116,7 +3411,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV #ifndef GLSLANG_ANGLE // GL_AMD_gpu_shader_half_float/Explicit types - if (profile != EEsProfile && version >= 450) { + if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "float16_t radians(float16_t);" "f16vec2 radians(f16vec2);" @@ -3464,7 +3759,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } // Explicit types - if (profile != EEsProfile && version >= 450) { + if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "int8_t abs(int8_t);" "i8vec2 abs(i8vec2);" @@ -4124,7 +4419,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } #ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 420) || esBarrier) { - if (spvVersion.vulkan == 0) { + if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) { commonBuiltins.append("void memoryBarrierAtomicCounter();"); } commonBuiltins.append("void memoryBarrierImage();"); @@ -4382,7 +4677,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } - // Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing/GL_EXT_ray_query + // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query if (profile != EEsProfile && version >= 460) { commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);" "void rayQueryTerminateEXT(rayQueryEXT);" @@ -4411,6 +4706,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangRayGen].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" @@ -4425,12 +4721,14 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); stageBuiltins[EShLangClosestHit].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" "\n"); stageBuiltins[EShLangMiss].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" @@ -4848,6 +5146,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in int gl_VertexIndex;" "in int gl_InstanceIndex;" ); + + if (spvVersion.vulkan > 0 && version >= 140 && spvVersion.vulkanRelaxed) + stageBuiltins[EShLangVertex].append( + "in int gl_VertexID;" // declare with 'in' qualifier + "in int gl_InstanceID;" + ); + if (version >= 440) { stageBuiltins[EShLangVertex].append( "in int gl_BaseVertexARB;" @@ -4885,7 +5190,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "mediump float gl_PointSize;" // needs qualifier fixed later ); } else { - if (spvVersion.vulkan == 0) + if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) stageBuiltins[EShLangVertex].append( "in highp int gl_VertexID;" // needs qualifier fixed later "in highp int gl_InstanceID;" // needs qualifier fixed later @@ -5632,6 +5937,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in mat3x4 gl_WorldToObject3x4EXT;" "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" + "in float gl_CurrentRayTimeNV;" "\n"; const char *hitDecls = "in uvec3 gl_LaunchIDNV;" @@ -5667,6 +5973,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in mat3x4 gl_WorldToObject3x4EXT;" "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" + "in float gl_CurrentRayTimeNV;" "\n"; const char *missDecls = "in uvec3 gl_LaunchIDNV;" @@ -5685,6 +5992,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in float gl_RayTmaxEXT;" "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" + "in float gl_CurrentRayTimeNV;" "\n"; const char *callableDecls = @@ -6211,6 +6519,24 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); + + commonBuiltins.append("float imageAtomicMin(volatile coherent "); + commonBuiltins.append(imageParams); + commonBuiltins.append(", float);\n"); + + commonBuiltins.append("float imageAtomicMin(volatile coherent "); + commonBuiltins.append(imageParams); + commonBuiltins.append(", float"); + commonBuiltins.append(", int, int, int);\n"); + + commonBuiltins.append("float imageAtomicMax(volatile coherent "); + commonBuiltins.append(imageParams); + commonBuiltins.append(", float);\n"); + + commonBuiltins.append("float imageAtomicMax(volatile coherent "); + commonBuiltins.append(imageParams); + commonBuiltins.append(", float"); + commonBuiltins.append(", int, int, int);\n"); } } } @@ -6538,7 +6864,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, s.append(");\n"); // Add to the per-language set of built-ins - if (bias || lodClamp != 0) { + if (!grad && (bias || lodClamp != 0)) { stageBuiltins[EShLangFragment].append(s); stageBuiltins[EShLangCompute].append(s); } else @@ -6979,6 +7305,9 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors); s.append(builtInConstant); + + snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingVectors = %d;", resources.maxVaryingVectors); + s.append(builtInConstant); } snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs); @@ -7011,7 +7340,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents); s.append(builtInConstant); - if (version < 150 || ARBCompatibility) { + // Moved from just being deprecated into compatibility profile only as of 4.20 + if (version < 420 || profile == ECompatibilityProfile) { snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats); s.append(builtInConstant); } @@ -7436,6 +7766,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); } + if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { + // treat these built-ins as aliases of VertexIndex and InstanceIndex + BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable); + BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable); + } + if (profile != EEsProfile) { if (version >= 440) { symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters); @@ -7947,6 +8283,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("atomicCounter" , 1, &E_GL_ARB_shader_atomic_counters); } + // E_GL_ARB_shader_atomic_counter_ops + if (profile != EEsProfile && version == 450) { + symbolTable.setFunctionExtensions("atomicCounterAddARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterSubtractARB", 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterMinARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterMaxARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterAndARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterOrARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterXorARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterExchangeARB", 1, &E_GL_ARB_shader_atomic_counter_ops); + symbolTable.setFunctionExtensions("atomicCounterCompSwapARB", 1, &E_GL_ARB_shader_atomic_counter_ops); + } + // E_GL_ARB_derivative_control if (profile != EEsProfile && version < 450) { symbolTable.setFunctionExtensions("dFdxFine", 1, &E_GL_ARB_derivative_control); @@ -8475,11 +8824,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_WorldToObject3x4EXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing); + symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur); symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); symbolTable.setFunctionExtensions("traceNV", 1, &E_GL_NV_ray_tracing); + symbolTable.setFunctionExtensions("traceRayMotionNV", 1, &E_GL_NV_ray_tracing_motion_blur); symbolTable.setFunctionExtensions("traceRayEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing); @@ -8523,6 +8874,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); + BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable); // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); @@ -8912,6 +9264,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter); symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage); + if (spvVersion.vulkanRelaxed) { + // + // functions signature have been replaced to take uint operations on buffer variables + // remap atomic counter functions to atomic operations + // + symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierBuffer); + } + symbolTable.relateToOperator("atomicLoad", EOpAtomicLoad); symbolTable.relateToOperator("atomicStore", EOpAtomicStore); @@ -8919,12 +9279,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement); symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter); + if (spvVersion.vulkanRelaxed) { + // + // functions signature have been replaced to take uint operations + // remap atomic counter functions to atomic operations + // + // these atomic counter functions do not match signatures of glsl + // atomic functions, so they will be remapped to semantically + // equivalent functions in the parser + // + symbolTable.relateToOperator("atomicCounterIncrement", EOpNull); + symbolTable.relateToOperator("atomicCounterDecrement", EOpNull); + symbolTable.relateToOperator("atomicCounter", EOpNull); + } + symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR); symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR); symbolTable.relateToOperator("clockRealtimeEXT", EOpReadClockDeviceKHR); symbolTable.relateToOperator("clockRealtime2x32EXT", EOpReadClockDeviceKHR); + if (profile != EEsProfile && version == 450) { + symbolTable.relateToOperator("atomicCounterAddARB", EOpAtomicCounterAdd); + symbolTable.relateToOperator("atomicCounterSubtractARB", EOpAtomicCounterSubtract); + symbolTable.relateToOperator("atomicCounterMinARB", EOpAtomicCounterMin); + symbolTable.relateToOperator("atomicCounterMaxARB", EOpAtomicCounterMax); + symbolTable.relateToOperator("atomicCounterAndARB", EOpAtomicCounterAnd); + symbolTable.relateToOperator("atomicCounterOrARB", EOpAtomicCounterOr); + symbolTable.relateToOperator("atomicCounterXorARB", EOpAtomicCounterXor); + symbolTable.relateToOperator("atomicCounterExchangeARB", EOpAtomicCounterExchange); + symbolTable.relateToOperator("atomicCounterCompSwapARB", EOpAtomicCounterCompSwap); + } + if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd); symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract); @@ -8937,6 +9323,23 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap); } + if (spvVersion.vulkanRelaxed) { + // + // functions signature have been replaced to take 'uint' instead of 'atomic_uint' + // remap atomic counter functions to non-counter atomic ops so + // functions act as aliases to non-counter atomic ops + // + symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicAdd); + symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicSubtract); + symbolTable.relateToOperator("atomicCounterMin", EOpAtomicMin); + symbolTable.relateToOperator("atomicCounterMax", EOpAtomicMax); + symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicAnd); + symbolTable.relateToOperator("atomicCounterOr", EOpAtomicOr); + symbolTable.relateToOperator("atomicCounterXor", EOpAtomicXor); + symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicExchange); + symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCompSwap); + } + symbolTable.relateToOperator("fma", EOpFma); symbolTable.relateToOperator("frexp", EOpFrexp); symbolTable.relateToOperator("ldexp", EOpLdexp); @@ -9315,6 +9718,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion case EShLangMiss: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("traceNV", EOpTraceNV); + symbolTable.relateToOperator("traceRayMotionNV", EOpTraceRayMotionNV); symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR); symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR); diff --git a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp index f6172a2bf7..0278445969 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -65,7 +65,7 @@ namespace glslang { // Returns the added node. // -TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, const TConstUnionArray& constArray, +TIntermSymbol* TIntermediate::addSymbol(long long id, const TString& name, const TType& type, const TConstUnionArray& constArray, TIntermTyped* constSubtree, const TSourceLoc& loc) { TIntermSymbol* node = new TIntermSymbol(id, name, type); @@ -1739,7 +1739,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtUint: switch (from) { case EbtInt: - return version >= 400 || getSource() == EShSourceHlsl; + return version >= 400 || getSource() == EShSourceHlsl || IsRequestedExtension(E_GL_ARB_gpu_shader5); case EbtBool: return getSource() == EShSourceHlsl; case EbtInt16: @@ -2676,7 +2676,11 @@ TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors<selectorType>& selecto // 'swizzleOkay' says whether or not it is okay to consider a swizzle // a valid part of the dereference chain. // -const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay) +// 'BufferReferenceOk' says if type is buffer_reference, the routine stop to find the most left node. +// +// + +const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay , bool bufferReferenceOk) { do { const TIntermBinary* binary = node->getAsBinaryNode(); @@ -2694,6 +2698,8 @@ const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool return nullptr; } node = node->getAsBinaryNode()->getLeft(); + if (bufferReferenceOk && node->isReference()) + return node; } while (true); } @@ -2870,7 +2876,7 @@ void TIntermediate::addToCallGraph(TInfoSink& /*infoSink*/, const TString& calle return; } - callGraph.push_front(TCall(caller, callee)); + callGraph.emplace_front(caller, callee); } // @@ -3776,11 +3782,16 @@ void TIntermBinary::updatePrecision() { if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { - getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision); - if (getQualifier().precision != EpqNone) { - left->propagatePrecision(getQualifier().precision); - right->propagatePrecision(getQualifier().precision); - } + if (op == EOpRightShift || op == EOpLeftShift) { + // For shifts get precision from left side only and thus no need to propagate + getQualifier().precision = left->getQualifier().precision; + } else { + getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision); + if (getQualifier().precision != EpqNone) { + left->propagatePrecision(getQualifier().precision); + right->propagatePrecision(getQualifier().precision); + } + } } } diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp index 3efa27aca3..02cca409e1 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp @@ -601,7 +601,6 @@ void TParseContextBase::parseSwizzleSelector(const TSourceLoc& loc, const TStrin selector.push_back(0); } -#ifdef ENABLE_HLSL // // Make the passed-in variable information become a member of the // global uniform block. If this doesn't exist yet, make it. @@ -646,7 +645,67 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem ++firstNewMember; } -#endif + +void TParseContextBase::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) { + // Make the atomic counter block, if not yet made. + const auto &at = atomicCounterBuffers.find(binding); + if (at == atomicCounterBuffers.end()) { + atomicCounterBuffers.insert({binding, (TVariable*)nullptr }); + atomicCounterBlockFirstNewMember.insert({binding, 0}); + } + + TVariable*& atomicCounterBuffer = atomicCounterBuffers[binding]; + int& bufferNewMember = atomicCounterBlockFirstNewMember[binding]; + + if (atomicCounterBuffer == nullptr) { + TQualifier blockQualifier; + blockQualifier.clear(); + blockQualifier.storage = EvqBuffer; + + char charBuffer[512]; + if (binding != TQualifier::layoutBindingEnd) { + snprintf(charBuffer, 512, "%s_%d", getAtomicCounterBlockName(), binding); + } else { + snprintf(charBuffer, 512, "%s_0", getAtomicCounterBlockName()); + } + + TType blockType(new TTypeList, *NewPoolTString(charBuffer), blockQualifier); + setUniformBlockDefaults(blockType); + blockType.getQualifier().layoutPacking = ElpStd430; + atomicCounterBuffer = new TVariable(NewPoolTString(""), blockType, true); + // If we arn't auto mapping bindings then set the block to use the same + // binding as what the atomic was set to use + if (!intermediate.getAutoMapBindings()) { + atomicCounterBuffer->getWritableType().getQualifier().layoutBinding = binding; + } + bufferNewMember = 0; + + atomicCounterBuffer->getWritableType().getQualifier().layoutSet = atomicCounterBlockSet; + } + + // Add the requested member as a member to the global block. + TType* type = new TType; + type->shallowCopy(memberType); + type->setFieldName(memberName); + if (typeList) + type->setStruct(typeList); + TTypeLoc typeLoc = {type, loc}; + atomicCounterBuffer->getType().getWritableStruct()->push_back(typeLoc); + + // Insert into the symbol table. + if (bufferNewMember == 0) { + // This is the first request; we need a normal symbol table insert + if (symbolTable.insert(*atomicCounterBuffer)) + trackLinkage(*atomicCounterBuffer); + else + error(loc, "failed to insert the global constant buffer", "buffer", ""); + } else { + // This is a follow-on request; we need to amend the first insert + symbolTable.amend(*atomicCounterBuffer, bufferNewMember); + } + + ++bufferNewMember; +} void TParseContextBase::finish() { diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp index 9c42a204f7..b957bb87ca 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -87,6 +87,10 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b globalInputDefaults.clear(); globalOutputDefaults.clear(); + globalSharedDefaults.clear(); + globalSharedDefaults.layoutMatrix = ElmColumnMajor; + globalSharedDefaults.layoutPacking = ElpStd430; + #ifndef GLSLANG_WEB // "Shaders in the transform // feedback capturing mode have an initial global default of @@ -221,6 +225,118 @@ void TParseContext::parserError(const char* s) error(getCurrentLoc(), "compilation terminated", "", ""); } +void TParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) +{ + bool createBlock = globalUniformBlock == nullptr; + + if (createBlock) { + globalUniformBinding = intermediate.getGlobalUniformBinding(); + globalUniformSet = intermediate.getGlobalUniformSet(); + } + + // use base class function to create/expand block + TParseContextBase::growGlobalUniformBlock(loc, memberType, memberName, typeList); + + if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { + // check for a block storage override + TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getGlobalUniformBlockName()); + TQualifier& qualifier = globalUniformBlock->getWritableType().getQualifier(); + qualifier.defaultBlock = true; + + if (storageOverride != EbsNone) { + if (createBlock) { + // Remap block storage + qualifier.setBlockStorage(storageOverride); + + // check that the change didn't create errors + blockQualifierCheck(loc, qualifier, false); + } + + // remap meber storage as well + memberType.getQualifier().setBlockStorage(storageOverride); + } + } +} + +void TParseContext::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) +{ + bool createBlock = atomicCounterBuffers.find(binding) == atomicCounterBuffers.end(); + + if (createBlock) { + atomicCounterBlockSet = intermediate.getAtomicCounterBlockSet(); + } + + // use base class function to create/expand block + TParseContextBase::growAtomicCounterBlock(binding, loc, memberType, memberName, typeList); + TQualifier& qualifier = atomicCounterBuffers[binding]->getWritableType().getQualifier(); + qualifier.defaultBlock = true; + + if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { + // check for a Block storage override + TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getAtomicCounterBlockName()); + + if (storageOverride != EbsNone) { + if (createBlock) { + // Remap block storage + + qualifier.setBlockStorage(storageOverride); + + // check that the change didn't create errors + blockQualifierCheck(loc, qualifier, false); + } + + // remap meber storage as well + memberType.getQualifier().setBlockStorage(storageOverride); + } + } +} + +const char* TParseContext::getGlobalUniformBlockName() const +{ + const char* name = intermediate.getGlobalUniformBlockName(); + if (std::string(name) == "") + return "gl_DefaultUniformBlock"; + else + return name; +} +void TParseContext::finalizeGlobalUniformBlockLayout(TVariable&) +{ +} +void TParseContext::setUniformBlockDefaults(TType& block) const +{ + block.getQualifier().layoutPacking = ElpStd140; + block.getQualifier().layoutMatrix = ElmColumnMajor; +} + + +const char* TParseContext::getAtomicCounterBlockName() const +{ + const char* name = intermediate.getAtomicCounterBlockName(); + if (std::string(name) == "") + return "gl_AtomicCounterBlock"; + else + return name; +} +void TParseContext::finalizeAtomicCounterBlockLayout(TVariable&) +{ +} + +void TParseContext::setAtomicCounterBlockDefaults(TType& block) const +{ + block.getQualifier().layoutPacking = ElpStd430; + block.getQualifier().layoutMatrix = ElmRowMajor; +} + +void TParseContext::setInvariant(const TSourceLoc& loc, const char* builtin) { + TSymbol* symbol = symbolTable.find(builtin); + if (symbol && symbol->getType().getQualifier().isPipeOutput()) { + if (intermediate.inIoAccessed(builtin)) + warn(loc, "changing qualification after use", "invariant", builtin); + TSymbol* csymbol = symbolTable.copyUp(symbol); + csymbol->getWritableType().getQualifier().invariant = true; + } +} + void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens) { #ifndef GLSLANG_WEB @@ -298,8 +414,33 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& intermediate.setUseVariablePointers(); } else if (tokens[0].compare("once") == 0) { warn(loc, "not implemented", "#pragma once", ""); - } else if (tokens[0].compare("glslang_binary_double_output") == 0) + } else if (tokens[0].compare("glslang_binary_double_output") == 0) { intermediate.setBinaryDoubleOutput(); + } else if (spvVersion.spv > 0 && tokens[0].compare("STDGL") == 0 && + tokens[1].compare("invariant") == 0 && tokens[3].compare("all") == 0) { + intermediate.setInvariantAll(); + // Set all builtin out variables invariant if declared + setInvariant(loc, "gl_Position"); + setInvariant(loc, "gl_PointSize"); + setInvariant(loc, "gl_ClipDistance"); + setInvariant(loc, "gl_CullDistance"); + setInvariant(loc, "gl_TessLevelOuter"); + setInvariant(loc, "gl_TessLevelInner"); + setInvariant(loc, "gl_PrimitiveID"); + setInvariant(loc, "gl_Layer"); + setInvariant(loc, "gl_ViewportIndex"); + setInvariant(loc, "gl_FragDepth"); + setInvariant(loc, "gl_SampleMask"); + setInvariant(loc, "gl_ClipVertex"); + setInvariant(loc, "gl_FrontColor"); + setInvariant(loc, "gl_BackColor"); + setInvariant(loc, "gl_FrontSecondaryColor"); + setInvariant(loc, "gl_BackSecondaryColor"); + setInvariant(loc, "gl_TexCoord"); + setInvariant(loc, "gl_FogFragCoord"); + setInvariant(loc, "gl_FragColor"); + setInvariant(loc, "gl_FragData"); + } #endif } @@ -986,12 +1127,31 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn); if (symbol && symbol->getAsFunction() && builtIn) requireProfile(loc, ~EEsProfile, "redefinition of built-in function"); +#ifndef GLSLANG_WEB + // Check the validity of using spirv_literal qualifier + for (int i = 0; i < function.getParamCount(); ++i) { + if (function[i].type->getQualifier().isSpirvLiteral() && function.getBuiltInOp() != EOpSpirvInst) + error(loc, "'spirv_literal' can only be used on functions defined with 'spirv_instruction' for argument", + function.getName().c_str(), "%d", i + 1); + } + + // For function declaration with SPIR-V instruction qualifier, always ignore the built-in function and + // respect this redeclared one. + if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst) + symbol = nullptr; +#endif const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0; if (prevDec) { if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); if (prevDec->getType() != function.getType()) error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); +#ifndef GLSLANG_WEB + if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) { + error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(), + "spirv_instruction"); + } +#endif for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); @@ -1131,6 +1291,14 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction { TIntermTyped* result = nullptr; + if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) { + // allow calls that are invalid in Vulkan Semantics to be invisibily + // remapped to equivalent valid functions + result = vkRelaxedRemapFunctionCall(loc, function, arguments); + if (result) + return result; + } + if (function->getBuiltInOp() == EOpArrayLength) result = handleLengthMethod(loc, function, arguments); else if (function->getBuiltInOp() != EOpNull) { @@ -1185,6 +1353,15 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped())) error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", ""); } +#ifndef GLSLANG_WEB + if (formalQualifier.isSpirvLiteral()) { + if (!arg->getAsTyped()->getQualifier().isFrontEndConstant()) { + error(arguments->getLoc(), + "Non front-end constant expressions cannot be passed for 'spirv_literal' parameters.", + "spirv_literal", ""); + } + } +#endif const TType& argType = arg->getAsTyped()->getType(); const TQualifier& argQualifier = argType.getQualifier(); if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) { @@ -1239,6 +1416,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) { // A function call mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); +#ifndef GLSLANG_WEB + } else if (fnCandidate->getBuiltInOp() == EOpSpirvInst) { + // When SPIR-V instruction qualifier is specified, the function call is still mapped to a built-in operation. + result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); +#endif } else { // This is a function call not mapped to built-in operator. // It could still be a built-in function, but only if PureOperatorBuiltins == false. @@ -1316,6 +1498,35 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo } else if (result->getAsOperator()) builtInOpCheck(loc, function, *result->getAsOperator()); +#ifndef GLSLANG_WEB + // Special handling for function call with SPIR-V instruction qualifier specified + if (function.getBuiltInOp() == EOpSpirvInst) { + if (auto agg = result->getAsAggregate()) { + // Propogate spirv_by_reference/spirv_literal from parameters to arguments + auto& sequence = agg->getSequence(); + for (unsigned i = 0; i < sequence.size(); ++i) { + if (function[i].type->getQualifier().isSpirvByReference()) + sequence[i]->getAsTyped()->getQualifier().setSpirvByReference(); + if (function[i].type->getQualifier().isSpirvLiteral()) + sequence[i]->getAsTyped()->getQualifier().setSpirvLiteral(); + } + + // Attach the function call to SPIR-V intruction + agg->setSpirvInstruction(function.getSpirvInstruction()); + } else if (auto unaryNode = result->getAsUnaryNode()) { + // Propogate spirv_by_reference/spirv_literal from parameters to arguments + if (function[0].type->getQualifier().isSpirvByReference()) + unaryNode->getOperand()->getQualifier().setSpirvByReference(); + if (function[0].type->getQualifier().isSpirvLiteral()) + unaryNode->getOperand()->getQualifier().setSpirvLiteral(); + + // Attach the function call to SPIR-V intruction + unaryNode->setSpirvInstruction(function.getSpirvInstruction()); + } else + assert(0); + } +#endif + return result; } @@ -1723,6 +1934,7 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& // Grab the semantics and storage class semantics from the operands, based on opcode switch (callNode.getOp()) { case EOpAtomicAdd: + case EOpAtomicSubtract: case EOpAtomicMin: case EOpAtomicMax: case EOpAtomicAnd: @@ -1981,7 +2193,13 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan profileRequires(loc, ~EEsProfile, 450, nullptr, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); } - + // As per GL_ARB_sparse_texture2 extension "Offsets" parameter must be constant integral expression + // for sparseTextureGatherOffsetsARB just as textureGatherOffsets + if (callNode.getOp() == EOpSparseTextureGatherOffsets) { + int offsetsArg = arg0->getType().getSampler().shadow ? 3 : 2; + if (!(*argp)[offsetsArg]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "offsets", ""); + } break; } @@ -2070,6 +2288,16 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"); } } + + if (callNode.getOp() == EOpTextureOffset) { + TSampler s = arg0->getType().getSampler(); + if (s.is2D() && s.isArrayed() && s.isShadow()) { + if (isEsProfile()) + error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile"); + else if (version <= 420) + error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420"); + } + } } break; @@ -2080,6 +2308,10 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (!(*argp)[10]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); break; + case EOpTraceRayMotionNV: + if (!(*argp)[11]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", "a"); + break; case EOpTraceKHR: if (!(*argp)[10]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); @@ -2148,18 +2380,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), ""); else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui) error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), ""); - } else { - bool isImageAtomicOnFloatAllowed = ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) || - (fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) || - (fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0) || - (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0)); - if (imageType.getSampler().type == EbtFloat && isImageAtomicOnFloatAllowed && - (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)) // imageAtomicExchange doesn't require GL_EXT_shader_atomic_float + } else if (imageType.getSampler().type == EbtFloat) { + if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0) { + // imageAtomicExchange doesn't require an extension + } else if ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) || + (fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) || + (fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0)) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str()); - if (!isImageAtomicOnFloatAllowed) + } else if ((fnCandidate.getName().compare(0, 14, "imageAtomicMin") == 0) || + (fnCandidate.getName().compare(0, 14, "imageAtomicMax") == 0)) { + requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); + } else { error(loc, "only supported on integer images", fnCandidate.getName().c_str(), ""); - else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile()) + } + if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile()) error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), ""); + } else { + error(loc, "not supported on this image type", fnCandidate.getName().c_str(), ""); } const size_t maxArgs = imageType.getSampler().isMultiSample() ? 5 : 4; @@ -2172,6 +2409,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } case EOpAtomicAdd: + case EOpAtomicSubtract: case EOpAtomicMin: case EOpAtomicMax: case EOpAtomicAnd: @@ -2187,17 +2425,37 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan memorySemanticsCheck(loc, fnCandidate, callNode); if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) && - (arg0->getType().isFloatingDomain())) { + (arg0->getType().getBasicType() == EbtFloat || + arg0->getType().getBasicType() == EbtDouble)) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str()); + } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || + callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore || + callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) && + arg0->getType().isFloatingDomain()) { + requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); } } else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) { const char* const extensions[2] = { E_GL_NV_shader_atomic_int64, E_GL_EXT_shader_atomic_int64 }; requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) && - (arg0->getType().isFloatingDomain())) { + (arg0->getType().getBasicType() == EbtFloat || + arg0->getType().getBasicType() == EbtDouble)) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str()); + } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || + callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore || + callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) && + arg0->getType().isFloatingDomain()) { + requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); } + + const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true , true); + const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr; + const TQualifier& qualifier = (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier(); + if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer) + error(loc,"Atomic memory function can only be used for shader storage block member or shared variable.", + fnCandidate.getName().c_str(), ""); + break; } @@ -2752,6 +3010,11 @@ void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TInt if (!(symNode && symNode->getQualifier().isWriteOnly())) // base class checks if (symNode && symNode->getQualifier().isExplicitInterpolation()) error(loc, "can't read from explicitly-interpolated object: ", op, symNode->getName().c_str()); + + // local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned. + if(node->getQualifier().builtIn == EbvWorkGroupSize && + !(intermediate.isLocalSizeSet() || intermediate.isLocalSizeSpecialized())) + error(loc, "can't read from gl_WorkGroupSize before a fixed workgroup size has been declared", op, ""); } // @@ -2794,7 +3057,8 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide // "Identifiers starting with "gl_" are reserved for use by OpenGL, and may not be // declared in a shader; this results in a compile-time error." if (! symbolTable.atBuiltInLevel()) { - if (builtInName(identifier)) + if (builtInName(identifier) && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) + // The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "gl_". error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), ""); // "__" are not supposed to be an error. ES 300 (and desktop) added the clarification: @@ -2802,7 +3066,8 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide // reserved; using such a name does not itself result in an error, but may result // in undefined behavior." // however, before that, ES tests required an error. - if (identifier.find("__") != TString::npos) { + if (identifier.find("__") != TString::npos && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) { + // The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "__". if (isEsProfile() && version < 300) error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version < 300", identifier.c_str(), ""); else @@ -2823,14 +3088,16 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden // single underscore) are also reserved, and defining such a name results in a // compile-time error." // however, before that, ES tests required an error. - if (strncmp(identifier, "GL_", 3) == 0) + if (strncmp(identifier, "GL_", 3) == 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) + // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "GL_". ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier); else if (strncmp(identifier, "defined", 8) == 0) if (relaxedErrors()) ppWarn(loc, "\"defined\" is (un)defined:", op, identifier); else ppError(loc, "\"defined\" can't be (un)defined:", op, identifier); - else if (strstr(identifier, "__") != 0) { + else if (strstr(identifier, "__") != 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) { + // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "__". if (isEsProfile() && version >= 300 && (strcmp(identifier, "__LINE__") == 0 || strcmp(identifier, "__FILE__") == 0 || @@ -2978,6 +3245,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T bool matrixInMatrix = false; bool arrayArg = false; bool floatArgument = false; + bool intArgument = false; for (int arg = 0; arg < function.getParamCount(); ++arg) { if (function[arg].type->isArray()) { if (function[arg].type->isUnsizedArray()) { @@ -3008,6 +3276,8 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T specConstType = true; if (function[arg].type->isFloatingDomain()) floatArgument = true; + if (function[arg].type->isIntegerDomain()) + intArgument = true; if (type.isStruct()) { if (function[arg].type->contains16BitFloat()) { requireFloat16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type"); @@ -3113,6 +3383,15 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // and aren't making an array. makeSpecConst = ! floatArgument && ! type.isArray(); break; + + case EOpConstructVec2: + case EOpConstructVec3: + case EOpConstructVec4: + // This was the list of valid ones, if they aren't converting from int + // and aren't making an array. + makeSpecConst = ! intArgument && !type.isArray(); + break; + default: // anything else wasn't white-listed in the spec as a conversion makeSpecConst = false; @@ -3379,7 +3658,7 @@ void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& t if (type.containsNonOpaque()) { // Vulkan doesn't allow transparent uniforms outside of blocks - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed) vulkanRemoved(loc, "non-opaque uniforms outside a block"); // OpenGL wants locations on these (unless they are getting automapped) if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations()) @@ -3419,6 +3698,8 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs"); profileRequires(loc, EEsProfile, 300, nullptr, "out for stage outputs"); qualifier.storage = EvqVaryingOut; + if (intermediate.isInvariantAll()) + qualifier.invariant = true; break; case EvqInOut: qualifier.storage = EvqVaryingIn; @@ -3435,7 +3716,7 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q if (blockName == nullptr && qualifier.layoutPacking == ElpStd430) { - error(loc, "it is invalid to declare std430 qualifier on uniform", "", ""); + requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "default std430 layout for uniform"); } break; default: @@ -3445,6 +3726,14 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q if (!nonuniformOkay && qualifier.isNonUniform()) error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", ""); +#ifndef GLSLANG_WEB + if (qualifier.isSpirvByReference()) + error(loc, "can only apply to parameter", "spirv_by_reference", ""); + + if (qualifier.isSpirvLiteral()) + error(loc, "can only apply to parameter", "spirv_literal", ""); +#endif + // Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it. if (!isMemberCheck || structNestingLevel > 0) invariantCheck(loc, qualifier); @@ -3706,6 +3995,41 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(nonUniform); #endif +#ifndef GLSLANG_WEB + // SPIR-V storage class qualifier (GL_EXT_spirv_intrinsics) + dst.spirvStorageClass = src.spirvStorageClass; + + // SPIR-V decorate qualifiers (GL_EXT_spirv_intrinsics) + if (src.hasSprivDecorate()) { + if (dst.hasSprivDecorate()) { + const TSpirvDecorate& srcSpirvDecorate = src.getSpirvDecorate(); + TSpirvDecorate& dstSpirvDecorate = dst.getSpirvDecorate(); + for (auto& decorate : srcSpirvDecorate.decorates) { + if (dstSpirvDecorate.decorates.find(decorate.first) != dstSpirvDecorate.decorates.end()) + error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate", "(decoration=%u)", decorate.first); + else + dstSpirvDecorate.decorates.insert(decorate); + } + + for (auto& decorateId : srcSpirvDecorate.decorateIds) { + if (dstSpirvDecorate.decorateIds.find(decorateId.first) != dstSpirvDecorate.decorateIds.end()) + error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_id", "(decoration=%u)", decorateId.first); + else + dstSpirvDecorate.decorateIds.insert(decorateId); + } + + for (auto& decorateString : srcSpirvDecorate.decorateStrings) { + if (dstSpirvDecorate.decorates.find(decorateString.first) != dstSpirvDecorate.decorates.end()) + error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_string", "(decoration=%u)", decorateString.first); + else + dstSpirvDecorate.decorates.insert(decorateString); + } + } else { + dst.spirvDecorate = src.spirvDecorate; + } + } +#endif + if (repeated) error(loc, "replicated qualifiers", "", ""); } @@ -4292,8 +4616,10 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS // If it wasn't at a built-in level, then it's already been redeclared; // that is, this is a redeclaration of a redeclaration; reuse that initial // redeclaration. Otherwise, make the new one. - if (builtIn) + if (builtIn) { makeEditable(symbol); + symbolTable.amendSymbolIdLevel(*symbol); + } // Now, modify the type of the copy, as per the type of the current redeclaration. @@ -4667,6 +4993,17 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali } if (qualifier.isNonUniform()) type.getQualifier().nonUniform = qualifier.nonUniform; +#ifndef GLSLANG_WEB + if (qualifier.isSpirvByReference()) + type.getQualifier().setSpirvByReference(); + if (qualifier.isSpirvLiteral()) { + if (type.getBasicType() == EbtFloat || type.getBasicType() == EbtInt || type.getBasicType() == EbtUint || + type.getBasicType() == EbtBool) + type.getQualifier().setSpirvLiteral(); + else + error(loc, "cannot use spirv_literal qualifier", type.getBasicTypeString().c_str(), ""); +#endif + } paramCheckFixStorage(loc, qualifier.storage, type); } @@ -4822,7 +5159,7 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, } // get the unique id of the loop index - int loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId(); + long long loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId(); inductiveLoopIds.insert(loopIndex); // condition's form must be "loop-index relational-operator constant-expression" @@ -5008,14 +5345,22 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi return; } if (id == TQualifier::getLayoutPackingString(ElpPacked)) { - if (spvVersion.spv != 0) - spvRemoved(loc, "packed"); + if (spvVersion.spv != 0) { + if (spvVersion.vulkanRelaxed) + return; // silently ignore qualifier + else + spvRemoved(loc, "packed"); + } publicType.qualifier.layoutPacking = ElpPacked; return; } if (id == TQualifier::getLayoutPackingString(ElpShared)) { - if (spvVersion.spv != 0) - spvRemoved(loc, "shared"); + if (spvVersion.spv != 0) { + if (spvVersion.vulkanRelaxed) + return; // silently ignore qualifier + else + spvRemoved(loc, "shared"); + } publicType.qualifier.layoutPacking = ElpShared; return; } @@ -5465,7 +5810,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi if (! IsPow2(value)) error(loc, "must be a power of 2", "buffer_reference_align", ""); else - publicType.qualifier.layoutBufferReferenceAlign = (unsigned int)std::log2(value); + publicType.qualifier.layoutBufferReferenceAlign = IntLog2(value); if (nonLiteral) error(loc, "needs a literal integer", "buffer_reference_align", ""); return; @@ -5726,6 +6071,9 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb case EvqVaryingIn: case EvqVaryingOut: if (!type.getQualifier().isTaskMemory() && +#ifndef GLSLANG_WEB + !type.getQualifier().hasSprivDecorate() && +#endif (type.getBasicType() != EbtBlock || (!(*type.getStruct())[0].type->getQualifier().hasLocation() && (*type.getStruct())[0].type->getQualifier().builtIn == EbvNone))) @@ -5756,6 +6104,8 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb error(loc, "can only specify on a uniform block", "push_constant", ""); if (qualifier.isShaderRecord()) error(loc, "can only specify on a buffer block", "shaderRecordNV", ""); + if (qualifier.hasLocation() && type.isAtomic()) + error(loc, "cannot specify on atomic counter", "location", ""); } break; default: @@ -5785,6 +6135,11 @@ void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool m // Do layout error checking with respect to a type. void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) { +#ifndef GLSLANG_WEB + if (extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) + return; // Skip any check if GL_EXT_spirv_intrinsics is turned on +#endif + const TQualifier& qualifier = type.getQualifier(); // first, intra-layout qualifier-only error checking @@ -5893,16 +6248,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) if (type.getBasicType() == EbtSampler) { int lastBinding = qualifier.layoutBinding; if (type.isArray()) { - if (spvVersion.vulkan > 0) - lastBinding += 1; - else { + if (spvVersion.vulkan == 0) { if (type.isSizedArray()) - lastBinding += type.getCumulativeArraySize(); + lastBinding += (type.getCumulativeArraySize() - 1); else { - lastBinding += 1; #ifndef GLSLANG_WEB - if (spvVersion.vulkan == 0) - warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", ""); + warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", ""); #endif } } @@ -5912,7 +6263,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); #endif } - if (type.isAtomic()) { + if (type.isAtomic() && !spvVersion.vulkanRelaxed) { if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", ""); return; @@ -6026,12 +6377,28 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) } } +static bool storageCanHaveLayoutInBlock(const enum TStorageQualifier storage) +{ + switch (storage) { + case EvqUniform: + case EvqBuffer: + case EvqShared: + return true; + default: + return false; + } +} + // Do layout error checking that can be done within a layout qualifier proper, not needing to know // if there are blocks, atomic counters, variables, etc. void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier) { - if (qualifier.storage == EvqShared && qualifier.hasLayout()) - error(loc, "cannot apply layout qualifiers to a shared variable", "shared", ""); + if (qualifier.storage == EvqShared && qualifier.hasLayout()) { + if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) { + error(loc, "shared block requires at least SPIR-V 1.4", "shared block", ""); + } + profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block"); + } // "It is a compile-time error to use *component* without also specifying the location qualifier (order does not matter)." if (qualifier.hasComponent() && ! qualifier.hasLocation()) @@ -6114,7 +6481,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "can only be used on an output", "xfb layout qualifier", ""); } if (qualifier.hasUniformLayout()) { - if (! qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory()) { + if (!storageCanHaveLayoutInBlock(qualifier.storage) && !qualifier.isTaskMemory()) { if (qualifier.hasMatrix() || qualifier.hasPacking()) error(loc, "matrix or packing qualifiers can only be used on a uniform or buffer", "layout", ""); if (qualifier.hasOffset() || qualifier.hasAlign()) @@ -6273,8 +6640,11 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64); if (isEsProfile()) - function = (extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310) ? - findFunction120(loc, call, builtIn) : findFunctionExact(loc, call, builtIn); + function = (explicitTypesEnabled && version >= 310) + ? findFunctionExplicitTypes(loc, call, builtIn) + : ((extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310) + ? findFunction120(loc, call, builtIn) + : findFunctionExact(loc, call, builtIn)); else if (version < 120) function = findFunctionExact(loc, call, builtIn); else if (version < 400) @@ -6566,6 +6936,68 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc, return bestMatch; } +// +// Adjust function calls that aren't declared in Vulkan to a +// calls with equivalent effects +// +TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments) +{ + TIntermTyped* result = nullptr; + +#ifndef GLSLANG_WEB + if (function->getBuiltInOp() != EOpNull) { + return nullptr; + } + + if (function->getName() == "atomicCounterIncrement") { + // change atomicCounterIncrement into an atomicAdd of 1 + TString name("atomicAdd"); + TType uintType(EbtUint); + + TFunction realFunc(&name, function->getType()); + + for (int i = 0; i < function->getParamCount(); ++i) { + realFunc.addParameter((*function)[i]); + } + + TParameter tmpP = { 0, &uintType }; + realFunc.addParameter(tmpP); + arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true)); + + result = handleFunctionCall(loc, &realFunc, arguments); + } else if (function->getName() == "atomicCounterDecrement") { + // change atomicCounterDecrement into an atomicAdd with -1 + // and subtract 1 from result, to return post-decrement value + TString name("atomicAdd"); + TType uintType(EbtUint); + + TFunction realFunc(&name, function->getType()); + + for (int i = 0; i < function->getParamCount(); ++i) { + realFunc.addParameter((*function)[i]); + } + + TParameter tmpP = { 0, &uintType }; + realFunc.addParameter(tmpP); + arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true)); + + result = handleFunctionCall(loc, &realFunc, arguments); + + // post decrement, so that it matches AtomicCounterDecrement semantics + if (result) { + result = handleBinaryMath(loc, "-", EOpSub, result, intermediate.addConstantUnion(1, loc, true)); + } + } else if (function->getName() == "atomicCounter") { + // change atomicCounter into a direct read of the variable + if (arguments->getAsTyped()) { + result = arguments->getAsTyped(); + } + } +#endif + + return result; +} + // When a declaration includes a type, but not a variable name, it can be used // to establish defaults. void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) @@ -6590,6 +7022,91 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType #endif } +bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&, + TArraySizes*, TIntermTyped* initializer, TType& type) +{ + if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() || + type.getQualifier().storage != EvqUniform || + !(type.containsNonOpaque() +#ifndef GLSLANG_WEB + || type.getBasicType() == EbtAtomicUint +#endif + )) { + return false; + } + + if (type.getQualifier().hasLocation()) { + warn(loc, "ignoring layout qualifier for uniform", identifier.c_str(), "location"); + type.getQualifier().layoutLocation = TQualifier::layoutLocationEnd; + } + + if (initializer) { + warn(loc, "Ignoring initializer for uniform", identifier.c_str(), ""); + initializer = nullptr; + } + + if (type.isArray()) { + // do array size checks here + arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer, false); + + if (arrayQualifierError(loc, type.getQualifier()) || arrayError(loc, type)) { + error(loc, "array param error", identifier.c_str(), ""); + } + } + + // do some checking on the type as it was declared + layoutTypeCheck(loc, type); + + int bufferBinding = TQualifier::layoutBindingEnd; + TVariable* updatedBlock = nullptr; + +#ifndef GLSLANG_WEB + // Convert atomic_uint into members of a buffer block + if (type.isAtomic()) { + type.setBasicType(EbtUint); + type.getQualifier().storage = EvqBuffer; + + type.getQualifier().volatil = true; + type.getQualifier().coherent = true; + + // xxTODO: use logic from fixOffset() to apply explicit member offset + bufferBinding = type.getQualifier().layoutBinding; + type.getQualifier().layoutBinding = TQualifier::layoutBindingEnd; + type.getQualifier().explicitOffset = false; + growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr); + updatedBlock = atomicCounterBuffers[bufferBinding]; + } +#endif + + if (!updatedBlock) { + growGlobalUniformBlock(loc, type, identifier, nullptr); + updatedBlock = globalUniformBlock; + } + + // + // don't assign explicit member offsets here + // if any are assigned, need to be updated here and in the merge/link step + // fixBlockUniformOffsets(updatedBlock->getWritableType().getQualifier(), *updatedBlock->getWritableType().getWritableStruct()); + + // checks on update buffer object + layoutObjectCheck(loc, *updatedBlock); + + TSymbol* symbol = symbolTable.find(identifier); + + if (!symbol) { + if (updatedBlock == globalUniformBlock) + error(loc, "error adding uniform to default uniform block", identifier.c_str(), ""); + else + error(loc, "error adding atomic counter to atomic counter block", identifier.c_str(), ""); + return false; + } + + // merge qualifiers + mergeObjectLayoutQualifiers(updatedBlock->getWritableType().getQualifier(), type.getQualifier(), true); + + return true; +} + // // Do everything necessary to handle a variable (non-block) declaration. // Either redeclaring a variable, or making a new one, updating the symbol @@ -6701,6 +7218,14 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden if (symbol == nullptr) reservedErrorCheck(loc, identifier); + if (symbol == nullptr && spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { + bool remapped = vkRelaxedRemapUniformVariable(loc, identifier, publicType, arraySizes, initializer, type); + + if (remapped) { + return nullptr; + } + } + inheritGlobalDefaults(type.getQualifier()); // Declare the variable @@ -6808,6 +7333,11 @@ TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString& // TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable) { + // A null initializer is an aggregate that hasn't had an op assigned yet + // (still EOpNull, no relation to nullInit), and has no children. + bool nullInit = initializer->getAsAggregate() && initializer->getAsAggregate()->getOp() == EOpNull && + initializer->getAsAggregate()->getSequence().size() == 0; + // // Identifier must be of type constant, a global, or a temporary, and // starting at version 120, desktop allows uniforms to have initializers. @@ -6815,9 +7345,36 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp TStorageQualifier qualifier = variable->getType().getQualifier().storage; if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst || (qualifier == EvqUniform && !isEsProfile() && version >= 120))) { - error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), ""); + if (qualifier == EvqShared) { + // GL_EXT_null_initializer allows this for shared, if it's a null initializer + if (nullInit) { + const char* feature = "initialization with shared qualifier"; + profileRequires(loc, EEsProfile, 0, E_GL_EXT_null_initializer, feature); + profileRequires(loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, feature); + } else { + error(loc, "initializer can only be a null initializer ('{}')", "shared", ""); + } + } else { + error(loc, " cannot initialize this type of qualifier ", + variable->getType().getStorageQualifierString(), ""); + return nullptr; + } + } + + if (nullInit) { + // only some types can be null initialized + if (variable->getType().containsUnsizedArray()) { + error(loc, "null initializers can't size unsized arrays", "{}", ""); + return nullptr; + } + if (variable->getType().containsOpaque()) { + error(loc, "null initializers can't be used on opaque values", "{}", ""); + return nullptr; + } + variable->getWritableType().getQualifier().setNullInit(); return nullptr; } + arrayObjectCheck(loc, variable->getType(), "array initializer"); // @@ -6861,13 +7418,15 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp // Uniforms require a compile-time constant initializer if (qualifier == EvqUniform && ! initializer->getType().getQualifier().isFrontEndConstant()) { - error(loc, "uniform initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str()); + error(loc, "uniform initializers must be constant", "=", "'%s'", + variable->getType().getCompleteString().c_str()); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } // Global consts require a constant initializer (specialization constant is okay) if (qualifier == EvqConst && symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) { - error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str()); + error(loc, "global const initializers must be constant", "=", "'%s'", + variable->getType().getCompleteString().c_str()); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } @@ -6887,7 +7446,8 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp // "In declarations of global variables with no storage qualifier or with a const // qualifier any initializer must be a constant expression." if (symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) { - const char* initFeature = "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)"; + const char* initFeature = + "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)"; if (isEsProfile()) { if (relaxedErrors() && ! extensionTurnedOn(E_GL_EXT_shader_non_constant_global_initializers)) warn(loc, "not allowed in this version", initFeature, ""); @@ -6901,7 +7461,8 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp // Compile-time tagging of the variable with its constant value... initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer); - if (! initializer || ! initializer->getType().getQualifier().isConstant() || variable->getType() != initializer->getType()) { + if (! initializer || ! initializer->getType().getQualifier().isConstant() || + variable->getType() != initializer->getType()) { error(loc, "non-matching or non-convertible constant type for const initializer", variable->getType().getStorageQualifierString(), ""); variable->getWritableType().getQualifier().makeTemporary(); @@ -7557,6 +8118,8 @@ void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes) { + if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) + blockStorageRemap(loc, blockName, currentBlockQualifier); blockStageIoCheck(loc, currentBlockQualifier); blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr); if (arraySizes != nullptr) { @@ -7583,6 +8146,10 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con memberQualifier.perViewNV = currentBlockQualifier.perViewNV; if (currentBlockQualifier.perTaskNV) memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV; + if (memberQualifier.storage == EvqSpirvStorageClass) + error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), ""); + if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty()) + error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), ""); #endif if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary())) error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), ""); @@ -7624,6 +8191,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con case EvqBuffer: defaultQualification = globalBufferDefaults; break; case EvqVaryingIn: defaultQualification = globalInputDefaults; break; case EvqVaryingOut: defaultQualification = globalOutputDefaults; break; + case EvqShared: defaultQualification = globalSharedDefaults; break; default: defaultQualification.clear(); break; } @@ -7845,6 +8413,17 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con trackLinkage(variable); } +// +// allow storage type of block to be remapped at compile time +// +void TParseContext::blockStorageRemap(const TSourceLoc&, const TString* instanceName, TQualifier& qualifier) +{ + TBlockStorageClass type = intermediate.getBlockStorageOverride(instanceName->c_str()); + if (type != EbsNone) { + qualifier.setBlockStorage(type); + } +} + // Do all block-declaration checking regarding the combination of in/out/uniform/buffer // with a particular stage. void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier) @@ -7887,6 +8466,12 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q error(loc, "output blocks cannot be used in a task shader", "out", ""); } break; + case EvqShared: + if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) { + error(loc, "shared block requires at least SPIR-V 1.4", "shared block", ""); + } + profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block"); + break; #ifndef GLSLANG_WEB case EvqPayload: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block"); @@ -8045,7 +8630,7 @@ void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) // void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typeList) { - if (!qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory()) + if (!storageCanHaveLayoutInBlock(qualifier.storage) && !qualifier.isTaskMemory()) return; if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430 && qualifier.layoutPacking != ElpScalar) return; @@ -8155,8 +8740,8 @@ void TParseContext::fixBlockUniformLayoutMatrix(TQualifier& qualifier, TTypeList } // -// Spread LayoutPacking to block member, if a block member is a struct, we need spread LayoutPacking to -// this struct member too. and keep this rule for recursive. +// Spread LayoutPacking to matrix or aggregate block members. If a block member is a struct or +// array of struct, spread LayoutPacking recursively to its matrix or aggregate members. // void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeList* originTypeList, TTypeList* tmpTypeList) @@ -8165,11 +8750,13 @@ void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeLis for (unsigned int member = 0; member < originTypeList->size(); ++member) { if (qualifier.layoutPacking != ElpNone) { if (tmpTypeList == nullptr) { - if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone) { + if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone && + !(*originTypeList)[member].type->isScalarOrVector()) { (*originTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking; } } else { - if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone) { + if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone && + !(*tmpTypeList)[member].type->isScalarOrVector()) { (*tmpTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking; } } @@ -8559,8 +9146,14 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con } #endif break; + case EvqShared: + if (qualifier.hasMatrix()) + globalSharedDefaults.layoutMatrix = qualifier.layoutMatrix; + if (qualifier.hasPacking()) + globalSharedDefaults.layoutPacking = qualifier.layoutPacking; + break; default: - error(loc, "default qualifier requires 'uniform', 'buffer', 'in', or 'out' storage qualification", "", ""); + error(loc, "default qualifier requires 'uniform', 'buffer', 'in', 'out' or 'shared' storage qualification", "", ""); return; } diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h index fe2b6fbbe1..de44884653 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h +++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h @@ -67,7 +67,7 @@ struct TPragma { class TScanContext; class TPpContext; -typedef std::set<int> TIdSetType; +typedef std::set<long long> TIdSetType; typedef std::map<const TTypeList*, std::map<size_t, const TTypeList*>> TStructRecord; // @@ -92,7 +92,8 @@ public: limits(resources.limits), globalUniformBlock(nullptr), globalUniformBinding(TQualifier::layoutBindingEnd), - globalUniformSet(TQualifier::layoutSetEnd) + globalUniformSet(TQualifier::layoutSetEnd), + atomicCounterBlockSet(TQualifier::layoutSetEnd) { if (entryPoint != nullptr) sourceEntryPointName = *entryPoint; @@ -154,10 +155,11 @@ public: extensionCallback(line, extension, behavior); } -#ifdef ENABLE_HLSL // Manage the global uniform block (default uniforms in GLSL, $Global in HLSL) virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr); -#endif + + // Manage global buffer (used for backing atomic counters in GLSL when using relaxed Vulkan semantics) + virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr); // Potentially rename shader entry point function void renameShaderFunction(TString*& name) const @@ -230,7 +232,25 @@ protected: // override this to set the language-specific name virtual const char* getGlobalUniformBlockName() const { return ""; } virtual void setUniformBlockDefaults(TType&) const { } - virtual void finalizeGlobalUniformBlockLayout(TVariable&) { } + virtual void finalizeGlobalUniformBlockLayout(TVariable&) {} + + // Manage the atomic counter block (used for atomic_uints with Vulkan-Relaxed) + TMap<int, TVariable*> atomicCounterBuffers; + unsigned int atomicCounterBlockSet; + TMap<int, int> atomicCounterBlockFirstNewMember; + // override this to set the language-specific name + virtual const char* getAtomicCounterBlockName() const { return ""; } + virtual void setAtomicCounterBlockDefaults(TType&) const {} + virtual void setInvariant(const TSourceLoc& loc, const char* builtin) {} + virtual void finalizeAtomicCounterBlockLayout(TVariable&) {} + bool isAtomicCounterBlock(const TSymbol& symbol) { + const TVariable* var = symbol.getAsVariable(); + if (!var) + return false; + const auto& at = atomicCounterBuffers.find(var->getType().getQualifier().layoutBinding); + return (at != atomicCounterBuffers.end() && (*at).second->getType() == var->getType()); + } + virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, TPrefixType prefix, va_list args); @@ -293,6 +313,9 @@ public: bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override; void parserError(const char* s); // for bison's yyerror + virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override; + virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override; + void reservedErrorCheck(const TSourceLoc&, const TString&); void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) override; bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) override; @@ -340,6 +363,10 @@ public: void checkPrecisionQualifier(const TSourceLoc&, TPrecisionQualifier); void memorySemanticsCheck(const TSourceLoc&, const TFunction&, const TIntermOperator& callNode); + TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*); + // returns true if the variable was remapped to something else + bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&); + void assignError(const TSourceLoc&, const char* op, TString left, TString right); void unaryOpError(const TSourceLoc&, const char* op, TString operand); void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right); @@ -392,7 +419,7 @@ public: void arrayLimitCheck(const TSourceLoc&, const TString&, int size); void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature); - void inductiveLoopBodyCheck(TIntermNode*, int loopIndexId, TSymbolTable&); + void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&); void constantIndexExpressionCheck(TIntermNode*); void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&); @@ -417,6 +444,7 @@ public: TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to); void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0); + void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&); void blockStageIoCheck(const TSourceLoc&, const TQualifier&); void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); @@ -443,6 +471,22 @@ public: void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*); // Determine loop control from attributes void handleLoopAttributes(const TAttributes& attributes, TIntermNode*); + // Function attributes + void handleFunctionAttributes(const TSourceLoc&, const TAttributes&, TFunction*); + + // GL_EXT_spirv_intrinsics + TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name, + const TIntermAggregate* extensions, const TIntermAggregate* capabilities); + TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, + TSpirvRequirement* spirvReq2); + TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant); + TSpirvTypeParameters* makeSpirvTypeParameters(const TPublicType& type); + TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, + TSpirvTypeParameters* spirvTypeParams2); + TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value); + TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value); + TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, + TSpirvInstruction* spirvInst2); #endif void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember); @@ -461,6 +505,15 @@ protected: void finish() override; #endif + virtual const char* getGlobalUniformBlockName() const override; + virtual void finalizeGlobalUniformBlockLayout(TVariable&) override; + virtual void setUniformBlockDefaults(TType& block) const override; + + virtual const char* getAtomicCounterBlockName() const override; + virtual void finalizeAtomicCounterBlockLayout(TVariable&) override; + virtual void setAtomicCounterBlockDefaults(TType& block) const override; + virtual void setInvariant(const TSourceLoc& loc, const char* builtin) override; + public: // // Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access @@ -485,6 +538,7 @@ protected: TQualifier globalUniformDefaults; TQualifier globalInputDefaults; TQualifier globalOutputDefaults; + TQualifier globalSharedDefaults; TString currentCaller; // name of last function body entered (not valid when at global scope) #ifndef GLSLANG_WEB int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point diff --git a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp index 78c8a365d7..c387aede0e 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp @@ -586,6 +586,18 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["f64mat4x2"] = F64MAT4X2; (*KeywordMap)["f64mat4x3"] = F64MAT4X3; (*KeywordMap)["f64mat4x4"] = F64MAT4X4; + + // GL_EXT_spirv_intrinsics + (*KeywordMap)["spirv_instruction"] = SPIRV_INSTRUCTION; + (*KeywordMap)["spirv_execution_mode"] = SPIRV_EXECUTION_MODE; + (*KeywordMap)["spirv_execution_mode_id"] = SPIRV_EXECUTION_MODE_ID; + (*KeywordMap)["spirv_decorate"] = SPIRV_DECORATE; + (*KeywordMap)["spirv_decorate_id"] = SPIRV_DECORATE_ID; + (*KeywordMap)["spirv_decorate_string"] = SPIRV_DECORATE_STRING; + (*KeywordMap)["spirv_type"] = SPIRV_TYPE; + (*KeywordMap)["spirv_storage_class"] = SPIRV_STORAGE_CLASS; + (*KeywordMap)["spirv_by_reference"] = SPIRV_BY_REFERENCE; + (*KeywordMap)["spirv_literal"] = SPIRV_LITERAL; #endif (*KeywordMap)["sampler2D"] = SAMPLER2D; @@ -1747,6 +1759,21 @@ int TScanContext::tokenizeIdentifier() return keyword; else return identifierOrType(); + + case SPIRV_INSTRUCTION: + case SPIRV_EXECUTION_MODE: + case SPIRV_EXECUTION_MODE_ID: + case SPIRV_DECORATE: + case SPIRV_DECORATE_ID: + case SPIRV_DECORATE_STRING: + case SPIRV_TYPE: + case SPIRV_STORAGE_CLASS: + case SPIRV_BY_REFERENCE: + case SPIRV_LITERAL: + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) + return keyword; + return identifierOrType(); #endif default: diff --git a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp index c6030bd7c2..d02eae6fcc 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -159,7 +159,7 @@ int MapVersionToIndex(int version) return index; } -const int SpvVersionCount = 3; // index range in MapSpvVersionToIndex +const int SpvVersionCount = 4; // index range in MapSpvVersionToIndex int MapSpvVersionToIndex(const SpvVersion& spvVersion) { @@ -167,8 +167,12 @@ int MapSpvVersionToIndex(const SpvVersion& spvVersion) if (spvVersion.openGl > 0) index = 1; - else if (spvVersion.vulkan > 0) - index = 2; + else if (spvVersion.vulkan > 0) { + if (!spvVersion.vulkanRelaxed) + index = 2; + else + index = 3; + } assert(index < SpvVersionCount); @@ -723,6 +727,7 @@ void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages break; case EShClientVulkan: spvVersion.vulkanGlsl = environment->input.dialectVersion; + spvVersion.vulkanRelaxed = environment->input.vulkanRulesRelaxed; break; case EShClientOpenGL: spvVersion.openGl = environment->input.dialectVersion; @@ -949,6 +954,9 @@ bool ProcessDeferred( if (cachedTable) symbolTable->adoptLevels(*cachedTable); + if (intermediate.getUniqueId() != 0) + symbolTable->overwriteUniqueId(intermediate.getUniqueId()); + // Add built-in symbols that are potentially context dependent; // they get popped again further down. if (! AddContextSpecificSymbols(resources, compiler->infoSink, *symbolTable, version, profile, spvVersion, @@ -1011,6 +1019,7 @@ bool ProcessDeferred( bool success = processingContext(*parseContext, ppContext, fullInput, versionWillBeError, *symbolTable, intermediate, optLevel, messages); + intermediate.setUniqueId(symbolTable->getMaxSymbolId()); return success; } @@ -1270,14 +1279,15 @@ bool PreprocessDeferred( EShMessages messages, // warnings/errors/AST; things to print out TShader::Includer& includer, TIntermediate& intermediate, // returned tree, etc. - std::string* outputString) + std::string* outputString, + TEnvironment* environment = nullptr) { DoPreprocessing parser(outputString); return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, intermediate, parser, - false, includer); + false, includer, "", environment); } #endif @@ -1757,6 +1767,7 @@ TShader::TShader(EShLanguage s) // clear environment (avoid constructors in them for use in a C interface) environment.input.languageFamily = EShSourceNone; environment.input.dialect = EShClientNone; + environment.input.vulkanRulesRelaxed = false; environment.client.client = EShClientNone; environment.target.language = EShTargetNone; environment.target.hlslFunctionality1 = false; @@ -1810,6 +1821,11 @@ void TShader::addProcesses(const std::vector<std::string>& p) intermediate->addProcesses(p); } +void TShader::setUniqueId(unsigned long long id) +{ + intermediate->setUniqueId(id); +} + void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); } void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); } @@ -1858,6 +1874,15 @@ void TShader::setResourceSetBinding(const std::vector<std::string>& base) { in void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } #endif +void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); } + +void TShader::setGlobalUniformBlockName(const char* name) { intermediate->setGlobalUniformBlockName(name); } +void TShader::setGlobalUniformSet(unsigned int set) { intermediate->setGlobalUniformSet(set); } +void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setGlobalUniformBinding(binding); } + +void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); } +void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); } + #ifdef ENABLE_HLSL // See comment above TDefaultHlslIoMapper in iomapper.cpp: void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); } @@ -1909,7 +1934,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, EShOptNone, builtInResources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, - forwardCompatible, message, includer, *intermediate, output_string); + forwardCompatible, message, includer, *intermediate, output_string, + &environment); } #endif @@ -1972,7 +1998,10 @@ bool TProgram::link(EShMessages messages) error = true; } - // TODO: Link: cross-stage error checking + if (!error) { + if (! crossStageCheck(messages)) + error = true; + } return ! error; } @@ -2049,6 +2078,69 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) return intermediate[stage]->getNumErrors() == 0; } +// +// Check that there are no errors in linker objects accross stages +// +// Return true if no errors. +// +bool TProgram::crossStageCheck(EShMessages) { + + // make temporary intermediates to hold the linkage symbols for each linking interface + // while we do the checks + // Independent interfaces are: + // all uniform variables and blocks + // all buffer blocks + // all in/out on a stage boundary + + TVector<TIntermediate*> activeStages; + for (int s = 0; s < EShLangCount; ++s) { + if (intermediate[s]) + activeStages.push_back(intermediate[s]); + } + + // no extra linking if there is only one stage + if (! (activeStages.size() > 1)) + return true; + + // setup temporary tree to hold unfirom objects from different stages + TIntermediate* firstIntermediate = activeStages.front(); + TIntermediate uniforms(EShLangCount, + firstIntermediate->getVersion(), + firstIntermediate->getProfile()); + uniforms.setSpv(firstIntermediate->getSpv()); + + TIntermAggregate uniformObjects(EOpLinkerObjects); + TIntermAggregate root(EOpSequence); + root.getSequence().push_back(&uniformObjects); + uniforms.setTreeRoot(&root); + + bool error = false; + + // merge uniforms from all stages into a single intermediate + for (unsigned int i = 0; i < activeStages.size(); ++i) { + uniforms.mergeUniformObjects(*infoSink, *activeStages[i]); + } + error |= uniforms.getNumErrors() != 0; + + // copy final definition of global block back into each stage + for (unsigned int i = 0; i < activeStages.size(); ++i) { + // We only want to merge into already existing global uniform blocks. + // A stage that doesn't already know about the global doesn't care about it's content. + // Otherwise we end up pointing to the same object between different stages + // and that will break binding/set remappings + bool mergeExistingOnly = true; + activeStages[i]->mergeGlobalUniformBlocks(*infoSink, uniforms, mergeExistingOnly); + } + + // compare cross stage symbols for each stage boundary + for (unsigned int i = 1; i < activeStages.size(); ++i) { + activeStages[i - 1]->checkStageIO(*infoSink, *activeStages[i]); + error |= (activeStages[i - 1]->getNumErrors() != 0); + } + + return !error; +} + const char* TProgram::getInfoLog() { return infoSink->info.c_str(); diff --git a/thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp b/thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp new file mode 100644 index 0000000000..38094eaaf7 --- /dev/null +++ b/thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp @@ -0,0 +1,355 @@ +// +// Copyright(C) 2021 Advanced Micro Devices, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#ifndef GLSLANG_WEB + +// +// GL_EXT_spirv_intrinsics +// +#include "../Include/intermediate.h" +#include "../Include/SpirvIntrinsics.h" +#include "../Include/Types.h" +#include "ParseHelper.h" + +namespace glslang { + +// +// Handle SPIR-V requirements +// +TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, const TString& name, + const TIntermAggregate* extensions, + const TIntermAggregate* capabilities) +{ + TSpirvRequirement* spirvReq = new TSpirvRequirement; + + if (name == "extensions") { + assert(extensions); + for (auto extension : extensions->getSequence()) { + assert(extension->getAsConstantUnion()); + spirvReq->extensions.insert(*extension->getAsConstantUnion()->getConstArray()[0].getSConst()); + } + } else if (name == "capabilities") { + assert(capabilities); + for (auto capability : capabilities->getSequence()) { + assert(capability->getAsConstantUnion()); + spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst()); + } + } else + error(loc, "unknow SPIR-V requirement", name.c_str(), ""); + + return spirvReq; +} + +TSpirvRequirement* TParseContext::mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, + TSpirvRequirement* spirvReq2) +{ + // Merge the second SPIR-V requirement to the first one + if (!spirvReq2->extensions.empty()) { + if (spirvReq1->extensions.empty()) + spirvReq1->extensions = spirvReq2->extensions; + else + error(loc, "too many SPIR-V requirements", "extensions", ""); + } + + if (!spirvReq2->capabilities.empty()) { + if (spirvReq1->capabilities.empty()) + spirvReq1->capabilities = spirvReq2->capabilities; + else + error(loc, "too many SPIR-V requirements", "capabilities", ""); + } + + return spirvReq1; +} + +void TIntermediate::insertSpirvRequirement(const TSpirvRequirement* spirvReq) +{ + if (!spirvRequirement) + spirvRequirement = new TSpirvRequirement; + + for (auto extension : spirvReq->extensions) + spirvRequirement->extensions.insert(extension); + + for (auto capability : spirvReq->capabilities) + spirvRequirement->capabilities.insert(capability); +} + +// +// Handle SPIR-V execution modes +// +void TIntermediate::insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args) +{ + if (!spirvExecutionMode) + spirvExecutionMode = new TSpirvExecutionMode; + + TVector<const TIntermConstantUnion*> extraOperands; + if (args) { + for (auto arg : args->getSequence()) { + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); + extraOperands.push_back(extraOperand); + } + } + spirvExecutionMode->modes[executionMode] = extraOperands; +} + +void TIntermediate::insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args) +{ + if (!spirvExecutionMode) + spirvExecutionMode = new TSpirvExecutionMode; + + assert(args); + TVector<const TIntermConstantUnion*> extraOperands; + + for (auto arg : args->getSequence()) { + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); + extraOperands.push_back(extraOperand); + } + spirvExecutionMode->modeIds[executionMode] = extraOperands; +} + +// +// Handle SPIR-V decorate qualifiers +// +void TQualifier::setSpirvDecorate(int decoration, const TIntermAggregate* args) +{ + if (!spirvDecorate) + spirvDecorate = new TSpirvDecorate; + + TVector<const TIntermConstantUnion*> extraOperands; + if (args) { + for (auto arg : args->getSequence()) { + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); + extraOperands.push_back(extraOperand); + } + } + spirvDecorate->decorates[decoration] = extraOperands; +} + +void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args) +{ + if (!spirvDecorate) + spirvDecorate = new TSpirvDecorate; + + assert(args); + TVector<const TIntermConstantUnion*> extraOperands; + for (auto arg : args->getSequence()) { + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); + extraOperands.push_back(extraOperand); + } + spirvDecorate->decorateIds[decoration] = extraOperands; +} + +void TQualifier::setSpirvDecorateString(int decoration, const TIntermAggregate* args) +{ + if (!spirvDecorate) + spirvDecorate = new TSpirvDecorate; + + assert(args); + TVector<const TIntermConstantUnion*> extraOperands; + for (auto arg : args->getSequence()) { + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); + extraOperands.push_back(extraOperand); + } + spirvDecorate->decorateStrings[decoration] = extraOperands; +} + +TString TQualifier::getSpirvDecorateQualifierString() const +{ + assert(spirvDecorate); + + TString qualifierString; + + const auto appendFloat = [&](float f) { qualifierString.append(std::to_string(f).c_str()); }; + const auto appendInt = [&](int i) { qualifierString.append(std::to_string(i).c_str()); }; + const auto appendUint = [&](unsigned int u) { qualifierString.append(std::to_string(u).c_str()); }; + const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); }; + const auto appendStr = [&](const char* s) { qualifierString.append(s); }; + + const auto appendDecorate = [&](const TIntermConstantUnion* constant) { + if (constant->getBasicType() == EbtFloat) { + float value = static_cast<float>(constant->getConstArray()[0].getDConst()); + appendFloat(value); + } + else if (constant->getBasicType() == EbtInt) { + int value = constant->getConstArray()[0].getIConst(); + appendInt(value); + } + else if (constant->getBasicType() == EbtUint) { + unsigned value = constant->getConstArray()[0].getUConst(); + appendUint(value); + } + else if (constant->getBasicType() == EbtBool) { + bool value = constant->getConstArray()[0].getBConst(); + appendBool(value); + } + else if (constant->getBasicType() == EbtString) { + const TString* value = constant->getConstArray()[0].getSConst(); + appendStr(value->c_str()); + } + else + assert(0); + }; + + for (auto& decorate : spirvDecorate->decorates) { + appendStr("spirv_decorate("); + appendInt(decorate.first); + for (auto extraOperand : decorate.second) { + appendStr(", "); + appendDecorate(extraOperand); + } + appendStr(") "); + } + + for (auto& decorateId : spirvDecorate->decorateIds) { + appendStr("spirv_decorate_id("); + appendInt(decorateId.first); + for (auto extraOperand : decorateId.second) { + appendStr(", "); + appendDecorate(extraOperand); + } + appendStr(") "); + } + + for (auto& decorateString : spirvDecorate->decorateStrings) { + appendStr("spirv_decorate_string("); + appendInt(decorateString.first); + for (auto extraOperand : decorateString.second) { + appendStr(", "); + appendDecorate(extraOperand); + } + appendStr(") "); + } + + return qualifierString; +} + +// +// Handle SPIR-V type specifiers +// +void TPublicType::setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams) +{ + if (!spirvType) + spirvType = new TSpirvType; + + basicType = EbtSpirvType; + spirvType->spirvInst = spirvInst; + if (typeParams) + spirvType->typeParams = *typeParams; +} + +TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant) +{ + TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters; + if (constant->getBasicType() != EbtFloat && + constant->getBasicType() != EbtInt && + constant->getBasicType() != EbtUint && + constant->getBasicType() != EbtBool && + constant->getBasicType() != EbtString) + error(loc, "this type not allowed", constant->getType().getBasicString(), ""); + else { + assert(constant); + spirvTypeParams->push_back(TSpirvTypeParameter(constant)); + } + + return spirvTypeParams; +} + +TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TPublicType& type) +{ + TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters; + spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type))); + return spirvTypeParams; +} + +TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2) +{ + // Merge SPIR-V type parameters of the second one to the first one + for (const auto& spirvTypeParam : *spirvTypeParams2) + spirvTypeParams1->push_back(spirvTypeParam); + return spirvTypeParams1; +} + +// +// Handle SPIR-V instruction qualifiers +// +TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value) +{ + TSpirvInstruction* spirvInst = new TSpirvInstruction; + if (name == "set") + spirvInst->set = value; + else + error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), ""); + + return spirvInst; +} + +TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value) +{ + TSpirvInstruction* spirvInstuction = new TSpirvInstruction; + if (name == "id") + spirvInstuction->id = value; + else + error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), ""); + + return spirvInstuction; +} + +TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2) +{ + // Merge qualifiers of the second SPIR-V instruction to those of the first one + if (!spirvInst2->set.empty()) { + if (spirvInst1->set.empty()) + spirvInst1->set = spirvInst2->set; + else + error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(set)"); + } + + if (spirvInst2->id != -1) { + if (spirvInst1->id == -1) + spirvInst1->id = spirvInst2->id; + else + error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(id)"); + } + + return spirvInst1; +} + +} // end namespace glslang + +#endif // GLSLANG_WEB diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp index f6291c397d..747b43666d 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -77,6 +77,7 @@ void TType::buildMangledName(TString& mangledName) const case EbtAtomicUint: mangledName += "au"; break; case EbtAccStruct: mangledName += "as"; break; case EbtRayQuery: mangledName += "rq"; break; + case EbtSpirvType: mangledName += "spv-t"; break; #endif case EbtSampler: switch (sampler.type) { @@ -170,7 +171,7 @@ void TType::buildMangledName(TString& mangledName) const for (int i = 0; i < arraySizes->getNumDims(); ++i) { if (arraySizes->getDimNode(i)) { if (arraySizes->getDimNode(i)->getAsSymbolNode()) - snprintf(buf, maxSize, "s%d", arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); + snprintf(buf, maxSize, "s%lld", arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); else snprintf(buf, maxSize, "s%p", arraySizes->getDimNode(i)); } else @@ -390,6 +391,9 @@ TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) implicitThis = copyOf.implicitThis; illegalImplicitThis = copyOf.illegalImplicitThis; defaultParamCount = copyOf.defaultParamCount; +#ifndef GLSLANG_WEB + spirvInst = copyOf.spirvInst; +#endif } TFunction* TFunction::clone() const diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h index db16c19bca..2196093073 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h +++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h @@ -104,8 +104,8 @@ public: virtual const TAnonMember* getAsAnonMember() const { return 0; } virtual const TType& getType() const = 0; virtual TType& getWritableType() = 0; - virtual void setUniqueId(int id) { uniqueId = id; } - virtual int getUniqueId() const { return uniqueId; } + virtual void setUniqueId(long long id) { uniqueId = id; } + virtual long long getUniqueId() const { return uniqueId; } virtual void setExtensions(int numExts, const char* const exts[]) { assert(extensions == 0); @@ -130,7 +130,7 @@ protected: TSymbol& operator=(const TSymbol&); const TString *name; - unsigned int uniqueId; // For cross-scope comparing during code generation + unsigned long long uniqueId; // For cross-scope comparing during code generation // For tracking what extensions must be present // (don't use if correct version/profile is present). @@ -319,6 +319,15 @@ public: virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; } virtual const TParameter& operator[](int i) const { return parameters[i]; } +#ifndef GLSLANG_WEB + virtual void setSpirvInstruction(const TSpirvInstruction& inst) + { + relateToOperator(EOpSpirvInst); + spirvInst = inst; + } + virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } +#endif + #if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) virtual void dump(TInfoSink& infoSink, bool complete = false) const override; #endif @@ -342,6 +351,10 @@ protected: // This is important for a static member function that has member variables in scope, // but is not allowed to use them, or see hidden symbols instead. int defaultParamCount; + +#ifndef GLSLANG_WEB + TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers +#endif }; // @@ -612,6 +625,7 @@ public: // 3: user-shader globals // protected: + static const uint32_t LevelFlagBitOffset = 56; static const int globalLevel = 3; static bool isSharedLevel(int level) { return level <= 1; } // exclude all per-compile levels static bool isBuiltInLevel(int level) { return level <= 2; } // exclude user globals @@ -620,10 +634,12 @@ public: bool isEmpty() { return table.size() == 0; } bool atBuiltInLevel() { return isBuiltInLevel(currentLevel()); } bool atGlobalLevel() { return isGlobalLevel(currentLevel()); } - static bool isBuiltInSymbol(int uniqueId) { - int level = uniqueId >> LevelFlagBitOffset; + static bool isBuiltInSymbol(long long uniqueId) { + int level = static_cast<int>(uniqueId >> LevelFlagBitOffset); return isBuiltInLevel(level); } + static constexpr uint64_t uniqueIdMask = (1LL << LevelFlagBitOffset) - 1; + static const uint32_t MaxLevelInUniqueID = 127; void setNoBuiltInRedeclarations() { noBuiltInRedeclarations = true; } void setSeparateNameSpaces() { separateNameSpaces = true; } @@ -691,6 +707,16 @@ public: return table[currentLevel()]->amend(symbol, firstNewMember); } + // Update the level info in symbol's unique ID to current level + void amendSymbolIdLevel(TSymbol& symbol) + { + // clamp level to avoid overflow + uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); + uint64_t symbolId = symbol.getUniqueId(); + symbolId &= uniqueIdMask; + symbolId |= (level << LevelFlagBitOffset); + symbol.setUniqueId(symbolId); + } // // To allocate an internal temporary, which will need to be uniquely // identified by the consumer of the AST, but never need to @@ -859,7 +885,7 @@ public: } } - int getMaxSymbolId() { return uniqueId; } + long long getMaxSymbolId() { return uniqueId; } #if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) void dump(TInfoSink& infoSink, bool complete = false) const; #endif @@ -876,19 +902,24 @@ public: // Add current level in the high-bits of unique id void updateUniqueIdLevelFlag() { // clamp level to avoid overflow - uint32_t level = currentLevel() > 7 ? 7 : currentLevel(); - uniqueId &= ((1 << LevelFlagBitOffset) - 1); + uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); + uniqueId &= uniqueIdMask; uniqueId |= (level << LevelFlagBitOffset); } + void overwriteUniqueId(long long id) + { + uniqueId = id; + updateUniqueIdLevelFlag(); + } + protected: TSymbolTable(TSymbolTable&); TSymbolTable& operator=(TSymbolTableLevel&); int currentLevel() const { return static_cast<int>(table.size()) - 1; } - static const uint32_t LevelFlagBitOffset = 28; std::vector<TSymbolTableLevel*> table; - int uniqueId; // for unique identification in code generation + long long uniqueId; // for unique identification in code generation bool noBuiltInRedeclarations; bool separateNameSpaces; unsigned int adoptedLevels; diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp index 69b8863ce6..097ee84552 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp @@ -165,12 +165,14 @@ void TParseVersions::initializeExtensionBehavior() EShTargetLanguageVersion minSpvVersion; } extensionData; - const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4} }; + const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4}, + {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4} + }; for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) { // Add only extensions which require > spv1.0 to save space in map if (exts[ii].minSpvVersion > EShTargetSpv_1_0) { - extensionMinSpv[E_GL_EXT_ray_tracing] = exts[ii].minSpvVersion; + extensionMinSpv[exts[ii].extensionName] = exts[ii].minSpvVersion; } } @@ -198,6 +200,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable; extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable; extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable; + extensionBehavior[E_GL_ARB_shader_atomic_counter_ops] = EBhDisable; extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable; extensionBehavior[E_GL_ARB_shader_group_vote] = EBhDisable; extensionBehavior[E_GL_ARB_derivative_control] = EBhDisable; @@ -251,6 +254,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable; extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable; + extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow] = EBhDisable; // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; @@ -280,6 +284,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_NV_shader_subgroup_partitioned] = EBhDisable; extensionBehavior[E_GL_NV_shading_rate_image] = EBhDisable; extensionBehavior[E_GL_NV_ray_tracing] = EBhDisable; + extensionBehavior[E_GL_NV_ray_tracing_motion_blur] = EBhDisable; extensionBehavior[E_GL_NV_fragment_shader_barycentric] = EBhDisable; extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable; extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable; @@ -305,6 +310,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_tessellation_point_size] = EBhDisable; extensionBehavior[E_GL_EXT_texture_buffer] = EBhDisable; extensionBehavior[E_GL_EXT_texture_cube_map_array] = EBhDisable; + extensionBehavior[E_GL_EXT_null_initializer] = EBhDisable; // OES matching AEP extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable; @@ -330,6 +336,8 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_fragment_shading_rate] = EBhDisable; extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable; extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable; + extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable; + extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable; // OVR extensions extensionBehavior[E_GL_OVR_multiview] = EBhDisable; @@ -351,6 +359,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable; extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable; } #endif // GLSLANG_WEB @@ -408,9 +417,13 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_shader_non_constant_global_initializers 1\n" ; - if (isEsProfile() && version >= 300) { + if (version >= 300) { preamble += "#define GL_NV_shader_noperspective_interpolation 1\n"; } + if (version >= 310) { + preamble += "#define GL_EXT_null_initializer 1\n"; + preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n"; + } } else { // !isEsProfile() preamble = @@ -468,6 +481,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_demote_to_helper_invocation 1\n" "#define GL_EXT_debug_printf 1\n" "#define GL_EXT_fragment_shading_rate 1\n" + "#define GL_EXT_shared_memory_block 1\n" // GL_KHR_shader_subgroup "#define GL_KHR_shader_subgroup_basic 1\n" @@ -485,6 +499,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_ray_tracing 1\n" "#define GL_EXT_ray_query 1\n" "#define GL_EXT_ray_flags_primitive_culling 1\n" + "#define GL_EXT_spirv_intrinsics 1\n" "#define GL_AMD_shader_ballot 1\n" "#define GL_AMD_shader_trinary_minmax 1\n" @@ -507,6 +522,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_shader_subgroup_partitioned 1\n" "#define GL_NV_shading_rate_image 1\n" "#define GL_NV_ray_tracing 1\n" + "#define GL_NV_ray_tracing_motion_blur 1\n" "#define GL_NV_fragment_shader_barycentric 1\n" "#define GL_NV_compute_shader_derivatives 1\n" "#define GL_NV_shader_texture_footprint 1\n" @@ -529,6 +545,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_shader_subgroup_extended_types_float16 1\n" "#define GL_EXT_shader_atomic_float 1\n" + "#define GL_EXT_shader_atomic_float2 1\n" ; if (version >= 150) { @@ -538,6 +555,10 @@ void TParseVersions::getPreamble(std::string& preamble) if (profile == ECompatibilityProfile) preamble += "#define GL_compatibility_profile 1\n"; } + if (version >= 140) { + preamble += "#define GL_EXT_null_initializer 1\n"; + preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n"; + } #endif // GLSLANG_WEB } @@ -590,6 +611,29 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "\n"; } #endif + +#ifndef GLSLANG_WEB + // GL_EXT_spirv_intrinsics + if (!isEsProfile()) { + switch (language) { + case EShLangVertex: preamble += "#define GL_VERTEX_SHADER 1 \n"; break; + case EShLangTessControl: preamble += "#define GL_TESSELLATION_CONTROL_SHADER 1 \n"; break; + case EShLangTessEvaluation: preamble += "#define GL_TESSELLATION_EVALUATION_SHADER 1 \n"; break; + case EShLangGeometry: preamble += "#define GL_GEOMETRY_SHADER 1 \n"; break; + case EShLangFragment: preamble += "#define GL_FRAGMENT_SHADER 1 \n"; break; + case EShLangCompute: preamble += "#define GL_COMPUTE_SHADER 1 \n"; break; + case EShLangRayGen: preamble += "#define GL_RAY_GENERATION_SHADER_EXT 1 \n"; break; + case EShLangIntersect: preamble += "#define GL_INTERSECTION_SHADER_EXT 1 \n"; break; + case EShLangAnyHit: preamble += "#define GL_ANY_HIT_SHADER_EXT 1 \n"; break; + case EShLangClosestHit: preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n"; break; + case EShLangMiss: preamble += "#define GL_MISS_SHADER_EXT 1 \n"; break; + case EShLangCallable: preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n"; break; + case EShLangTaskNV: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break; + case EShLangMeshNV: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break; + default: break; + } + } +#endif } // @@ -866,7 +910,7 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co checkExtensionStage(getCurrentLoc(), extension); // check if extension has additional requirements - extensionRequires(getCurrentLoc(), extension ,behaviorString); + extensionRequires(getCurrentLoc(), extension, behaviorString); // update the requested extension updateExtensionBehavior(extension, behavior); @@ -1264,7 +1308,7 @@ void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op) // Call for any operation removed because Vulkan SPIR-V is being generated. void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op) { - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed) error(loc, "not allowed when using GLSL for Vulkan", op, ""); } diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.h b/thirdparty/glslang/glslang/MachineIndependent/Versions.h index eb17c52e05..949a7a1739 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/Versions.h +++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.h @@ -87,11 +87,12 @@ inline const char* ProfileName(EProfile profile) // The union of all requested rule sets will be applied. // struct SpvVersion { - SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0) {} + SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0), vulkanRelaxed(false) {} unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header int vulkanGlsl; // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX" int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use int openGl; // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX" + bool vulkanRelaxed; // relax changes to GLSL for Vulkan, allowing some GL-specific to be compiled to Vulkan SPIR-V target }; // @@ -135,6 +136,7 @@ const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attri const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location"; const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store"; const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters"; +const char* const E_GL_ARB_shader_atomic_counter_ops = "GL_ARB_shader_atomic_counter_ops"; const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters"; const char* const E_GL_ARB_shader_group_vote = "GL_ARB_shader_group_vote"; const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_control"; @@ -201,6 +203,10 @@ const char* const E_GL_EXT_blend_func_extended = "GL_EXT_blend_func const char* const E_GL_EXT_shader_implicit_conversions = "GL_EXT_shader_implicit_conversions"; const char* const E_GL_EXT_fragment_shading_rate = "GL_EXT_fragment_shading_rate"; const char* const E_GL_EXT_shader_image_int64 = "GL_EXT_shader_image_int64"; +const char* const E_GL_EXT_null_initializer = "GL_EXT_null_initializer"; +const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_memory_block"; +const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow"; +const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics"; // Arrays of extensions for the above viewportEXTs duplications @@ -242,6 +248,7 @@ const char* const E_GL_NV_shader_noperspective_interpolation = "GL_NV_shader_ const char* const E_GL_NV_shader_subgroup_partitioned = "GL_NV_shader_subgroup_partitioned"; const char* const E_GL_NV_shading_rate_image = "GL_NV_shading_rate_image"; const char* const E_GL_NV_ray_tracing = "GL_NV_ray_tracing"; +const char* const E_GL_NV_ray_tracing_motion_blur = "GL_NV_ray_tracing_motion_blur"; const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragment_shader_barycentric"; const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives"; const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint"; @@ -302,6 +309,7 @@ const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shad const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation"; const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float"; +const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2"; // Arrays of extensions for the above AEP duplications diff --git a/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp b/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp index 9585518349..8a92f6ae09 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp @@ -123,6 +123,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const return EatPeelCount; else if (name == "partial_count") return EatPartialCount; + else if (name == "subgroup_uniform_control_flow") + return EatSubgroupUniformControlFlow; else return EatNone; } @@ -341,6 +343,29 @@ void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermN } } + +// +// Function attributes +// +void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes, TFunction* function) +{ + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->size() > 0) { + warn(loc, "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + switch (it->name) { + case EatSubgroupUniformControlFlow: + intermediate.setSubgroupUniformControlFlow(); + break; + default: + warn(loc, "attribute does not apply to a function", "", ""); + break; + } + } +} + } // end namespace glslang #endif // GLSLANG_WEB diff --git a/thirdparty/glslang/glslang/MachineIndependent/attribute.h b/thirdparty/glslang/glslang/MachineIndependent/attribute.h index 38a943d283..c5b29176c4 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/attribute.h +++ b/thirdparty/glslang/glslang/MachineIndependent/attribute.h @@ -118,7 +118,8 @@ namespace glslang { EatFormatR8ui, EatFormatUnknown, EatNonWritable, - EatNonReadable + EatNonReadable, + EatSubgroupUniformControlFlow, }; class TIntermAggregate; diff --git a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h index b9372d4bbb..d6c939374a 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h +++ b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h @@ -49,9 +49,9 @@ #define GL_INT64_VEC4_ARB 0x8FEB #define GL_UNSIGNED_INT64_ARB 0x140F -#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FE5 -#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FE6 -#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FE7 +#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 #define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 #define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 #define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang.y b/thirdparty/glslang/glslang/MachineIndependent/glslang.y index 2681d48f79..b77f4617be 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/glslang.y +++ b/thirdparty/glslang/glslang/MachineIndependent/glslang.y @@ -116,6 +116,9 @@ using namespace glslang; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; glslang::TAttributes* attributes; + glslang::TSpirvRequirement* spirvReq; + glslang::TSpirvInstruction* spirvInst; + glslang::TSpirvTypeParameters* spirvTypeParams; }; union { glslang::TPublicType type; @@ -271,6 +274,11 @@ extern int yylex(YYSTYPE*, TParseContext&); %token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS %token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS +// spirv intrinsics +%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID +%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING +%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL + %token <lex> LEFT_OP RIGHT_OP @@ -362,6 +370,19 @@ extern int yylex(YYSTYPE*, TParseContext&); %type <interm.attributes> attribute attribute_list single_attribute %type <interm.intermNode> demote_statement %type <interm.intermTypedNode> initializer_list +%type <interm.spirvReq> spirv_requirements_list spirv_requirements_parameter +%type <interm.intermNode> spirv_extension_list spirv_capability_list +%type <interm.intermNode> spirv_execution_mode_qualifier +%type <interm.intermNode> spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list +%type <interm.type> spirv_storage_class_qualifier +%type <interm.type> spirv_decorate_qualifier +%type <interm.intermNode> spirv_decorate_parameter_list spirv_decorate_parameter +%type <interm.intermNode> spirv_decorate_id_parameter_list +%type <interm.intermNode> spirv_decorate_string_parameter_list +%type <interm.type> spirv_type_specifier +%type <interm.spirvTypeParams> spirv_type_parameter_list spirv_type_parameter +%type <interm.spirvInst> spirv_instruction_qualifier +%type <interm.spirvInst> spirv_instruction_qualifier_list spirv_instruction_qualifier_id %start translation_unit @@ -875,6 +896,20 @@ declaration $$ = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } + + | spirv_instruction_qualifier function_prototype SEMICOLON { + parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); + $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier + parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */); + $$ = 0; + // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + } + | spirv_execution_mode_qualifier SEMICOLON { + parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier"); + parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); + $$ = 0; + } + | init_declarator_list SEMICOLON { if ($1.intermNode && $1.intermNode->getAsAggregate()) $1.intermNode->getAsAggregate()->setOperator(EOpSequence); @@ -944,6 +979,25 @@ function_prototype $$.function = $1; $$.loc = $2.loc; } + | function_declarator RIGHT_PAREN attribute { + $$.function = $1; + $$.loc = $2.loc; + parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); + parseContext.handleFunctionAttributes($2.loc, *$3, $$.function); + } + | attribute function_declarator RIGHT_PAREN { + $$.function = $2; + $$.loc = $3.loc; + parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); + parseContext.handleFunctionAttributes($3.loc, *$1, $$.function); + } + | attribute function_declarator RIGHT_PAREN attribute { + $$.function = $2; + $$.loc = $3.loc; + parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); + parseContext.handleFunctionAttributes($3.loc, *$1, $$.function); + parseContext.handleFunctionAttributes($3.loc, *$4, $$.function); + } ; function_declarator @@ -1347,6 +1401,25 @@ single_type_qualifier | non_uniform_qualifier { $$ = $1; } + | spirv_storage_class_qualifier { + parseContext.globalCheck($1.loc, "spirv_storage_class"); + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); + $$ = $1; + } + | spirv_decorate_qualifier { + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); + $$ = $1; + } + | SPIRV_BY_REFERENCE { + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); + $$.init($1.loc); + $$.qualifier.setSpirvByReference(); + } + | SPIRV_LITERAL { + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); + $$.init($1.loc); + $$.qualifier.setSpirvLiteral(); + } ; @@ -3407,6 +3480,10 @@ type_specifier_nonarray $$.basicType = EbtUint; $$.coopmat = true; } + | spirv_type_specifier { + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); + $$ = $1; + } | struct_specifier { $$ = $1; @@ -3575,6 +3652,12 @@ initializer parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); $$ = $2; } + | LEFT_BRACE RIGHT_BRACE { + const char* initFeature = "empty { } initializer"; + parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); + parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); + $$ = parseContext.intermediate.makeAggregate($1.loc); + } ; @@ -3707,6 +3790,7 @@ selection_statement } | attribute selection_statement_nonattributed { + parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*$1, $2); $$ = $2; } @@ -3754,6 +3838,7 @@ switch_statement } | attribute switch_statement_nonattributed { + parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*$1, $2); $$ = $2; } @@ -3818,6 +3903,7 @@ iteration_statement } | attribute iteration_statement_nonattributed { + parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleLoopAttributes(*$1, $2); $$ = $2; } @@ -4021,7 +4107,6 @@ function_definition attribute : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { $$ = $3; - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_control_flow_attributes, "attribute"); } attribute_list @@ -4041,4 +4126,273 @@ single_attribute } + +spirv_requirements_list + : spirv_requirements_parameter { + $$ = $1; + } + | spirv_requirements_list COMMA spirv_requirements_parameter { + $$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3); + } + +spirv_requirements_parameter + : IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET { + $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr); + } + | IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET { + $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate()); + } + +spirv_extension_list + : STRING_LITERAL { + $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); + } + | spirv_extension_list COMMA STRING_LITERAL { + $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); + } + +spirv_capability_list + : INTCONSTANT { + $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true)); + } + | spirv_capability_list COMMA INTCONSTANT { + $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true)); + } + +spirv_execution_mode_qualifier + : SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN { + parseContext.intermediate.insertSpirvExecutionMode($3.i); + $$ = 0; + } + | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { + parseContext.intermediate.insertSpirvRequirement($3); + parseContext.intermediate.insertSpirvExecutionMode($5.i); + $$ = 0; + } + | SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { + parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate()); + $$ = 0; + } + | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { + parseContext.intermediate.insertSpirvRequirement($3); + parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate()); + $$ = 0; + } + | SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { + parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate()); + $$ = 0; + } + | SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { + parseContext.intermediate.insertSpirvRequirement($3); + parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate()); + $$ = 0; + } + +spirv_execution_mode_parameter_list + : spirv_execution_mode_parameter { + $$ = parseContext.intermediate.makeAggregate($1); + } + | spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter { + $$ = parseContext.intermediate.growAggregate($1, $3); + } + +spirv_execution_mode_parameter + : FLOATCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); + } + | INTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); + } + | UINTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); + } + | BOOLCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); + } + | STRING_LITERAL { + $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); + } + +spirv_execution_mode_id_parameter_list + : constant_expression { + if ($1->getBasicType() != EbtFloat && + $1->getBasicType() != EbtInt && + $1->getBasicType() != EbtUint && + $1->getBasicType() != EbtBool && + $1->getBasicType() != EbtString) + parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); + $$ = parseContext.intermediate.makeAggregate($1); + } + | spirv_execution_mode_id_parameter_list COMMA constant_expression { + if ($3->getBasicType() != EbtFloat && + $3->getBasicType() != EbtInt && + $3->getBasicType() != EbtUint && + $3->getBasicType() != EbtBool && + $3->getBasicType() != EbtString) + parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); + $$ = parseContext.intermediate.growAggregate($1, $3); + } + +spirv_storage_class_qualifier + : SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN { + $$.init($1.loc); + $$.qualifier.storage = EvqSpirvStorageClass; + $$.qualifier.spirvStorageClass = $3.i; + } + | SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { + $$.init($1.loc); + parseContext.intermediate.insertSpirvRequirement($3); + $$.qualifier.storage = EvqSpirvStorageClass; + $$.qualifier.spirvStorageClass = $5.i; + } + +spirv_decorate_qualifier + : SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{ + $$.init($1.loc); + $$.qualifier.setSpirvDecorate($3.i); + } + | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{ + $$.init($1.loc); + parseContext.intermediate.insertSpirvRequirement($3); + $$.qualifier.setSpirvDecorate($5.i); + } + | SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { + $$.init($1.loc); + $$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate()); + } + | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { + $$.init($1.loc); + parseContext.intermediate.insertSpirvRequirement($3); + $$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate()); + } + | SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { + $$.init($1.loc); + $$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate()); + } + | SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { + $$.init($1.loc); + parseContext.intermediate.insertSpirvRequirement($3); + $$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate()); + } + | SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { + $$.init($1.loc); + $$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate()); + } + | SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { + $$.init($1.loc); + parseContext.intermediate.insertSpirvRequirement($3); + $$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate()); + } + +spirv_decorate_parameter_list + : spirv_decorate_parameter { + $$ = parseContext.intermediate.makeAggregate($1); + } + | spirv_decorate_parameter_list COMMA spirv_decorate_parameter { + $$ = parseContext.intermediate.growAggregate($1, $3); + } + +spirv_decorate_parameter + : FLOATCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); + } + | INTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); + } + | UINTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); + } + | BOOLCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); + } + +spirv_decorate_id_parameter_list + : constant_expression { + if ($1->getBasicType() != EbtFloat && + $1->getBasicType() != EbtInt && + $1->getBasicType() != EbtUint && + $1->getBasicType() != EbtBool) + parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); + $$ = parseContext.intermediate.makeAggregate($1); + } + | spirv_decorate_id_parameter_list COMMA constant_expression { + if ($3->getBasicType() != EbtFloat && + $3->getBasicType() != EbtInt && + $3->getBasicType() != EbtUint && + $3->getBasicType() != EbtBool) + parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); + $$ = parseContext.intermediate.growAggregate($1, $3); + } + +spirv_decorate_string_parameter_list + : STRING_LITERAL { + $$ = parseContext.intermediate.makeAggregate( + parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); + } + | spirv_decorate_string_parameter_list COMMA STRING_LITERAL { + $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); + } + +spirv_type_specifier + : SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.setSpirvType(*$3, $5); + } + | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.intermediate.insertSpirvRequirement($3); + $$.setSpirvType(*$5, $7); + } + | SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.setSpirvType(*$3); + } + | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.intermediate.insertSpirvRequirement($3); + $$.setSpirvType(*$5); + } + +spirv_type_parameter_list + : spirv_type_parameter { + $$ = $1; + } + | spirv_type_parameter_list COMMA spirv_type_parameter { + $$ = parseContext.mergeSpirvTypeParameters($1, $3); + } + +spirv_type_parameter + : constant_expression { + $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion()); + } + | type_specifier { + $$ = parseContext.makeSpirvTypeParameters($1); + } + +spirv_instruction_qualifier + : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { + $$ = $3; + } + | SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { + parseContext.intermediate.insertSpirvRequirement($3); + $$ = $5; + } + +spirv_instruction_qualifier_list + : spirv_instruction_qualifier_id { + $$ = $1; + } + | spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id { + $$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3); + } + +spirv_instruction_qualifier_id + : IDENTIFIER EQUAL STRING_LITERAL { + $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string); + } + | IDENTIFIER EQUAL INTCONSTANT { + $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i); + } + + %% diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp index feecc98200..dba06aefef 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp @@ -438,251 +438,281 @@ enum yysymbol_kind_t YYSYMBOL_USUBPASSINPUTMS = 314, /* USUBPASSINPUTMS */ YYSYMBOL_F16SUBPASSINPUT = 315, /* F16SUBPASSINPUT */ YYSYMBOL_F16SUBPASSINPUTMS = 316, /* F16SUBPASSINPUTMS */ - YYSYMBOL_LEFT_OP = 317, /* LEFT_OP */ - YYSYMBOL_RIGHT_OP = 318, /* RIGHT_OP */ - YYSYMBOL_INC_OP = 319, /* INC_OP */ - YYSYMBOL_DEC_OP = 320, /* DEC_OP */ - YYSYMBOL_LE_OP = 321, /* LE_OP */ - YYSYMBOL_GE_OP = 322, /* GE_OP */ - YYSYMBOL_EQ_OP = 323, /* EQ_OP */ - YYSYMBOL_NE_OP = 324, /* NE_OP */ - YYSYMBOL_AND_OP = 325, /* AND_OP */ - YYSYMBOL_OR_OP = 326, /* OR_OP */ - YYSYMBOL_XOR_OP = 327, /* XOR_OP */ - YYSYMBOL_MUL_ASSIGN = 328, /* MUL_ASSIGN */ - YYSYMBOL_DIV_ASSIGN = 329, /* DIV_ASSIGN */ - YYSYMBOL_ADD_ASSIGN = 330, /* ADD_ASSIGN */ - YYSYMBOL_MOD_ASSIGN = 331, /* MOD_ASSIGN */ - YYSYMBOL_LEFT_ASSIGN = 332, /* LEFT_ASSIGN */ - YYSYMBOL_RIGHT_ASSIGN = 333, /* RIGHT_ASSIGN */ - YYSYMBOL_AND_ASSIGN = 334, /* AND_ASSIGN */ - YYSYMBOL_XOR_ASSIGN = 335, /* XOR_ASSIGN */ - YYSYMBOL_OR_ASSIGN = 336, /* OR_ASSIGN */ - YYSYMBOL_SUB_ASSIGN = 337, /* SUB_ASSIGN */ - YYSYMBOL_STRING_LITERAL = 338, /* STRING_LITERAL */ - YYSYMBOL_LEFT_PAREN = 339, /* LEFT_PAREN */ - YYSYMBOL_RIGHT_PAREN = 340, /* RIGHT_PAREN */ - YYSYMBOL_LEFT_BRACKET = 341, /* LEFT_BRACKET */ - YYSYMBOL_RIGHT_BRACKET = 342, /* RIGHT_BRACKET */ - YYSYMBOL_LEFT_BRACE = 343, /* LEFT_BRACE */ - YYSYMBOL_RIGHT_BRACE = 344, /* RIGHT_BRACE */ - YYSYMBOL_DOT = 345, /* DOT */ - YYSYMBOL_COMMA = 346, /* COMMA */ - YYSYMBOL_COLON = 347, /* COLON */ - YYSYMBOL_EQUAL = 348, /* EQUAL */ - YYSYMBOL_SEMICOLON = 349, /* SEMICOLON */ - YYSYMBOL_BANG = 350, /* BANG */ - YYSYMBOL_DASH = 351, /* DASH */ - YYSYMBOL_TILDE = 352, /* TILDE */ - YYSYMBOL_PLUS = 353, /* PLUS */ - YYSYMBOL_STAR = 354, /* STAR */ - YYSYMBOL_SLASH = 355, /* SLASH */ - YYSYMBOL_PERCENT = 356, /* PERCENT */ - YYSYMBOL_LEFT_ANGLE = 357, /* LEFT_ANGLE */ - YYSYMBOL_RIGHT_ANGLE = 358, /* RIGHT_ANGLE */ - YYSYMBOL_VERTICAL_BAR = 359, /* VERTICAL_BAR */ - YYSYMBOL_CARET = 360, /* CARET */ - YYSYMBOL_AMPERSAND = 361, /* AMPERSAND */ - YYSYMBOL_QUESTION = 362, /* QUESTION */ - YYSYMBOL_INVARIANT = 363, /* INVARIANT */ - YYSYMBOL_HIGH_PRECISION = 364, /* HIGH_PRECISION */ - YYSYMBOL_MEDIUM_PRECISION = 365, /* MEDIUM_PRECISION */ - YYSYMBOL_LOW_PRECISION = 366, /* LOW_PRECISION */ - YYSYMBOL_PRECISION = 367, /* PRECISION */ - YYSYMBOL_PACKED = 368, /* PACKED */ - YYSYMBOL_RESOURCE = 369, /* RESOURCE */ - YYSYMBOL_SUPERP = 370, /* SUPERP */ - YYSYMBOL_FLOATCONSTANT = 371, /* FLOATCONSTANT */ - YYSYMBOL_INTCONSTANT = 372, /* INTCONSTANT */ - YYSYMBOL_UINTCONSTANT = 373, /* UINTCONSTANT */ - YYSYMBOL_BOOLCONSTANT = 374, /* BOOLCONSTANT */ - YYSYMBOL_IDENTIFIER = 375, /* IDENTIFIER */ - YYSYMBOL_TYPE_NAME = 376, /* TYPE_NAME */ - YYSYMBOL_CENTROID = 377, /* CENTROID */ - YYSYMBOL_IN = 378, /* IN */ - YYSYMBOL_OUT = 379, /* OUT */ - YYSYMBOL_INOUT = 380, /* INOUT */ - YYSYMBOL_STRUCT = 381, /* STRUCT */ - YYSYMBOL_VOID = 382, /* VOID */ - YYSYMBOL_WHILE = 383, /* WHILE */ - YYSYMBOL_BREAK = 384, /* BREAK */ - YYSYMBOL_CONTINUE = 385, /* CONTINUE */ - YYSYMBOL_DO = 386, /* DO */ - YYSYMBOL_ELSE = 387, /* ELSE */ - YYSYMBOL_FOR = 388, /* FOR */ - YYSYMBOL_IF = 389, /* IF */ - YYSYMBOL_DISCARD = 390, /* DISCARD */ - YYSYMBOL_RETURN = 391, /* RETURN */ - YYSYMBOL_SWITCH = 392, /* SWITCH */ - YYSYMBOL_CASE = 393, /* CASE */ - YYSYMBOL_DEFAULT = 394, /* DEFAULT */ - YYSYMBOL_TERMINATE_INVOCATION = 395, /* TERMINATE_INVOCATION */ - YYSYMBOL_TERMINATE_RAY = 396, /* TERMINATE_RAY */ - YYSYMBOL_IGNORE_INTERSECTION = 397, /* IGNORE_INTERSECTION */ - YYSYMBOL_UNIFORM = 398, /* UNIFORM */ - YYSYMBOL_SHARED = 399, /* SHARED */ - YYSYMBOL_BUFFER = 400, /* BUFFER */ - YYSYMBOL_FLAT = 401, /* FLAT */ - YYSYMBOL_SMOOTH = 402, /* SMOOTH */ - YYSYMBOL_LAYOUT = 403, /* LAYOUT */ - YYSYMBOL_DOUBLECONSTANT = 404, /* DOUBLECONSTANT */ - YYSYMBOL_INT16CONSTANT = 405, /* INT16CONSTANT */ - YYSYMBOL_UINT16CONSTANT = 406, /* UINT16CONSTANT */ - YYSYMBOL_FLOAT16CONSTANT = 407, /* FLOAT16CONSTANT */ - YYSYMBOL_INT32CONSTANT = 408, /* INT32CONSTANT */ - YYSYMBOL_UINT32CONSTANT = 409, /* UINT32CONSTANT */ - YYSYMBOL_INT64CONSTANT = 410, /* INT64CONSTANT */ - YYSYMBOL_UINT64CONSTANT = 411, /* UINT64CONSTANT */ - YYSYMBOL_SUBROUTINE = 412, /* SUBROUTINE */ - YYSYMBOL_DEMOTE = 413, /* DEMOTE */ - YYSYMBOL_PAYLOADNV = 414, /* PAYLOADNV */ - YYSYMBOL_PAYLOADINNV = 415, /* PAYLOADINNV */ - YYSYMBOL_HITATTRNV = 416, /* HITATTRNV */ - YYSYMBOL_CALLDATANV = 417, /* CALLDATANV */ - YYSYMBOL_CALLDATAINNV = 418, /* CALLDATAINNV */ - YYSYMBOL_PAYLOADEXT = 419, /* PAYLOADEXT */ - YYSYMBOL_PAYLOADINEXT = 420, /* PAYLOADINEXT */ - YYSYMBOL_HITATTREXT = 421, /* HITATTREXT */ - YYSYMBOL_CALLDATAEXT = 422, /* CALLDATAEXT */ - YYSYMBOL_CALLDATAINEXT = 423, /* CALLDATAINEXT */ - YYSYMBOL_PATCH = 424, /* PATCH */ - YYSYMBOL_SAMPLE = 425, /* SAMPLE */ - YYSYMBOL_NONUNIFORM = 426, /* NONUNIFORM */ - YYSYMBOL_COHERENT = 427, /* COHERENT */ - YYSYMBOL_VOLATILE = 428, /* VOLATILE */ - YYSYMBOL_RESTRICT = 429, /* RESTRICT */ - YYSYMBOL_READONLY = 430, /* READONLY */ - YYSYMBOL_WRITEONLY = 431, /* WRITEONLY */ - YYSYMBOL_DEVICECOHERENT = 432, /* DEVICECOHERENT */ - YYSYMBOL_QUEUEFAMILYCOHERENT = 433, /* QUEUEFAMILYCOHERENT */ - YYSYMBOL_WORKGROUPCOHERENT = 434, /* WORKGROUPCOHERENT */ - YYSYMBOL_SUBGROUPCOHERENT = 435, /* SUBGROUPCOHERENT */ - YYSYMBOL_NONPRIVATE = 436, /* NONPRIVATE */ - YYSYMBOL_SHADERCALLCOHERENT = 437, /* SHADERCALLCOHERENT */ - YYSYMBOL_NOPERSPECTIVE = 438, /* NOPERSPECTIVE */ - YYSYMBOL_EXPLICITINTERPAMD = 439, /* EXPLICITINTERPAMD */ - YYSYMBOL_PERVERTEXNV = 440, /* PERVERTEXNV */ - YYSYMBOL_PERPRIMITIVENV = 441, /* PERPRIMITIVENV */ - YYSYMBOL_PERVIEWNV = 442, /* PERVIEWNV */ - YYSYMBOL_PERTASKNV = 443, /* PERTASKNV */ - YYSYMBOL_PRECISE = 444, /* PRECISE */ - YYSYMBOL_YYACCEPT = 445, /* $accept */ - YYSYMBOL_variable_identifier = 446, /* variable_identifier */ - YYSYMBOL_primary_expression = 447, /* primary_expression */ - YYSYMBOL_postfix_expression = 448, /* postfix_expression */ - YYSYMBOL_integer_expression = 449, /* integer_expression */ - YYSYMBOL_function_call = 450, /* function_call */ - YYSYMBOL_function_call_or_method = 451, /* function_call_or_method */ - YYSYMBOL_function_call_generic = 452, /* function_call_generic */ - YYSYMBOL_function_call_header_no_parameters = 453, /* function_call_header_no_parameters */ - YYSYMBOL_function_call_header_with_parameters = 454, /* function_call_header_with_parameters */ - YYSYMBOL_function_call_header = 455, /* function_call_header */ - YYSYMBOL_function_identifier = 456, /* function_identifier */ - YYSYMBOL_unary_expression = 457, /* unary_expression */ - YYSYMBOL_unary_operator = 458, /* unary_operator */ - YYSYMBOL_multiplicative_expression = 459, /* multiplicative_expression */ - YYSYMBOL_additive_expression = 460, /* additive_expression */ - YYSYMBOL_shift_expression = 461, /* shift_expression */ - YYSYMBOL_relational_expression = 462, /* relational_expression */ - YYSYMBOL_equality_expression = 463, /* equality_expression */ - YYSYMBOL_and_expression = 464, /* and_expression */ - YYSYMBOL_exclusive_or_expression = 465, /* exclusive_or_expression */ - YYSYMBOL_inclusive_or_expression = 466, /* inclusive_or_expression */ - YYSYMBOL_logical_and_expression = 467, /* logical_and_expression */ - YYSYMBOL_logical_xor_expression = 468, /* logical_xor_expression */ - YYSYMBOL_logical_or_expression = 469, /* logical_or_expression */ - YYSYMBOL_conditional_expression = 470, /* conditional_expression */ - YYSYMBOL_471_1 = 471, /* $@1 */ - YYSYMBOL_assignment_expression = 472, /* assignment_expression */ - YYSYMBOL_assignment_operator = 473, /* assignment_operator */ - YYSYMBOL_expression = 474, /* expression */ - YYSYMBOL_constant_expression = 475, /* constant_expression */ - YYSYMBOL_declaration = 476, /* declaration */ - YYSYMBOL_block_structure = 477, /* block_structure */ - YYSYMBOL_478_2 = 478, /* $@2 */ - YYSYMBOL_identifier_list = 479, /* identifier_list */ - YYSYMBOL_function_prototype = 480, /* function_prototype */ - YYSYMBOL_function_declarator = 481, /* function_declarator */ - YYSYMBOL_function_header_with_parameters = 482, /* function_header_with_parameters */ - YYSYMBOL_function_header = 483, /* function_header */ - YYSYMBOL_parameter_declarator = 484, /* parameter_declarator */ - YYSYMBOL_parameter_declaration = 485, /* parameter_declaration */ - YYSYMBOL_parameter_type_specifier = 486, /* parameter_type_specifier */ - YYSYMBOL_init_declarator_list = 487, /* init_declarator_list */ - YYSYMBOL_single_declaration = 488, /* single_declaration */ - YYSYMBOL_fully_specified_type = 489, /* fully_specified_type */ - YYSYMBOL_invariant_qualifier = 490, /* invariant_qualifier */ - YYSYMBOL_interpolation_qualifier = 491, /* interpolation_qualifier */ - YYSYMBOL_layout_qualifier = 492, /* layout_qualifier */ - YYSYMBOL_layout_qualifier_id_list = 493, /* layout_qualifier_id_list */ - YYSYMBOL_layout_qualifier_id = 494, /* layout_qualifier_id */ - YYSYMBOL_precise_qualifier = 495, /* precise_qualifier */ - YYSYMBOL_type_qualifier = 496, /* type_qualifier */ - YYSYMBOL_single_type_qualifier = 497, /* single_type_qualifier */ - YYSYMBOL_storage_qualifier = 498, /* storage_qualifier */ - YYSYMBOL_non_uniform_qualifier = 499, /* non_uniform_qualifier */ - YYSYMBOL_type_name_list = 500, /* type_name_list */ - YYSYMBOL_type_specifier = 501, /* type_specifier */ - YYSYMBOL_array_specifier = 502, /* array_specifier */ - YYSYMBOL_type_parameter_specifier_opt = 503, /* type_parameter_specifier_opt */ - YYSYMBOL_type_parameter_specifier = 504, /* type_parameter_specifier */ - YYSYMBOL_type_parameter_specifier_list = 505, /* type_parameter_specifier_list */ - YYSYMBOL_type_specifier_nonarray = 506, /* type_specifier_nonarray */ - YYSYMBOL_precision_qualifier = 507, /* precision_qualifier */ - YYSYMBOL_struct_specifier = 508, /* struct_specifier */ - YYSYMBOL_509_3 = 509, /* $@3 */ - YYSYMBOL_510_4 = 510, /* $@4 */ - YYSYMBOL_struct_declaration_list = 511, /* struct_declaration_list */ - YYSYMBOL_struct_declaration = 512, /* struct_declaration */ - YYSYMBOL_struct_declarator_list = 513, /* struct_declarator_list */ - YYSYMBOL_struct_declarator = 514, /* struct_declarator */ - YYSYMBOL_initializer = 515, /* initializer */ - YYSYMBOL_initializer_list = 516, /* initializer_list */ - YYSYMBOL_declaration_statement = 517, /* declaration_statement */ - YYSYMBOL_statement = 518, /* statement */ - YYSYMBOL_simple_statement = 519, /* simple_statement */ - YYSYMBOL_demote_statement = 520, /* demote_statement */ - YYSYMBOL_compound_statement = 521, /* compound_statement */ - YYSYMBOL_522_5 = 522, /* $@5 */ - YYSYMBOL_523_6 = 523, /* $@6 */ - YYSYMBOL_statement_no_new_scope = 524, /* statement_no_new_scope */ - YYSYMBOL_statement_scoped = 525, /* statement_scoped */ - YYSYMBOL_526_7 = 526, /* $@7 */ - YYSYMBOL_527_8 = 527, /* $@8 */ - YYSYMBOL_compound_statement_no_new_scope = 528, /* compound_statement_no_new_scope */ - YYSYMBOL_statement_list = 529, /* statement_list */ - YYSYMBOL_expression_statement = 530, /* expression_statement */ - YYSYMBOL_selection_statement = 531, /* selection_statement */ - YYSYMBOL_selection_statement_nonattributed = 532, /* selection_statement_nonattributed */ - YYSYMBOL_selection_rest_statement = 533, /* selection_rest_statement */ - YYSYMBOL_condition = 534, /* condition */ - YYSYMBOL_switch_statement = 535, /* switch_statement */ - YYSYMBOL_switch_statement_nonattributed = 536, /* switch_statement_nonattributed */ - YYSYMBOL_537_9 = 537, /* $@9 */ - YYSYMBOL_switch_statement_list = 538, /* switch_statement_list */ - YYSYMBOL_case_label = 539, /* case_label */ - YYSYMBOL_iteration_statement = 540, /* iteration_statement */ - YYSYMBOL_iteration_statement_nonattributed = 541, /* iteration_statement_nonattributed */ - YYSYMBOL_542_10 = 542, /* $@10 */ - YYSYMBOL_543_11 = 543, /* $@11 */ - YYSYMBOL_544_12 = 544, /* $@12 */ - YYSYMBOL_for_init_statement = 545, /* for_init_statement */ - YYSYMBOL_conditionopt = 546, /* conditionopt */ - YYSYMBOL_for_rest_statement = 547, /* for_rest_statement */ - YYSYMBOL_jump_statement = 548, /* jump_statement */ - YYSYMBOL_translation_unit = 549, /* translation_unit */ - YYSYMBOL_external_declaration = 550, /* external_declaration */ - YYSYMBOL_function_definition = 551, /* function_definition */ - YYSYMBOL_552_13 = 552, /* $@13 */ - YYSYMBOL_attribute = 553, /* attribute */ - YYSYMBOL_attribute_list = 554, /* attribute_list */ - YYSYMBOL_single_attribute = 555 /* single_attribute */ + YYSYMBOL_SPIRV_INSTRUCTION = 317, /* SPIRV_INSTRUCTION */ + YYSYMBOL_SPIRV_EXECUTION_MODE = 318, /* SPIRV_EXECUTION_MODE */ + YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 319, /* SPIRV_EXECUTION_MODE_ID */ + YYSYMBOL_SPIRV_DECORATE = 320, /* SPIRV_DECORATE */ + YYSYMBOL_SPIRV_DECORATE_ID = 321, /* SPIRV_DECORATE_ID */ + YYSYMBOL_SPIRV_DECORATE_STRING = 322, /* SPIRV_DECORATE_STRING */ + YYSYMBOL_SPIRV_TYPE = 323, /* SPIRV_TYPE */ + YYSYMBOL_SPIRV_STORAGE_CLASS = 324, /* SPIRV_STORAGE_CLASS */ + YYSYMBOL_SPIRV_BY_REFERENCE = 325, /* SPIRV_BY_REFERENCE */ + YYSYMBOL_SPIRV_LITERAL = 326, /* SPIRV_LITERAL */ + YYSYMBOL_LEFT_OP = 327, /* LEFT_OP */ + YYSYMBOL_RIGHT_OP = 328, /* RIGHT_OP */ + YYSYMBOL_INC_OP = 329, /* INC_OP */ + YYSYMBOL_DEC_OP = 330, /* DEC_OP */ + YYSYMBOL_LE_OP = 331, /* LE_OP */ + YYSYMBOL_GE_OP = 332, /* GE_OP */ + YYSYMBOL_EQ_OP = 333, /* EQ_OP */ + YYSYMBOL_NE_OP = 334, /* NE_OP */ + YYSYMBOL_AND_OP = 335, /* AND_OP */ + YYSYMBOL_OR_OP = 336, /* OR_OP */ + YYSYMBOL_XOR_OP = 337, /* XOR_OP */ + YYSYMBOL_MUL_ASSIGN = 338, /* MUL_ASSIGN */ + YYSYMBOL_DIV_ASSIGN = 339, /* DIV_ASSIGN */ + YYSYMBOL_ADD_ASSIGN = 340, /* ADD_ASSIGN */ + YYSYMBOL_MOD_ASSIGN = 341, /* MOD_ASSIGN */ + YYSYMBOL_LEFT_ASSIGN = 342, /* LEFT_ASSIGN */ + YYSYMBOL_RIGHT_ASSIGN = 343, /* RIGHT_ASSIGN */ + YYSYMBOL_AND_ASSIGN = 344, /* AND_ASSIGN */ + YYSYMBOL_XOR_ASSIGN = 345, /* XOR_ASSIGN */ + YYSYMBOL_OR_ASSIGN = 346, /* OR_ASSIGN */ + YYSYMBOL_SUB_ASSIGN = 347, /* SUB_ASSIGN */ + YYSYMBOL_STRING_LITERAL = 348, /* STRING_LITERAL */ + YYSYMBOL_LEFT_PAREN = 349, /* LEFT_PAREN */ + YYSYMBOL_RIGHT_PAREN = 350, /* RIGHT_PAREN */ + YYSYMBOL_LEFT_BRACKET = 351, /* LEFT_BRACKET */ + YYSYMBOL_RIGHT_BRACKET = 352, /* RIGHT_BRACKET */ + YYSYMBOL_LEFT_BRACE = 353, /* LEFT_BRACE */ + YYSYMBOL_RIGHT_BRACE = 354, /* RIGHT_BRACE */ + YYSYMBOL_DOT = 355, /* DOT */ + YYSYMBOL_COMMA = 356, /* COMMA */ + YYSYMBOL_COLON = 357, /* COLON */ + YYSYMBOL_EQUAL = 358, /* EQUAL */ + YYSYMBOL_SEMICOLON = 359, /* SEMICOLON */ + YYSYMBOL_BANG = 360, /* BANG */ + YYSYMBOL_DASH = 361, /* DASH */ + YYSYMBOL_TILDE = 362, /* TILDE */ + YYSYMBOL_PLUS = 363, /* PLUS */ + YYSYMBOL_STAR = 364, /* STAR */ + YYSYMBOL_SLASH = 365, /* SLASH */ + YYSYMBOL_PERCENT = 366, /* PERCENT */ + YYSYMBOL_LEFT_ANGLE = 367, /* LEFT_ANGLE */ + YYSYMBOL_RIGHT_ANGLE = 368, /* RIGHT_ANGLE */ + YYSYMBOL_VERTICAL_BAR = 369, /* VERTICAL_BAR */ + YYSYMBOL_CARET = 370, /* CARET */ + YYSYMBOL_AMPERSAND = 371, /* AMPERSAND */ + YYSYMBOL_QUESTION = 372, /* QUESTION */ + YYSYMBOL_INVARIANT = 373, /* INVARIANT */ + YYSYMBOL_HIGH_PRECISION = 374, /* HIGH_PRECISION */ + YYSYMBOL_MEDIUM_PRECISION = 375, /* MEDIUM_PRECISION */ + YYSYMBOL_LOW_PRECISION = 376, /* LOW_PRECISION */ + YYSYMBOL_PRECISION = 377, /* PRECISION */ + YYSYMBOL_PACKED = 378, /* PACKED */ + YYSYMBOL_RESOURCE = 379, /* RESOURCE */ + YYSYMBOL_SUPERP = 380, /* SUPERP */ + YYSYMBOL_FLOATCONSTANT = 381, /* FLOATCONSTANT */ + YYSYMBOL_INTCONSTANT = 382, /* INTCONSTANT */ + YYSYMBOL_UINTCONSTANT = 383, /* UINTCONSTANT */ + YYSYMBOL_BOOLCONSTANT = 384, /* BOOLCONSTANT */ + YYSYMBOL_IDENTIFIER = 385, /* IDENTIFIER */ + YYSYMBOL_TYPE_NAME = 386, /* TYPE_NAME */ + YYSYMBOL_CENTROID = 387, /* CENTROID */ + YYSYMBOL_IN = 388, /* IN */ + YYSYMBOL_OUT = 389, /* OUT */ + YYSYMBOL_INOUT = 390, /* INOUT */ + YYSYMBOL_STRUCT = 391, /* STRUCT */ + YYSYMBOL_VOID = 392, /* VOID */ + YYSYMBOL_WHILE = 393, /* WHILE */ + YYSYMBOL_BREAK = 394, /* BREAK */ + YYSYMBOL_CONTINUE = 395, /* CONTINUE */ + YYSYMBOL_DO = 396, /* DO */ + YYSYMBOL_ELSE = 397, /* ELSE */ + YYSYMBOL_FOR = 398, /* FOR */ + YYSYMBOL_IF = 399, /* IF */ + YYSYMBOL_DISCARD = 400, /* DISCARD */ + YYSYMBOL_RETURN = 401, /* RETURN */ + YYSYMBOL_SWITCH = 402, /* SWITCH */ + YYSYMBOL_CASE = 403, /* CASE */ + YYSYMBOL_DEFAULT = 404, /* DEFAULT */ + YYSYMBOL_TERMINATE_INVOCATION = 405, /* TERMINATE_INVOCATION */ + YYSYMBOL_TERMINATE_RAY = 406, /* TERMINATE_RAY */ + YYSYMBOL_IGNORE_INTERSECTION = 407, /* IGNORE_INTERSECTION */ + YYSYMBOL_UNIFORM = 408, /* UNIFORM */ + YYSYMBOL_SHARED = 409, /* SHARED */ + YYSYMBOL_BUFFER = 410, /* BUFFER */ + YYSYMBOL_FLAT = 411, /* FLAT */ + YYSYMBOL_SMOOTH = 412, /* SMOOTH */ + YYSYMBOL_LAYOUT = 413, /* LAYOUT */ + YYSYMBOL_DOUBLECONSTANT = 414, /* DOUBLECONSTANT */ + YYSYMBOL_INT16CONSTANT = 415, /* INT16CONSTANT */ + YYSYMBOL_UINT16CONSTANT = 416, /* UINT16CONSTANT */ + YYSYMBOL_FLOAT16CONSTANT = 417, /* FLOAT16CONSTANT */ + YYSYMBOL_INT32CONSTANT = 418, /* INT32CONSTANT */ + YYSYMBOL_UINT32CONSTANT = 419, /* UINT32CONSTANT */ + YYSYMBOL_INT64CONSTANT = 420, /* INT64CONSTANT */ + YYSYMBOL_UINT64CONSTANT = 421, /* UINT64CONSTANT */ + YYSYMBOL_SUBROUTINE = 422, /* SUBROUTINE */ + YYSYMBOL_DEMOTE = 423, /* DEMOTE */ + YYSYMBOL_PAYLOADNV = 424, /* PAYLOADNV */ + YYSYMBOL_PAYLOADINNV = 425, /* PAYLOADINNV */ + YYSYMBOL_HITATTRNV = 426, /* HITATTRNV */ + YYSYMBOL_CALLDATANV = 427, /* CALLDATANV */ + YYSYMBOL_CALLDATAINNV = 428, /* CALLDATAINNV */ + YYSYMBOL_PAYLOADEXT = 429, /* PAYLOADEXT */ + YYSYMBOL_PAYLOADINEXT = 430, /* PAYLOADINEXT */ + YYSYMBOL_HITATTREXT = 431, /* HITATTREXT */ + YYSYMBOL_CALLDATAEXT = 432, /* CALLDATAEXT */ + YYSYMBOL_CALLDATAINEXT = 433, /* CALLDATAINEXT */ + YYSYMBOL_PATCH = 434, /* PATCH */ + YYSYMBOL_SAMPLE = 435, /* SAMPLE */ + YYSYMBOL_NONUNIFORM = 436, /* NONUNIFORM */ + YYSYMBOL_COHERENT = 437, /* COHERENT */ + YYSYMBOL_VOLATILE = 438, /* VOLATILE */ + YYSYMBOL_RESTRICT = 439, /* RESTRICT */ + YYSYMBOL_READONLY = 440, /* READONLY */ + YYSYMBOL_WRITEONLY = 441, /* WRITEONLY */ + YYSYMBOL_DEVICECOHERENT = 442, /* DEVICECOHERENT */ + YYSYMBOL_QUEUEFAMILYCOHERENT = 443, /* QUEUEFAMILYCOHERENT */ + YYSYMBOL_WORKGROUPCOHERENT = 444, /* WORKGROUPCOHERENT */ + YYSYMBOL_SUBGROUPCOHERENT = 445, /* SUBGROUPCOHERENT */ + YYSYMBOL_NONPRIVATE = 446, /* NONPRIVATE */ + YYSYMBOL_SHADERCALLCOHERENT = 447, /* SHADERCALLCOHERENT */ + YYSYMBOL_NOPERSPECTIVE = 448, /* NOPERSPECTIVE */ + YYSYMBOL_EXPLICITINTERPAMD = 449, /* EXPLICITINTERPAMD */ + YYSYMBOL_PERVERTEXNV = 450, /* PERVERTEXNV */ + YYSYMBOL_PERPRIMITIVENV = 451, /* PERPRIMITIVENV */ + YYSYMBOL_PERVIEWNV = 452, /* PERVIEWNV */ + YYSYMBOL_PERTASKNV = 453, /* PERTASKNV */ + YYSYMBOL_PRECISE = 454, /* PRECISE */ + YYSYMBOL_YYACCEPT = 455, /* $accept */ + YYSYMBOL_variable_identifier = 456, /* variable_identifier */ + YYSYMBOL_primary_expression = 457, /* primary_expression */ + YYSYMBOL_postfix_expression = 458, /* postfix_expression */ + YYSYMBOL_integer_expression = 459, /* integer_expression */ + YYSYMBOL_function_call = 460, /* function_call */ + YYSYMBOL_function_call_or_method = 461, /* function_call_or_method */ + YYSYMBOL_function_call_generic = 462, /* function_call_generic */ + YYSYMBOL_function_call_header_no_parameters = 463, /* function_call_header_no_parameters */ + YYSYMBOL_function_call_header_with_parameters = 464, /* function_call_header_with_parameters */ + YYSYMBOL_function_call_header = 465, /* function_call_header */ + YYSYMBOL_function_identifier = 466, /* function_identifier */ + YYSYMBOL_unary_expression = 467, /* unary_expression */ + YYSYMBOL_unary_operator = 468, /* unary_operator */ + YYSYMBOL_multiplicative_expression = 469, /* multiplicative_expression */ + YYSYMBOL_additive_expression = 470, /* additive_expression */ + YYSYMBOL_shift_expression = 471, /* shift_expression */ + YYSYMBOL_relational_expression = 472, /* relational_expression */ + YYSYMBOL_equality_expression = 473, /* equality_expression */ + YYSYMBOL_and_expression = 474, /* and_expression */ + YYSYMBOL_exclusive_or_expression = 475, /* exclusive_or_expression */ + YYSYMBOL_inclusive_or_expression = 476, /* inclusive_or_expression */ + YYSYMBOL_logical_and_expression = 477, /* logical_and_expression */ + YYSYMBOL_logical_xor_expression = 478, /* logical_xor_expression */ + YYSYMBOL_logical_or_expression = 479, /* logical_or_expression */ + YYSYMBOL_conditional_expression = 480, /* conditional_expression */ + YYSYMBOL_481_1 = 481, /* $@1 */ + YYSYMBOL_assignment_expression = 482, /* assignment_expression */ + YYSYMBOL_assignment_operator = 483, /* assignment_operator */ + YYSYMBOL_expression = 484, /* expression */ + YYSYMBOL_constant_expression = 485, /* constant_expression */ + YYSYMBOL_declaration = 486, /* declaration */ + YYSYMBOL_block_structure = 487, /* block_structure */ + YYSYMBOL_488_2 = 488, /* $@2 */ + YYSYMBOL_identifier_list = 489, /* identifier_list */ + YYSYMBOL_function_prototype = 490, /* function_prototype */ + YYSYMBOL_function_declarator = 491, /* function_declarator */ + YYSYMBOL_function_header_with_parameters = 492, /* function_header_with_parameters */ + YYSYMBOL_function_header = 493, /* function_header */ + YYSYMBOL_parameter_declarator = 494, /* parameter_declarator */ + YYSYMBOL_parameter_declaration = 495, /* parameter_declaration */ + YYSYMBOL_parameter_type_specifier = 496, /* parameter_type_specifier */ + YYSYMBOL_init_declarator_list = 497, /* init_declarator_list */ + YYSYMBOL_single_declaration = 498, /* single_declaration */ + YYSYMBOL_fully_specified_type = 499, /* fully_specified_type */ + YYSYMBOL_invariant_qualifier = 500, /* invariant_qualifier */ + YYSYMBOL_interpolation_qualifier = 501, /* interpolation_qualifier */ + YYSYMBOL_layout_qualifier = 502, /* layout_qualifier */ + YYSYMBOL_layout_qualifier_id_list = 503, /* layout_qualifier_id_list */ + YYSYMBOL_layout_qualifier_id = 504, /* layout_qualifier_id */ + YYSYMBOL_precise_qualifier = 505, /* precise_qualifier */ + YYSYMBOL_type_qualifier = 506, /* type_qualifier */ + YYSYMBOL_single_type_qualifier = 507, /* single_type_qualifier */ + YYSYMBOL_storage_qualifier = 508, /* storage_qualifier */ + YYSYMBOL_non_uniform_qualifier = 509, /* non_uniform_qualifier */ + YYSYMBOL_type_name_list = 510, /* type_name_list */ + YYSYMBOL_type_specifier = 511, /* type_specifier */ + YYSYMBOL_array_specifier = 512, /* array_specifier */ + YYSYMBOL_type_parameter_specifier_opt = 513, /* type_parameter_specifier_opt */ + YYSYMBOL_type_parameter_specifier = 514, /* type_parameter_specifier */ + YYSYMBOL_type_parameter_specifier_list = 515, /* type_parameter_specifier_list */ + YYSYMBOL_type_specifier_nonarray = 516, /* type_specifier_nonarray */ + YYSYMBOL_precision_qualifier = 517, /* precision_qualifier */ + YYSYMBOL_struct_specifier = 518, /* struct_specifier */ + YYSYMBOL_519_3 = 519, /* $@3 */ + YYSYMBOL_520_4 = 520, /* $@4 */ + YYSYMBOL_struct_declaration_list = 521, /* struct_declaration_list */ + YYSYMBOL_struct_declaration = 522, /* struct_declaration */ + YYSYMBOL_struct_declarator_list = 523, /* struct_declarator_list */ + YYSYMBOL_struct_declarator = 524, /* struct_declarator */ + YYSYMBOL_initializer = 525, /* initializer */ + YYSYMBOL_initializer_list = 526, /* initializer_list */ + YYSYMBOL_declaration_statement = 527, /* declaration_statement */ + YYSYMBOL_statement = 528, /* statement */ + YYSYMBOL_simple_statement = 529, /* simple_statement */ + YYSYMBOL_demote_statement = 530, /* demote_statement */ + YYSYMBOL_compound_statement = 531, /* compound_statement */ + YYSYMBOL_532_5 = 532, /* $@5 */ + YYSYMBOL_533_6 = 533, /* $@6 */ + YYSYMBOL_statement_no_new_scope = 534, /* statement_no_new_scope */ + YYSYMBOL_statement_scoped = 535, /* statement_scoped */ + YYSYMBOL_536_7 = 536, /* $@7 */ + YYSYMBOL_537_8 = 537, /* $@8 */ + YYSYMBOL_compound_statement_no_new_scope = 538, /* compound_statement_no_new_scope */ + YYSYMBOL_statement_list = 539, /* statement_list */ + YYSYMBOL_expression_statement = 540, /* expression_statement */ + YYSYMBOL_selection_statement = 541, /* selection_statement */ + YYSYMBOL_selection_statement_nonattributed = 542, /* selection_statement_nonattributed */ + YYSYMBOL_selection_rest_statement = 543, /* selection_rest_statement */ + YYSYMBOL_condition = 544, /* condition */ + YYSYMBOL_switch_statement = 545, /* switch_statement */ + YYSYMBOL_switch_statement_nonattributed = 546, /* switch_statement_nonattributed */ + YYSYMBOL_547_9 = 547, /* $@9 */ + YYSYMBOL_switch_statement_list = 548, /* switch_statement_list */ + YYSYMBOL_case_label = 549, /* case_label */ + YYSYMBOL_iteration_statement = 550, /* iteration_statement */ + YYSYMBOL_iteration_statement_nonattributed = 551, /* iteration_statement_nonattributed */ + YYSYMBOL_552_10 = 552, /* $@10 */ + YYSYMBOL_553_11 = 553, /* $@11 */ + YYSYMBOL_554_12 = 554, /* $@12 */ + YYSYMBOL_for_init_statement = 555, /* for_init_statement */ + YYSYMBOL_conditionopt = 556, /* conditionopt */ + YYSYMBOL_for_rest_statement = 557, /* for_rest_statement */ + YYSYMBOL_jump_statement = 558, /* jump_statement */ + YYSYMBOL_translation_unit = 559, /* translation_unit */ + YYSYMBOL_external_declaration = 560, /* external_declaration */ + YYSYMBOL_function_definition = 561, /* function_definition */ + YYSYMBOL_562_13 = 562, /* $@13 */ + YYSYMBOL_attribute = 563, /* attribute */ + YYSYMBOL_attribute_list = 564, /* attribute_list */ + YYSYMBOL_single_attribute = 565, /* single_attribute */ + YYSYMBOL_spirv_requirements_list = 566, /* spirv_requirements_list */ + YYSYMBOL_spirv_requirements_parameter = 567, /* spirv_requirements_parameter */ + YYSYMBOL_spirv_extension_list = 568, /* spirv_extension_list */ + YYSYMBOL_spirv_capability_list = 569, /* spirv_capability_list */ + YYSYMBOL_spirv_execution_mode_qualifier = 570, /* spirv_execution_mode_qualifier */ + YYSYMBOL_spirv_execution_mode_parameter_list = 571, /* spirv_execution_mode_parameter_list */ + YYSYMBOL_spirv_execution_mode_parameter = 572, /* spirv_execution_mode_parameter */ + YYSYMBOL_spirv_execution_mode_id_parameter_list = 573, /* spirv_execution_mode_id_parameter_list */ + YYSYMBOL_spirv_storage_class_qualifier = 574, /* spirv_storage_class_qualifier */ + YYSYMBOL_spirv_decorate_qualifier = 575, /* spirv_decorate_qualifier */ + YYSYMBOL_spirv_decorate_parameter_list = 576, /* spirv_decorate_parameter_list */ + YYSYMBOL_spirv_decorate_parameter = 577, /* spirv_decorate_parameter */ + YYSYMBOL_spirv_decorate_id_parameter_list = 578, /* spirv_decorate_id_parameter_list */ + YYSYMBOL_spirv_decorate_string_parameter_list = 579, /* spirv_decorate_string_parameter_list */ + YYSYMBOL_spirv_type_specifier = 580, /* spirv_type_specifier */ + YYSYMBOL_spirv_type_parameter_list = 581, /* spirv_type_parameter_list */ + YYSYMBOL_spirv_type_parameter = 582, /* spirv_type_parameter */ + YYSYMBOL_spirv_instruction_qualifier = 583, /* spirv_instruction_qualifier */ + YYSYMBOL_spirv_instruction_qualifier_list = 584, /* spirv_instruction_qualifier_list */ + YYSYMBOL_spirv_instruction_qualifier_id = 585 /* spirv_instruction_qualifier_id */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; /* Second part of user prologue. */ -#line 133 "MachineIndependent/glslang.y" +#line 136 "MachineIndependent/glslang.y" /* windows only pragma */ @@ -698,7 +728,7 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; extern int yylex(YYSTYPE*, TParseContext&); -#line 702 "MachineIndependent/glslang_tab.cpp" +#line 732 "MachineIndependent/glslang_tab.cpp" #ifdef short @@ -1002,21 +1032,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 416 +#define YYFINAL 442 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 10112 +#define YYLAST 12453 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 445 +#define YYNTOKENS 455 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 111 +#define YYNNTS 131 /* YYNRULES -- Number of rules. */ -#define YYNRULES 616 +#define YYNRULES 684 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 764 +#define YYNSTATES 930 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 699 +#define YYMAXUTOK 709 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1099,75 +1129,83 @@ static const yytype_int16 yytranslate[] = 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444 + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 371, 371, 377, 380, 385, 388, 391, 395, 399, - 402, 406, 410, 414, 418, 422, 426, 432, 440, 443, - 446, 449, 452, 457, 465, 472, 479, 485, 489, 496, - 499, 505, 512, 522, 530, 535, 563, 572, 578, 582, - 586, 606, 607, 608, 609, 615, 616, 621, 626, 635, - 636, 641, 649, 650, 656, 665, 666, 671, 676, 681, - 689, 690, 699, 711, 712, 721, 722, 731, 732, 741, - 742, 750, 751, 759, 760, 768, 769, 769, 787, 788, - 804, 808, 812, 816, 821, 825, 829, 833, 837, 841, - 845, 852, 855, 866, 873, 878, 883, 890, 894, 898, - 902, 907, 912, 921, 921, 932, 936, 943, 950, 953, - 960, 968, 988, 1011, 1026, 1051, 1062, 1072, 1082, 1092, - 1101, 1104, 1108, 1112, 1117, 1125, 1132, 1137, 1142, 1147, - 1156, 1166, 1193, 1202, 1209, 1217, 1224, 1231, 1239, 1249, - 1256, 1267, 1273, 1276, 1283, 1287, 1291, 1300, 1310, 1313, - 1324, 1327, 1330, 1334, 1338, 1343, 1347, 1354, 1358, 1363, - 1369, 1375, 1382, 1387, 1395, 1401, 1413, 1427, 1433, 1438, - 1446, 1454, 1462, 1470, 1478, 1486, 1494, 1502, 1509, 1516, - 1520, 1525, 1530, 1535, 1540, 1545, 1550, 1554, 1558, 1562, - 1566, 1572, 1583, 1590, 1593, 1602, 1607, 1617, 1622, 1630, - 1634, 1644, 1647, 1653, 1659, 1666, 1676, 1680, 1684, 1688, - 1693, 1697, 1702, 1707, 1712, 1717, 1722, 1727, 1732, 1737, - 1742, 1748, 1754, 1760, 1765, 1770, 1775, 1780, 1785, 1790, - 1795, 1800, 1805, 1810, 1815, 1821, 1828, 1833, 1838, 1843, - 1848, 1853, 1858, 1863, 1868, 1873, 1878, 1883, 1891, 1899, - 1907, 1913, 1919, 1925, 1931, 1937, 1943, 1949, 1955, 1961, - 1967, 1973, 1979, 1985, 1991, 1997, 2003, 2009, 2015, 2021, - 2027, 2033, 2039, 2045, 2051, 2057, 2063, 2069, 2075, 2081, - 2087, 2093, 2099, 2105, 2113, 2121, 2129, 2137, 2145, 2153, - 2161, 2169, 2177, 2185, 2193, 2201, 2207, 2213, 2219, 2225, - 2231, 2237, 2243, 2249, 2255, 2261, 2267, 2273, 2279, 2285, - 2291, 2297, 2303, 2309, 2315, 2321, 2327, 2333, 2339, 2345, - 2351, 2357, 2363, 2369, 2375, 2381, 2387, 2393, 2399, 2405, - 2411, 2417, 2421, 2425, 2429, 2434, 2440, 2445, 2450, 2455, - 2460, 2465, 2470, 2476, 2481, 2486, 2491, 2496, 2501, 2507, - 2513, 2519, 2525, 2531, 2537, 2543, 2549, 2555, 2561, 2567, - 2573, 2579, 2585, 2590, 2595, 2600, 2605, 2610, 2615, 2621, - 2626, 2631, 2636, 2641, 2646, 2651, 2656, 2662, 2667, 2672, - 2677, 2682, 2687, 2692, 2697, 2702, 2707, 2712, 2717, 2722, - 2727, 2732, 2738, 2743, 2748, 2754, 2760, 2765, 2770, 2775, - 2781, 2786, 2791, 2796, 2802, 2807, 2812, 2817, 2823, 2828, - 2833, 2838, 2844, 2850, 2856, 2862, 2867, 2873, 2879, 2885, - 2890, 2895, 2900, 2905, 2910, 2916, 2921, 2926, 2931, 2937, - 2942, 2947, 2952, 2958, 2963, 2968, 2973, 2979, 2984, 2989, - 2994, 3000, 3005, 3010, 3015, 3021, 3026, 3031, 3036, 3042, - 3047, 3052, 3057, 3063, 3068, 3073, 3078, 3084, 3089, 3094, - 3099, 3105, 3110, 3115, 3120, 3126, 3131, 3136, 3141, 3147, - 3152, 3157, 3162, 3168, 3173, 3178, 3183, 3189, 3194, 3199, - 3204, 3210, 3215, 3220, 3225, 3230, 3235, 3240, 3245, 3250, - 3255, 3260, 3265, 3270, 3275, 3280, 3285, 3290, 3295, 3300, - 3305, 3310, 3315, 3320, 3325, 3330, 3336, 3342, 3348, 3354, - 3361, 3368, 3374, 3380, 3386, 3392, 3398, 3404, 3411, 3416, - 3432, 3437, 3442, 3450, 3450, 3461, 3461, 3471, 3474, 3487, - 3509, 3536, 3540, 3546, 3551, 3562, 3566, 3572, 3583, 3586, - 3593, 3597, 3598, 3604, 3605, 3606, 3607, 3608, 3609, 3610, - 3612, 3618, 3627, 3628, 3632, 3628, 3644, 3645, 3649, 3649, - 3656, 3656, 3670, 3673, 3681, 3689, 3700, 3701, 3705, 3709, - 3716, 3723, 3727, 3735, 3739, 3752, 3756, 3763, 3763, 3783, - 3786, 3792, 3804, 3816, 3820, 3827, 3827, 3842, 3842, 3858, - 3858, 3879, 3882, 3888, 3891, 3897, 3901, 3908, 3913, 3918, - 3925, 3928, 3932, 3937, 3941, 3951, 3955, 3964, 3967, 3971, - 3980, 3980, 4022, 4028, 4031, 4036, 4039 + 0, 392, 392, 398, 401, 406, 409, 412, 416, 420, + 423, 427, 431, 435, 439, 443, 447, 453, 461, 464, + 467, 470, 473, 478, 486, 493, 500, 506, 510, 517, + 520, 526, 533, 543, 551, 556, 584, 593, 599, 603, + 607, 627, 628, 629, 630, 636, 637, 642, 647, 656, + 657, 662, 670, 671, 677, 686, 687, 692, 697, 702, + 710, 711, 720, 732, 733, 742, 743, 752, 753, 762, + 763, 771, 772, 780, 781, 789, 790, 790, 808, 809, + 825, 829, 833, 837, 842, 846, 850, 854, 858, 862, + 866, 873, 876, 887, 894, 900, 907, 913, 918, 925, + 929, 933, 937, 942, 947, 956, 956, 967, 971, 978, + 982, 988, 994, 1004, 1007, 1014, 1022, 1042, 1065, 1080, + 1105, 1116, 1126, 1136, 1146, 1155, 1158, 1162, 1166, 1171, + 1179, 1186, 1191, 1196, 1201, 1210, 1220, 1247, 1256, 1263, + 1271, 1278, 1285, 1293, 1303, 1310, 1321, 1327, 1330, 1337, + 1341, 1345, 1354, 1364, 1367, 1378, 1381, 1384, 1388, 1392, + 1397, 1401, 1404, 1409, 1413, 1418, 1427, 1431, 1436, 1442, + 1448, 1455, 1460, 1468, 1474, 1486, 1500, 1506, 1511, 1519, + 1527, 1535, 1543, 1551, 1559, 1567, 1575, 1582, 1589, 1593, + 1598, 1603, 1608, 1613, 1618, 1623, 1627, 1631, 1635, 1639, + 1645, 1656, 1663, 1666, 1675, 1680, 1690, 1695, 1703, 1707, + 1717, 1720, 1726, 1732, 1739, 1749, 1753, 1757, 1761, 1766, + 1770, 1775, 1780, 1785, 1790, 1795, 1800, 1805, 1810, 1815, + 1821, 1827, 1833, 1838, 1843, 1848, 1853, 1858, 1863, 1868, + 1873, 1878, 1883, 1888, 1894, 1901, 1906, 1911, 1916, 1921, + 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1964, 1972, 1980, + 1986, 1992, 1998, 2004, 2010, 2016, 2022, 2028, 2034, 2040, + 2046, 2052, 2058, 2064, 2070, 2076, 2082, 2088, 2094, 2100, + 2106, 2112, 2118, 2124, 2130, 2136, 2142, 2148, 2154, 2160, + 2166, 2172, 2178, 2186, 2194, 2202, 2210, 2218, 2226, 2234, + 2242, 2250, 2258, 2266, 2274, 2280, 2286, 2292, 2298, 2304, + 2310, 2316, 2322, 2328, 2334, 2340, 2346, 2352, 2358, 2364, + 2370, 2376, 2382, 2388, 2394, 2400, 2406, 2412, 2418, 2424, + 2430, 2436, 2442, 2448, 2454, 2460, 2466, 2472, 2478, 2484, + 2490, 2494, 2498, 2502, 2507, 2513, 2518, 2523, 2528, 2533, + 2538, 2543, 2549, 2554, 2559, 2564, 2569, 2574, 2580, 2586, + 2592, 2598, 2604, 2610, 2616, 2622, 2628, 2634, 2640, 2646, + 2652, 2658, 2663, 2668, 2673, 2678, 2683, 2688, 2694, 2699, + 2704, 2709, 2714, 2719, 2724, 2729, 2735, 2740, 2745, 2750, + 2755, 2760, 2765, 2770, 2775, 2780, 2785, 2790, 2795, 2800, + 2805, 2811, 2816, 2821, 2827, 2833, 2838, 2843, 2848, 2854, + 2859, 2864, 2869, 2875, 2880, 2885, 2890, 2896, 2901, 2906, + 2911, 2917, 2923, 2929, 2935, 2940, 2946, 2952, 2958, 2963, + 2968, 2973, 2978, 2983, 2989, 2994, 2999, 3004, 3010, 3015, + 3020, 3025, 3031, 3036, 3041, 3046, 3052, 3057, 3062, 3067, + 3073, 3078, 3083, 3088, 3094, 3099, 3104, 3109, 3115, 3120, + 3125, 3130, 3136, 3141, 3146, 3151, 3157, 3162, 3167, 3172, + 3178, 3183, 3188, 3193, 3199, 3204, 3209, 3214, 3220, 3225, + 3230, 3235, 3241, 3246, 3251, 3256, 3262, 3267, 3272, 3277, + 3283, 3288, 3293, 3298, 3303, 3308, 3313, 3318, 3323, 3328, + 3333, 3338, 3343, 3348, 3353, 3358, 3363, 3368, 3373, 3378, + 3383, 3388, 3393, 3398, 3403, 3409, 3415, 3421, 3427, 3434, + 3441, 3447, 3453, 3459, 3465, 3471, 3477, 3483, 3488, 3493, + 3509, 3514, 3519, 3527, 3527, 3538, 3538, 3548, 3551, 3564, + 3586, 3613, 3617, 3623, 3628, 3639, 3643, 3649, 3655, 3666, + 3669, 3676, 3680, 3681, 3687, 3688, 3689, 3690, 3691, 3692, + 3693, 3695, 3701, 3710, 3711, 3715, 3711, 3727, 3728, 3732, + 3732, 3739, 3739, 3753, 3756, 3764, 3772, 3783, 3784, 3788, + 3792, 3800, 3807, 3811, 3819, 3823, 3836, 3840, 3848, 3848, + 3868, 3871, 3877, 3889, 3901, 3905, 3913, 3913, 3928, 3928, + 3944, 3944, 3965, 3968, 3974, 3977, 3983, 3987, 3994, 3999, + 4004, 4011, 4014, 4018, 4023, 4027, 4037, 4041, 4050, 4053, + 4057, 4066, 4066, 4108, 4113, 4116, 4121, 4124, 4131, 4134, + 4139, 4142, 4147, 4150, 4155, 4158, 4163, 4167, 4172, 4176, + 4181, 4185, 4192, 4195, 4200, 4203, 4206, 4209, 4212, 4217, + 4226, 4237, 4242, 4250, 4254, 4259, 4263, 4268, 4272, 4277, + 4281, 4288, 4291, 4296, 4299, 4302, 4305, 4310, 4318, 4328, + 4332, 4337, 4341, 4346, 4350, 4357, 4360, 4365, 4368, 4373, + 4376, 4382, 4385, 4390, 4393 }; #endif @@ -1254,17 +1292,20 @@ static const char *const yytname[] = "F16TEXTURECUBEARRAY", "F16TEXTUREBUFFER", "F16TEXTURE2DMS", "F16TEXTURE2DMSARRAY", "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT", "ISUBPASSINPUTMS", "USUBPASSINPUT", "USUBPASSINPUTMS", "F16SUBPASSINPUT", - "F16SUBPASSINPUTMS", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", - "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", - "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", - "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "STRING_LITERAL", - "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", - "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", - "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", - "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", - "QUESTION", "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION", - "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", - "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", + "F16SUBPASSINPUTMS", "SPIRV_INSTRUCTION", "SPIRV_EXECUTION_MODE", + "SPIRV_EXECUTION_MODE_ID", "SPIRV_DECORATE", "SPIRV_DECORATE_ID", + "SPIRV_DECORATE_STRING", "SPIRV_TYPE", "SPIRV_STORAGE_CLASS", + "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "LEFT_OP", "RIGHT_OP", "INC_OP", + "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", + "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", + "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", + "SUB_ASSIGN", "STRING_LITERAL", "LEFT_PAREN", "RIGHT_PAREN", + "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", + "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", + "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", + "CARET", "AMPERSAND", "QUESTION", "INVARIANT", "HIGH_PRECISION", + "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", + "SUPERP", "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "IDENTIFIER", "TYPE_NAME", "CENTROID", "IN", "OUT", "INOUT", "STRUCT", "VOID", "WHILE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "TERMINATE_INVOCATION", @@ -1317,7 +1358,18 @@ static const char *const yytname[] = "for_init_statement", "conditionopt", "for_rest_statement", "jump_statement", "translation_unit", "external_declaration", "function_definition", "$@13", "attribute", "attribute_list", - "single_attribute", YY_NULLPTR + "single_attribute", "spirv_requirements_list", + "spirv_requirements_parameter", "spirv_extension_list", + "spirv_capability_list", "spirv_execution_mode_qualifier", + "spirv_execution_mode_parameter_list", "spirv_execution_mode_parameter", + "spirv_execution_mode_id_parameter_list", + "spirv_storage_class_qualifier", "spirv_decorate_qualifier", + "spirv_decorate_parameter_list", "spirv_decorate_parameter", + "spirv_decorate_id_parameter_list", + "spirv_decorate_string_parameter_list", "spirv_type_specifier", + "spirv_type_parameter_list", "spirv_type_parameter", + "spirv_instruction_qualifier", "spirv_instruction_qualifier_list", + "spirv_instruction_qualifier_id", YY_NULLPTR }; static const char * @@ -1376,16 +1428,17 @@ static const yytype_int16 yytoknum[] = 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, - 695, 696, 697, 698, 699 + 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709 }; #endif -#define YYPACT_NINF (-732) +#define YYPACT_NINF (-863) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-559) +#define YYTABLE_NINF (-570) #define yytable_value_is_error(Yyn) \ 0 @@ -1394,83 +1447,99 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 4303, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - 109, -732, -732, -732, -732, -732, 1, -732, -732, -732, - -732, -732, -732, -324, -261, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, 11, 44, 22, - 7, 6513, -332, -732, -10, -732, -732, -732, -732, 4745, - -732, -732, -732, -732, 46, -732, -732, 767, -732, -732, - 16, -732, 69, -5, 47, -732, -338, -732, 91, -732, - 6513, -732, -732, -732, 6513, 72, 80, -732, 13, -732, - 74, -732, -732, 9069, 126, -732, -732, -732, 127, 6513, - -732, 144, -732, 17, -732, -732, 61, 7377, -732, 10, - 1209, -732, -732, -732, -732, 126, 25, -732, 7800, 26, - -732, 119, -732, 78, 9069, 9069, -732, 9069, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, 36, -732, -732, - -732, 164, 65, 9492, 171, -732, 9069, -732, -732, -340, - 173, -732, 6513, 140, 5187, -732, 6513, 9069, -732, -5, - -732, 141, -732, -732, 124, 130, 179, 27, 117, 156, - 158, 160, 195, 194, 20, 181, 8223, -732, 183, 182, - -732, -732, 186, 178, 180, -732, 189, 192, 184, 8646, - 193, 9069, 187, 188, 190, 196, 197, 129, -732, -732, - 89, -732, 44, 199, 204, -732, -732, -732, -732, -732, - 1651, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -376, 173, 7800, 54, 7800, -732, -732, 7800, 6513, -732, - 161, -732, -732, -732, 70, -732, -732, 9069, 169, -732, - -732, 9069, 207, -732, -732, -732, 9069, -732, 140, 126, - 103, -732, -732, -732, 5629, -732, -732, -732, -732, 9069, - 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, - 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, -732, -732, - -732, 209, 177, -732, 2093, -732, -732, -732, 2093, -732, - 9069, -732, -732, 122, 9069, 152, -732, -732, -732, -732, - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, 9069, 9069, -732, -732, -732, -732, -732, -732, - -732, 7800, -732, 143, -732, 6071, -732, -732, 211, 208, - -732, -732, -732, 123, 173, 140, -732, -732, -732, -732, - -732, 124, 124, 130, 130, 179, 179, 179, 179, 27, - 27, 117, 156, 158, 160, 195, 194, 9069, -732, 216, - 87, -732, 2093, 3861, 174, 3419, 75, -732, 85, -732, - -732, -732, -732, -732, 6954, -732, -732, -732, -732, 154, - 9069, 217, 177, 191, 208, 185, 6513, 221, 223, -732, - -732, 3861, 220, -732, -732, -732, 9069, 224, -732, -732, - -732, 218, 2535, 9069, -732, 219, 225, 198, 226, 2977, - -732, 227, -732, -732, 7800, -732, -732, -732, 86, 9069, - 2535, 220, -732, -732, 2093, -732, 222, 208, -732, -732, - 2093, 228, -732, -732 + 4549, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -260, -182, -177, -163, -130, + -115, -100, -89, -863, -863, -196, -863, -863, -863, -863, + -863, -324, -863, -863, -863, -863, -863, -306, -863, -863, + -863, -863, -863, -863, -77, -66, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -332, -175, + -153, -161, 7713, -266, -863, -71, -863, -863, -863, -863, + 5453, -863, -863, -863, -863, -116, -863, -863, 933, -863, + -863, 7713, -35, -863, -863, -863, 5905, -54, -139, -138, + -137, -128, -124, -54, -123, -51, 12061, -863, -15, -347, + -44, -863, -295, -863, -9, -6, 7713, -863, -863, -863, + 7713, -39, -38, -863, -303, -863, -226, -863, -863, 10762, + -3, -863, -863, -863, 1, -32, 7713, -863, -5, -8, + -1, -863, -230, -863, -219, -2, 3, 4, 5, -215, + 6, 8, 10, 11, 12, 15, -214, 13, 16, 21, + -134, -863, 17, 7713, -863, 19, -863, -212, -863, -863, + -211, 9030, -863, -273, 1385, -863, -863, -863, -863, -863, + -3, -263, -863, 9463, -236, -863, -28, -863, -106, 10762, + 10762, -863, 10762, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -264, -863, -863, -863, 23, -203, 11195, 25, + -863, 10762, -863, -863, -311, 24, -6, 29, -863, -309, + -54, -863, -20, -863, -323, 28, -118, 10762, -112, -863, + -155, -111, 10762, -103, 35, -98, -54, -863, 11628, -863, + -94, 10762, 32, -51, -863, 7713, 18, 6357, -863, 7713, + 10762, -863, -347, -863, 33, -863, -863, -72, -254, -86, + -297, -68, -13, 26, 20, 50, 49, -300, 42, 9896, + -863, 43, -863, -863, 55, 58, 60, -863, 65, 71, + 62, 10329, 73, 10762, 66, 69, 70, 72, 74, -241, + -863, -863, -41, -863, -175, 83, 85, -863, -863, -863, + -863, -863, 1837, -863, -863, -863, -863, -863, -863, -863, + -863, -863, 5001, 24, 9463, -233, 8164, -863, -863, 9463, + 7713, -863, 51, -863, -863, -863, -194, -863, -863, 10762, + 52, -863, -863, 10762, 88, -863, -863, -863, 10762, -863, + -863, -863, -315, -863, -863, -191, 82, -863, -863, -863, + -863, -863, -863, -190, -863, -187, -863, -863, -186, 86, + -863, -863, -863, -863, -169, -863, -168, -863, -167, 89, + -863, -165, 91, -157, 82, -863, 85, -156, -863, 94, + 98, -863, -863, 18, -3, -40, -863, -863, -863, 6809, + -863, -863, -863, 10762, 10762, 10762, 10762, 10762, 10762, 10762, + 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, + 10762, 10762, -863, -863, -863, 97, -863, 2289, -863, -863, + -863, 2289, -863, 10762, -863, -863, -34, 10762, -79, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, 10762, 10762, -863, -863, -863, + -863, -863, -863, -863, 9463, -863, -863, -208, -863, 7261, + -863, -863, 99, 96, -863, -863, -863, -863, -863, -132, + -131, -863, -307, -863, -323, -863, -323, -863, 10762, 10762, + -863, -155, -863, -155, -863, 10762, 10762, -863, 93, 35, + -863, 11628, -863, 10762, -863, -863, -33, 24, 18, -863, + -863, -863, -863, -863, -72, -72, -254, -254, -86, -86, + -86, -86, -297, -297, -68, -13, 26, 20, 50, 49, + 10762, -863, 2289, 4097, 57, 3645, -154, -863, -152, -863, + -863, -863, -863, -863, 8597, -863, -863, -863, 105, -863, + 75, -863, -145, -863, -144, -863, -143, -863, -142, -863, + -141, -140, -863, -863, -863, -27, 100, 96, 76, 106, + 109, -863, -863, 4097, 107, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, 10762, -863, 101, 2741, + 10762, -863, 103, 113, 67, 112, 3193, -863, 114, -863, + 9463, -863, -863, -863, -133, 10762, 2741, 107, -863, -863, + 2289, -863, 110, 96, -863, -863, 2289, 116, -863, -863 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1478,117 +1547,137 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 157, 210, 208, 209, 207, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 211, 212, 213, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 336, 337, 338, 339, 340, 341, 342, 362, 363, 364, - 365, 366, 367, 368, 377, 390, 391, 378, 379, 381, - 380, 382, 383, 384, 385, 386, 387, 388, 389, 165, - 166, 236, 237, 235, 238, 245, 246, 243, 244, 241, - 242, 239, 240, 268, 269, 270, 280, 281, 282, 265, - 266, 267, 277, 278, 279, 262, 263, 264, 274, 275, - 276, 259, 260, 261, 271, 272, 273, 247, 248, 249, - 283, 284, 285, 250, 251, 252, 295, 296, 297, 253, - 254, 255, 307, 308, 309, 256, 257, 258, 319, 320, - 321, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 310, - 311, 312, 313, 314, 315, 316, 317, 318, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 334, 331, 332, - 333, 515, 516, 517, 346, 347, 370, 373, 335, 344, - 345, 361, 343, 392, 393, 396, 397, 398, 400, 401, - 402, 404, 405, 406, 408, 409, 505, 506, 369, 371, - 372, 348, 349, 350, 394, 351, 355, 356, 359, 399, - 403, 407, 352, 353, 357, 358, 395, 354, 360, 439, - 441, 442, 443, 445, 446, 447, 449, 450, 451, 453, - 454, 455, 457, 458, 459, 461, 462, 463, 465, 466, - 467, 469, 470, 471, 473, 474, 475, 477, 478, 479, - 481, 482, 440, 444, 448, 452, 456, 464, 468, 472, - 460, 476, 480, 483, 484, 485, 486, 487, 488, 489, - 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, - 500, 501, 502, 503, 504, 374, 375, 376, 410, 419, - 421, 415, 420, 422, 423, 425, 426, 427, 429, 430, - 431, 433, 434, 435, 437, 438, 411, 412, 413, 424, - 414, 416, 417, 418, 428, 432, 436, 507, 508, 511, - 512, 513, 514, 509, 510, 609, 132, 520, 521, 522, - 0, 519, 161, 159, 160, 158, 0, 206, 162, 163, - 164, 134, 133, 0, 190, 171, 173, 169, 175, 177, - 172, 174, 170, 176, 178, 167, 168, 192, 179, 186, - 187, 188, 189, 180, 181, 182, 183, 184, 185, 135, - 136, 137, 138, 139, 140, 147, 608, 0, 610, 0, - 109, 108, 0, 120, 125, 154, 153, 151, 155, 0, - 148, 150, 156, 130, 202, 152, 518, 0, 605, 607, - 0, 525, 0, 0, 0, 97, 0, 94, 0, 107, - 0, 116, 110, 118, 0, 119, 0, 95, 126, 100, - 0, 149, 131, 0, 195, 201, 1, 606, 0, 0, - 523, 144, 146, 0, 142, 193, 0, 0, 98, 0, - 0, 611, 111, 115, 117, 113, 121, 112, 0, 127, - 103, 0, 101, 0, 0, 0, 9, 0, 43, 42, - 44, 41, 5, 6, 7, 8, 2, 16, 14, 15, - 17, 10, 11, 12, 13, 3, 18, 37, 20, 25, - 26, 0, 0, 30, 0, 204, 0, 36, 34, 0, - 196, 96, 0, 0, 0, 527, 0, 0, 141, 0, - 191, 0, 197, 45, 49, 52, 55, 60, 63, 65, - 67, 69, 71, 73, 75, 0, 0, 99, 0, 553, - 562, 566, 0, 0, 0, 587, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 45, 78, 91, - 0, 540, 0, 156, 130, 543, 564, 542, 550, 541, - 0, 544, 545, 568, 546, 575, 547, 548, 583, 549, - 0, 114, 0, 122, 0, 535, 129, 0, 0, 105, - 0, 102, 38, 39, 0, 22, 23, 0, 0, 28, - 27, 0, 206, 31, 33, 40, 0, 203, 0, 533, - 0, 531, 526, 528, 0, 93, 145, 143, 194, 0, + 0, 166, 219, 217, 218, 216, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 220, 221, 222, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 345, 346, 347, 348, 349, 350, 351, 371, 372, 373, + 374, 375, 376, 377, 386, 399, 400, 387, 388, 390, + 389, 391, 392, 393, 394, 395, 396, 397, 398, 174, + 175, 245, 246, 244, 247, 254, 255, 252, 253, 250, + 251, 248, 249, 277, 278, 279, 289, 290, 291, 274, + 275, 276, 286, 287, 288, 271, 272, 273, 283, 284, + 285, 268, 269, 270, 280, 281, 282, 256, 257, 258, + 292, 293, 294, 259, 260, 261, 304, 305, 306, 262, + 263, 264, 316, 317, 318, 265, 266, 267, 328, 329, + 330, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 343, 340, 341, + 342, 524, 525, 526, 355, 356, 379, 382, 344, 353, + 354, 370, 352, 401, 402, 405, 406, 407, 409, 410, + 411, 413, 414, 415, 417, 418, 514, 515, 378, 380, + 381, 357, 358, 359, 403, 360, 364, 365, 368, 408, + 412, 416, 361, 362, 366, 367, 404, 363, 369, 448, + 450, 451, 452, 454, 455, 456, 458, 459, 460, 462, + 463, 464, 466, 467, 468, 470, 471, 472, 474, 475, + 476, 478, 479, 480, 482, 483, 484, 486, 487, 488, + 490, 491, 449, 453, 457, 461, 465, 473, 477, 481, + 469, 485, 489, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, + 509, 510, 511, 512, 513, 383, 384, 385, 419, 428, + 430, 424, 429, 431, 432, 434, 435, 436, 438, 439, + 440, 442, 443, 444, 446, 447, 420, 421, 422, 433, + 423, 425, 426, 427, 437, 441, 445, 516, 517, 520, + 521, 522, 523, 518, 519, 0, 0, 0, 0, 0, + 0, 0, 0, 164, 165, 0, 620, 137, 530, 531, + 532, 0, 529, 170, 168, 169, 167, 0, 215, 171, + 172, 173, 139, 138, 0, 199, 180, 182, 178, 184, + 186, 181, 183, 179, 185, 187, 176, 177, 201, 188, + 195, 196, 197, 198, 189, 190, 191, 192, 193, 194, + 140, 141, 142, 143, 144, 145, 152, 619, 0, 621, + 0, 114, 113, 0, 125, 130, 159, 158, 156, 160, + 0, 153, 155, 161, 135, 211, 157, 528, 0, 616, + 618, 0, 0, 162, 163, 527, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 535, 0, 0, + 0, 99, 0, 94, 0, 109, 0, 121, 115, 123, + 0, 124, 0, 97, 131, 102, 0, 154, 136, 0, + 204, 210, 1, 617, 0, 0, 0, 96, 0, 0, + 0, 628, 0, 681, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 626, + 0, 624, 0, 0, 533, 149, 151, 0, 147, 202, + 0, 0, 100, 0, 0, 622, 110, 116, 120, 122, + 118, 126, 117, 0, 132, 105, 0, 103, 0, 0, + 0, 9, 0, 43, 42, 44, 41, 5, 6, 7, + 8, 2, 16, 14, 15, 17, 10, 11, 12, 13, + 3, 18, 37, 20, 25, 26, 0, 0, 30, 0, + 213, 0, 36, 34, 0, 205, 111, 0, 95, 0, + 0, 679, 0, 636, 0, 0, 0, 0, 0, 653, + 0, 0, 0, 0, 0, 0, 0, 673, 0, 651, + 0, 0, 0, 0, 98, 0, 0, 0, 537, 0, + 0, 146, 0, 200, 0, 206, 45, 49, 52, 55, + 60, 63, 65, 67, 69, 71, 73, 75, 0, 0, + 101, 564, 573, 577, 0, 0, 0, 598, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, + 78, 91, 0, 551, 0, 161, 135, 554, 575, 553, + 561, 552, 0, 555, 556, 579, 557, 586, 558, 559, + 594, 560, 0, 119, 0, 127, 0, 545, 134, 0, + 0, 107, 0, 104, 38, 39, 0, 22, 23, 0, + 0, 28, 27, 0, 215, 31, 33, 40, 0, 212, + 112, 683, 0, 684, 629, 0, 0, 682, 648, 644, + 645, 646, 647, 0, 642, 0, 93, 649, 0, 0, + 663, 664, 665, 666, 0, 661, 0, 667, 0, 0, + 669, 0, 0, 0, 2, 677, 678, 0, 675, 0, + 0, 623, 625, 0, 543, 0, 541, 536, 538, 0, + 150, 148, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 76, 198, - 199, 0, 0, 552, 0, 585, 598, 597, 0, 589, - 0, 601, 599, 0, 0, 0, 582, 602, 603, 604, - 551, 81, 82, 84, 83, 86, 87, 88, 89, 90, - 85, 80, 0, 0, 567, 563, 565, 569, 576, 584, - 124, 0, 538, 0, 128, 0, 106, 4, 0, 24, - 21, 32, 205, 0, 534, 0, 529, 524, 46, 47, - 48, 51, 50, 53, 54, 58, 59, 56, 57, 61, - 62, 64, 66, 68, 70, 72, 74, 0, 200, 615, - 0, 613, 554, 0, 0, 0, 0, 600, 0, 581, - 79, 92, 123, 536, 0, 104, 19, 530, 532, 0, - 0, 0, 0, 0, 573, 0, 0, 0, 0, 592, - 591, 594, 560, 577, 537, 539, 0, 0, 612, 614, - 555, 0, 0, 0, 593, 0, 0, 572, 0, 0, - 570, 0, 77, 616, 0, 557, 586, 556, 0, 595, - 0, 560, 559, 561, 579, 574, 0, 596, 590, 571, - 580, 0, 588, 578 + 0, 0, 76, 207, 208, 0, 563, 0, 596, 609, + 608, 0, 600, 0, 612, 610, 0, 0, 0, 593, + 613, 614, 615, 562, 81, 82, 84, 83, 86, 87, + 88, 89, 90, 85, 80, 0, 0, 578, 574, 576, + 580, 587, 595, 129, 0, 548, 549, 0, 133, 0, + 108, 4, 0, 24, 21, 32, 214, 632, 634, 0, + 0, 680, 0, 638, 0, 637, 0, 640, 0, 0, + 655, 0, 654, 0, 657, 0, 0, 659, 0, 0, + 674, 0, 671, 0, 652, 627, 0, 544, 0, 539, + 534, 46, 47, 48, 51, 50, 53, 54, 58, 59, + 56, 57, 61, 62, 64, 66, 68, 70, 72, 74, + 0, 209, 565, 0, 0, 0, 0, 611, 0, 592, + 79, 92, 128, 546, 0, 106, 19, 630, 0, 631, + 0, 643, 0, 650, 0, 662, 0, 668, 0, 670, + 0, 0, 676, 540, 542, 0, 0, 584, 0, 0, + 0, 603, 602, 605, 571, 588, 547, 550, 633, 635, + 639, 641, 656, 658, 660, 672, 0, 566, 0, 0, + 0, 604, 0, 0, 583, 0, 0, 581, 0, 77, + 0, 568, 597, 567, 0, 606, 0, 571, 570, 572, + 590, 585, 0, 607, 601, 582, 591, 0, 599, 589 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, - -732, -732, 9402, -732, -90, -89, -153, -92, -29, -28, - -27, -26, -30, -25, -732, -88, -732, -101, -732, -113, - -132, 2, -732, -732, -732, 4, -732, -732, -732, 200, - 201, 202, -732, -732, -343, -732, -732, -732, -732, 92, - -732, -36, -46, -732, 9, -732, 0, -67, -732, -732, - -732, -732, 263, -732, -732, -732, -481, -142, 8, -78, - -214, -732, -107, -204, -731, -732, -149, -732, -732, -160, - -159, -732, -732, 212, -269, -104, -732, 45, -732, -127, - -732, 48, -732, -732, -732, -732, 49, -732, -732, -732, - -732, -732, -732, -732, -732, 210, -732, -732, -732, -732, - -116 + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -418, -863, -380, -379, -484, -382, -258, -256, + -253, -257, -252, -255, -863, -478, -863, -485, -863, -491, + -530, 14, -863, -863, -863, 7, -397, -863, -863, 44, + 53, 47, -863, -863, -400, -863, -863, -863, -863, -92, + -863, -377, -362, -863, 9, -863, 0, -414, -863, -863, + -863, -863, 150, -863, -863, -863, -546, -548, -218, -331, + -624, -863, -359, -609, -862, -863, -417, -863, -863, -427, + -426, -863, -863, 68, -719, -355, -863, -136, -863, -389, + -863, -135, -863, -863, -863, -863, -129, -863, -863, -863, + -863, -863, -863, -863, -863, 102, -863, -863, 2, -863, + -65, -234, -432, -863, -863, -863, -301, -293, -294, -863, + -863, -304, -299, -302, -298, -863, -296, -305, -863, -383, + -526 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 465, 466, 467, 658, 468, 469, 470, 471, 472, - 473, 474, 527, 476, 494, 495, 496, 497, 498, 499, - 500, 501, 502, 503, 504, 528, 687, 529, 642, 530, - 586, 531, 367, 558, 443, 532, 369, 370, 371, 401, - 402, 403, 372, 373, 374, 375, 376, 377, 423, 424, - 378, 379, 380, 381, 477, 426, 478, 429, 414, 415, - 479, 384, 385, 386, 486, 419, 484, 485, 580, 581, - 556, 653, 535, 536, 537, 538, 539, 614, 713, 746, - 737, 738, 739, 747, 540, 541, 542, 543, 740, 717, - 544, 545, 741, 761, 546, 547, 548, 693, 618, 695, - 721, 735, 736, 549, 387, 388, 389, 398, 550, 690, - 691 + -1, 520, 521, 522, 782, 523, 524, 525, 526, 527, + 528, 529, 609, 531, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 610, 840, 611, 765, 612, + 695, 613, 378, 640, 498, 614, 380, 381, 382, 427, + 428, 429, 383, 384, 385, 386, 387, 388, 477, 478, + 389, 390, 391, 392, 532, 480, 533, 483, 440, 441, + 534, 395, 396, 397, 569, 473, 567, 568, 705, 706, + 638, 777, 617, 618, 619, 620, 621, 737, 876, 912, + 904, 905, 906, 913, 622, 623, 624, 625, 907, 879, + 626, 627, 908, 927, 628, 629, 630, 843, 741, 845, + 883, 902, 903, 631, 398, 399, 400, 424, 632, 470, + 471, 450, 451, 789, 790, 402, 673, 674, 678, 403, + 404, 684, 685, 688, 691, 405, 697, 698, 406, 452, + 453 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1596,83 +1685,190 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 383, 745, 366, 427, 368, 584, 576, 512, 753, 382, - 515, 428, 516, 517, 406, 393, 520, 407, 577, 745, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 655, 394, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 411, 564, 404, 646, 555, 650, 505, - 652, 439, 583, 654, 391, 692, 607, 480, 596, 597, - 715, 506, 437, 400, 427, 565, 566, 488, 411, 507, - 395, 438, 399, 489, 404, 408, 427, 506, 551, 553, - 421, 405, 573, 552, 557, -35, 392, 567, 715, 412, - 382, 568, 608, 482, 598, 599, 396, 383, 382, 366, - 418, 368, 321, 397, 422, 506, 382, 326, 327, 585, - 405, 490, 651, 413, 405, 570, 623, 491, 625, 382, - 657, 571, 420, 382, 694, 722, 643, 440, 611, 483, - 441, 643, 425, 442, 560, 723, 756, 561, 382, 711, - 534, 643, 643, 712, 430, 643, 411, 702, 644, 533, - 600, 601, 583, 675, 676, 677, 678, 435, 482, 665, - 482, 555, 666, 555, 659, 436, 555, 631, 632, 633, - 634, 635, 636, 637, 638, 639, 640, 427, 643, 665, - 661, 697, 707, 317, 318, 319, 481, 641, 589, 590, - 591, 592, 578, 593, 483, 760, 483, 703, 646, 704, - 725, 382, 487, 382, 559, 382, 594, 595, 643, 699, - 643, 726, 671, 672, 569, 673, 674, 696, 679, 680, - 574, 698, 664, 583, 506, 579, 588, 602, 603, 604, - 605, 606, 482, 609, 612, 615, 613, 616, 619, 617, - 755, 620, 624, 621, 626, 730, 656, 627, -36, 628, - 534, 700, 701, -34, 660, 629, 630, -29, 482, 533, - 555, 688, 689, 706, 643, 710, 646, 718, 483, 728, - 731, 732, 733, -558, 743, 750, 744, 382, 749, 509, - 754, 762, 763, 681, 709, 682, 685, 683, 727, 684, - 714, 587, 686, 390, 483, 751, 663, 708, 719, 752, - 758, 720, 759, 382, 734, 647, 729, 417, 648, 649, - 0, 432, 0, 555, 433, 0, 434, 0, 714, 0, - 431, 0, 0, 0, 534, 0, 0, 0, 534, 482, - 748, 0, 585, 533, 0, 742, 0, 533, 0, 0, - 0, 0, 0, 0, 0, 0, 757, 0, 0, 0, - 0, 0, 0, 555, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 483, 0, 716, 0, 0, - 0, 0, 0, 0, 382, 0, 0, 0, 0, 0, - 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 716, 0, 0, 0, 0, - 0, 0, 534, 534, 0, 534, 0, 0, 0, 0, - 0, 533, 533, 0, 533, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 412, 0, 0, 0, - 0, 534, 0, 0, 0, 382, 0, 0, 0, 0, - 533, 0, 534, 0, 0, 0, 0, 0, 0, 534, - 0, 533, 0, 0, 0, 0, 0, 0, 533, 0, - 534, 0, 0, 0, 534, 0, 0, 0, 0, 533, - 534, 0, 0, 533, 0, 0, 0, 416, 0, 533, + 394, 445, 401, 588, 444, 430, 445, 379, 637, 393, + 773, 646, 776, 769, 377, 778, 667, 677, 842, 708, + 494, 530, 687, 709, 446, 668, 535, 421, 437, 446, + 466, 700, 667, 787, 720, 721, 731, 911, 475, 661, + 710, 661, 662, 655, 919, 658, 492, 417, 481, 430, + 328, 329, 330, 422, 911, 493, 481, 659, 669, 670, + 671, 672, 476, 576, 482, 647, 648, 788, 437, 676, + 722, 723, 732, 663, 676, 663, 633, 635, 589, 418, + 676, 644, 645, 676, 437, -35, 590, 649, 481, 407, + 432, 650, 676, 433, 779, 634, 565, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 763, 716, 664, 717, + 746, 735, 748, 657, 664, 589, 664, 764, 589, 664, + 541, 664, 639, 664, 664, 774, 542, 495, 664, 576, + 496, 543, 844, 497, 576, 549, 557, 544, 571, 573, + 576, 550, 558, 576, 572, 574, 853, 652, 854, 637, + 852, 637, 576, 653, 637, 415, 781, 665, 783, 791, + 793, 708, 766, 795, 797, 542, 794, 408, 785, 796, + 798, 576, 409, 693, 456, 458, 460, 462, 464, 465, + 468, 800, 802, 804, 423, 807, 410, 801, 803, 805, + 565, 808, 565, 810, 812, 426, 884, 425, 885, 811, + 813, 926, 766, 437, 766, 890, 891, 892, 893, 894, + 895, 794, 798, 801, 805, 808, 813, 922, 562, 411, + 857, 859, 563, 766, 858, 860, 680, 681, 682, 683, + 887, 708, 445, 769, 412, 444, 828, 829, 830, 831, + 786, 718, 719, 454, 457, 459, 455, 455, 455, 413, + 642, 439, 846, 643, 461, 446, 848, 455, 463, 467, + 414, 455, 455, 565, 675, 724, 725, 455, 863, 677, + 679, 686, 419, 455, 455, 867, 687, 766, 849, 689, + 850, 851, 455, 420, 692, 667, 921, 455, 699, 637, + 817, 455, 713, 714, 715, 821, 822, 823, 576, 576, + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576, 576, 434, 766, 818, 769, 767, 819, + 676, 676, 766, 818, 447, 847, 873, 676, 676, 766, + 896, 449, 565, 676, 469, 676, 824, 825, 474, 826, + 827, 479, 832, 833, 484, 325, 490, 491, 481, 875, + 539, 536, 877, 537, 538, 540, 545, 641, 726, 546, + 547, 548, 551, 559, 552, 666, 553, 554, 555, 637, + 561, 556, 560, 651, 656, 589, 564, 570, 492, 662, + 576, 576, 431, 690, 701, 729, 730, 576, 576, 728, + 438, 393, 877, 576, 733, 576, 727, 736, 394, 393, + 401, 394, 565, 704, 738, 379, 394, 393, 401, 914, + 393, 909, 377, 448, 742, 393, 472, 739, 712, 740, + 743, 744, 747, 749, 923, 637, 431, 486, 750, 751, + 431, 752, -36, 753, -34, 393, 780, 784, -29, 393, + 792, 869, 799, 878, 814, 806, 438, 809, 815, 841, + 880, 856, 766, 888, 897, 393, 899, 889, 900, 910, + -569, 898, 915, 916, 917, 591, 446, 920, 834, 928, + 929, 835, 837, 566, 488, 836, 839, 489, 838, 487, + 711, 416, 393, 878, 616, 816, 881, 874, 918, 924, + 882, 925, 485, 615, 901, 862, 770, 771, 702, 866, + 443, 861, 865, 772, 868, 864, 446, 0, 872, 0, + 0, 870, 0, 0, 0, 871, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 660, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 696, 0, + 0, 0, 0, 0, 0, 703, 0, 566, 0, 566, + 0, 0, 0, 0, 393, 0, 393, 0, 393, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 616, 0, 0, 0, 0, 0, 0, 0, + 0, 615, 394, 0, 0, 0, 0, 0, 0, 0, + 566, 393, 0, 0, 0, 0, 0, 0, 0, 393, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, + 0, 616, 0, 0, 0, 0, 615, 0, 0, 0, + 615, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 696, 0, 696, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 616, 616, 0, 616, 0, 401, 0, 0, + 0, 615, 615, 0, 615, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 616, 0, 0, 0, 0, 0, 0, + 0, 0, 615, 0, 0, 0, 0, 0, 0, 616, + 0, 0, 0, 0, 0, 0, 616, 0, 615, 0, + 0, 0, 0, 0, 0, 615, 616, 0, 0, 0, + 616, 0, 0, 0, 0, 615, 616, 0, 0, 615, + 0, 0, 0, 442, 0, 615, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 325, 0, 0, 0, 0, 0, + 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, + 331, 0, 0, 0, 0, 0, 0, 0, 0, 332, + 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, + 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 1, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 501, 502, 0, 325, 0, 591, 592, + 0, 0, 0, 0, 593, 503, 504, 505, 506, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, + 329, 330, 331, 0, 0, 0, 507, 508, 509, 510, + 511, 332, 333, 334, 335, 336, 337, 338, 594, 595, + 596, 597, 0, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 339, 340, 341, 342, 343, 344, 512, + 513, 514, 515, 516, 517, 518, 519, 345, 608, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, @@ -1704,20 +1900,21 @@ static const yytype_int16 yytable[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 315, 0, 0, 0, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 320, 0, 0, 0, 0, 0, - 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 328, 329, 330, 331, 332, - 333, 0, 0, 0, 0, 0, 0, 0, 0, 334, - 0, 335, 336, 337, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 501, 502, 0, 325, 0, + 591, 768, 0, 0, 0, 0, 593, 503, 504, 505, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 327, 328, 329, 330, 331, 0, 0, 0, 507, 508, + 509, 510, 511, 332, 333, 334, 335, 336, 337, 338, + 594, 595, 596, 597, 0, 598, 599, 600, 601, 602, + 603, 604, 605, 606, 607, 339, 340, 341, 342, 343, + 344, 512, 513, 514, 515, 516, 517, 518, 519, 345, + 608, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -1748,20 +1945,21 @@ static const yytype_int16 yytable[] = 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 0, 0, 444, 445, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 446, 447, 0, - 508, 0, 509, 510, 0, 0, 0, 0, 511, 448, - 449, 450, 451, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 316, 317, 318, 319, 320, 0, 0, 0, - 452, 453, 454, 455, 456, 321, 322, 323, 324, 325, - 326, 327, 512, 513, 514, 515, 0, 516, 517, 518, - 519, 520, 521, 522, 523, 524, 525, 328, 329, 330, - 331, 332, 333, 457, 458, 459, 460, 461, 462, 463, - 464, 334, 526, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 1, 2, 3, 4, 5, 6, + 0, 0, 0, 0, 0, 0, 0, 501, 502, 0, + 325, 0, 591, 0, 0, 0, 0, 0, 593, 503, + 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 327, 328, 329, 330, 331, 0, 0, 0, + 507, 508, 509, 510, 511, 332, 333, 334, 335, 336, + 337, 338, 594, 595, 596, 597, 0, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 339, 340, 341, + 342, 343, 344, 512, 513, 514, 515, 516, 517, 518, + 519, 345, 608, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -1792,20 +1990,21 @@ static const yytype_int16 yytable[] = 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, - 444, 445, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 447, 0, 508, 0, 509, 645, 0, 0, 0, 0, - 511, 448, 449, 450, 451, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 316, 317, 318, 319, 320, 0, - 0, 0, 452, 453, 454, 455, 456, 321, 322, 323, - 324, 325, 326, 327, 512, 513, 514, 515, 0, 516, - 517, 518, 519, 520, 521, 522, 523, 524, 525, 328, - 329, 330, 331, 332, 333, 457, 458, 459, 460, 461, - 462, 463, 464, 334, 526, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 1, 2, 3, 4, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 0, 0, + 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 501, + 502, 0, 325, 0, 484, 0, 0, 0, 0, 0, + 593, 503, 504, 505, 506, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 327, 328, 329, 330, 331, 0, + 0, 0, 507, 508, 509, 510, 511, 332, 333, 334, + 335, 336, 337, 338, 594, 595, 596, 597, 0, 598, + 599, 600, 601, 602, 603, 604, 605, 606, 607, 339, + 340, 341, 342, 343, 344, 512, 513, 514, 515, 516, + 517, 518, 519, 345, 608, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -1837,19 +2036,20 @@ static const yytype_int16 yytable[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 0, 0, 444, 445, 0, 0, 0, 0, 0, 0, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 446, 447, 0, 508, 0, 509, 0, 0, 0, - 0, 0, 511, 448, 449, 450, 451, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 316, 317, 318, 319, - 320, 0, 0, 0, 452, 453, 454, 455, 456, 321, - 322, 323, 324, 325, 326, 327, 512, 513, 514, 515, - 0, 516, 517, 518, 519, 520, 521, 522, 523, 524, - 525, 328, 329, 330, 331, 332, 333, 457, 458, 459, - 460, 461, 462, 463, 464, 334, 526, 335, 336, 337, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 1, 2, + 0, 501, 502, 0, 325, 0, 0, 0, 0, 0, + 0, 0, 593, 503, 504, 505, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, + 331, 0, 0, 0, 507, 508, 509, 510, 511, 332, + 333, 334, 335, 336, 337, 338, 594, 595, 596, 597, + 0, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 339, 340, 341, 342, 343, 344, 512, 513, 514, + 515, 516, 517, 518, 519, 345, 608, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, @@ -1881,19 +2081,20 @@ static const yytype_int16 yytable[] = 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 0, 0, 444, 445, 0, 0, 0, 0, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 501, 502, 0, 325, 0, 0, 0, + 0, 0, 0, 0, 593, 503, 504, 505, 506, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, + 329, 330, 331, 0, 0, 0, 507, 508, 509, 510, + 511, 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 446, 447, 0, 508, 0, 430, 0, - 0, 0, 0, 0, 511, 448, 449, 450, 451, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 316, 317, - 318, 319, 320, 0, 0, 0, 452, 453, 454, 455, - 456, 321, 322, 323, 324, 325, 326, 327, 512, 513, - 514, 515, 0, 516, 517, 518, 519, 520, 521, 522, - 523, 524, 525, 328, 329, 330, 331, 332, 333, 457, - 458, 459, 460, 461, 462, 463, 464, 334, 526, 335, - 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 0, 0, 0, 339, 340, 341, 342, 343, 344, 512, + 513, 514, 515, 516, 517, 518, 519, 345, 0, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, @@ -1925,20 +2126,21 @@ static const yytype_int16 yytable[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 0, 0, 444, 445, 0, 0, + 311, 312, 313, 314, 0, 0, 0, 318, 319, 320, + 321, 322, 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 446, 447, 0, 508, 0, - 0, 0, 0, 0, 0, 0, 511, 448, 449, 450, - 451, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 320, 0, 0, 0, 452, 453, - 454, 455, 456, 321, 322, 323, 324, 325, 326, 327, - 512, 513, 514, 515, 0, 516, 517, 518, 519, 520, - 521, 522, 523, 524, 525, 328, 329, 330, 331, 332, - 333, 457, 458, 459, 460, 461, 462, 463, 464, 334, - 526, 335, 336, 337, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 501, 502, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 503, 504, 505, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 327, 328, 329, 330, 0, 0, 0, 0, 507, 508, + 509, 510, 511, 332, 333, 334, 335, 336, 337, 338, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 339, 340, 341, 342, 343, + 344, 512, 513, 514, 515, 516, 517, 518, 519, 345, + 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -1969,20 +2171,21 @@ static const yytype_int16 yytable[] = 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 0, 0, 444, 445, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 446, 447, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 511, 448, - 449, 450, 451, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 316, 317, 318, 319, 320, 0, 0, 0, - 452, 453, 454, 455, 456, 321, 322, 323, 324, 325, - 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 328, 329, 330, - 331, 332, 333, 457, 458, 459, 460, 461, 462, 463, - 464, 334, 0, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 1, 2, 3, 4, 5, 6, + 325, 0, 0, 0, 0, 0, 0, 0, 326, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 327, 328, 329, 330, 331, 0, 0, 0, + 0, 0, 0, 0, 0, 332, 333, 334, 335, 336, + 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -2014,19 +2217,20 @@ static const yytype_int16 yytable[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, - 444, 445, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 447, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 448, 449, 450, 451, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 316, 317, 318, 319, 0, 0, - 0, 0, 452, 453, 454, 455, 456, 321, 322, 323, - 324, 325, 326, 327, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, - 329, 330, 331, 332, 333, 457, 458, 459, 460, 461, - 462, 463, 464, 334, 0, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 1, 2, 3, 4, + 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 327, 328, 329, 330, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 332, 333, 334, + 335, 336, 337, 338, 594, 0, 0, 597, 0, 598, + 599, 0, 0, 602, 0, 0, 0, 0, 0, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 345, 0, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -2058,19 +2262,20 @@ static const yytype_int16 yytable[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 0, 0, 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 315, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 316, 317, 318, 319, - 320, 0, 0, 0, 0, 0, 0, 0, 0, 321, - 322, 323, 324, 325, 326, 327, 0, 0, 0, 0, + 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, + 0, 0, 0, 0, 0, 0, 0, 0, 436, 332, + 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 328, 329, 330, 331, 332, 333, 0, 0, 0, - 0, 0, 0, 0, 0, 334, 0, 335, 336, 337, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 1, 2, + 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, + 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, @@ -2102,19 +2307,20 @@ static const yytype_int16 yytable[] = 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 0, 0, 0, 0, 0, 0, 0, 0, + 313, 314, 0, 0, 0, 318, 319, 320, 321, 322, + 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 409, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 316, 317, - 318, 319, 0, 0, 0, 0, 0, 0, 0, 0, - 410, 321, 322, 323, 324, 325, 326, 327, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, + 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 328, 329, 330, 331, 332, 333, 0, - 0, 0, 0, 0, 0, 0, 0, 334, 0, 335, - 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 0, 0, 0, 339, 340, 341, 342, 343, 344, 0, + 0, 0, 0, 0, 0, 0, 0, 345, 0, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, @@ -2146,20 +2352,21 @@ static const yytype_int16 yytable[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, + 311, 312, 313, 314, 0, 0, 0, 318, 319, 320, + 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 582, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 707, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, + 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 328, 329, 330, 331, 332, - 333, 0, 0, 0, 0, 0, 0, 0, 0, 334, - 0, 335, 336, 337, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 345, + 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -2190,20 +2397,21 @@ static const yytype_int16 yytable[] = 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, + 309, 310, 311, 312, 313, 314, 0, 0, 0, 318, + 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 667, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 820, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 316, 317, 318, 319, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 321, 322, 323, 324, 325, - 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 328, 329, 330, - 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, - 0, 334, 0, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 1, 2, 3, 4, 5, 6, + 0, 0, 327, 328, 329, 330, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 332, 333, 334, 335, 336, + 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -2235,19 +2443,20 @@ static const yytype_int16 yytable[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, + 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 705, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 316, 317, 318, 319, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 321, 322, 323, - 324, 325, 326, 327, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, - 329, 330, 331, 332, 333, 0, 0, 0, 0, 0, - 0, 0, 0, 334, 0, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 1, 2, 3, 4, + 0, 0, 0, 0, 327, 328, 329, 330, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 332, 333, 334, + 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 345, 0, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -2279,19 +2488,20 @@ static const yytype_int16 yytable[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 0, 0, 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 316, 317, 318, 319, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, - 322, 323, 324, 325, 326, 327, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, + 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 328, 329, 330, 331, 332, 333, 0, 0, 0, - 0, 0, 0, 0, 0, 334, 0, 335, 336, 337, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 2, 3, + 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, + 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -2323,18 +2533,19 @@ static const yytype_int16 yytable[] = 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 0, 0, 444, 445, 0, 0, 0, 0, 0, + 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, + 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 446, 447, 0, 0, 0, 554, 724, 0, - 0, 0, 0, 0, 448, 449, 450, 451, 0, 0, + 0, 0, 501, 502, 0, 0, 0, 636, 775, 0, + 0, 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 452, 453, 454, 455, 456, - 321, 0, 0, 0, 0, 326, 327, 0, 0, 0, + 0, 0, 0, 0, 0, 507, 508, 509, 510, 511, + 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 457, 458, - 459, 460, 461, 462, 463, 464, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 512, 513, + 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 347, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, @@ -2365,18 +2576,19 @@ static const yytype_int16 yytable[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 0, 0, 444, 445, 0, 0, + 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, + 321, 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 446, 447, 0, 0, 492, - 0, 0, 0, 0, 0, 0, 0, 448, 449, 450, - 451, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 452, 453, - 454, 455, 456, 321, 0, 0, 0, 0, 326, 327, + 0, 0, 0, 0, 0, 501, 502, 0, 0, 0, + 636, 886, 0, 0, 0, 0, 0, 503, 504, 505, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 507, 508, + 509, 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 457, 458, 459, 460, 461, 462, 463, 464, 0, + 0, 512, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 347, 2, 3, 4, 5, 6, 7, + 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, @@ -2407,18 +2619,19 @@ static const yytype_int16 yytable[] = 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 0, 0, 444, - 445, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 446, 447, - 0, 0, 0, 554, 0, 0, 0, 0, 0, 0, - 448, 449, 450, 451, 0, 0, 0, 0, 0, 0, + 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, + 0, 0, 0, 321, 0, 0, 0, 0, 0, 499, + 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 501, 502, + 0, 0, 575, 0, 0, 0, 0, 0, 0, 0, + 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 452, 453, 454, 455, 456, 321, 0, 0, 0, - 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, + 0, 507, 508, 509, 510, 511, 332, 0, 0, 0, + 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 457, 458, 459, 460, 461, 462, - 463, 464, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 347, 2, 3, 4, + 0, 0, 0, 0, 512, 513, 514, 515, 516, 517, + 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -2450,17 +2663,18 @@ static const yytype_int16 yytable[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 0, 0, 444, 445, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, + 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 446, 447, 0, 0, 610, 0, 0, 0, 0, - 0, 0, 0, 448, 449, 450, 451, 0, 0, 0, + 0, 501, 502, 0, 0, 0, 636, 0, 0, 0, + 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 452, 453, 454, 455, 456, 321, - 0, 0, 0, 0, 326, 327, 0, 0, 0, 0, + 0, 0, 0, 0, 507, 508, 509, 510, 511, 332, + 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 457, 458, 459, - 460, 461, 462, 463, 464, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 347, + 0, 0, 0, 0, 0, 0, 0, 512, 513, 514, + 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -2492,18 +2706,19 @@ static const yytype_int16 yytable[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 0, 0, 444, 445, 0, 0, 0, + 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, + 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 446, 447, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 622, 448, 449, 450, 451, + 0, 0, 0, 0, 501, 502, 0, 0, 734, 0, + 0, 0, 0, 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 452, 453, 454, - 455, 456, 321, 0, 0, 0, 0, 326, 327, 0, + 0, 0, 0, 0, 0, 0, 0, 507, 508, 509, + 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 457, 458, 459, 460, 461, 462, 463, 464, 0, 0, + 512, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 347, 2, 3, 4, 5, 6, 7, 8, + 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -2534,18 +2749,19 @@ static const yytype_int16 yytable[] = 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 0, 0, 444, 445, + 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, + 0, 0, 321, 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 446, 447, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 448, - 449, 450, 451, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 501, 502, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 745, 503, + 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 452, 453, 454, 455, 456, 321, 0, 0, 0, 0, - 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, + 507, 508, 509, 510, 511, 332, 0, 0, 0, 0, + 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 457, 458, 459, 460, 461, 462, 463, - 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 347, 2, 3, 4, 5, + 0, 0, 0, 512, 513, 514, 515, 516, 517, 518, + 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, @@ -2577,118 +2793,332 @@ static const yytype_int16 yytable[] = 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, - 0, 444, 445, 0, 0, 475, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 493, - 446, 447, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 448, 449, 450, 451, 562, 563, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 452, 453, 454, 455, 456, 321, 0, - 0, 0, 0, 326, 572, 0, 0, 0, 575, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 493, - 0, 0, 0, 0, 0, 0, 457, 458, 459, 460, - 461, 462, 463, 464, 0, 0, 0, 0, 493, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 347, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, + 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 501, 502, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 507, 508, 509, 510, 511, 332, 0, + 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 512, 513, 514, 515, + 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 0, 0, 0, 0, 0, 0, 321, 0, + 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, + 0, 0, 0, 501, 502, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 668, 669, 670, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + 0, 0, 0, 0, 0, 0, 507, 508, 509, 510, + 511, 332, 0, 0, 0, 0, 337, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 512, + 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, + 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, + 0, 321, 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 501, 502, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 503, 504, + 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 507, + 508, 509, 510, 694, 332, 0, 0, 0, 0, 337, + 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 512, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, + 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 493 + 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, + 0, 0, 337, 338 }; static const yytype_int16 yycheck[] = { - 0, 732, 0, 341, 0, 486, 346, 383, 739, 0, - 386, 349, 388, 389, 346, 339, 392, 349, 358, 750, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 558, 339, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 379, 447, 371, 540, 438, 552, 427, - 554, 408, 484, 557, 343, 614, 326, 414, 321, 322, - 693, 341, 339, 346, 341, 319, 320, 340, 404, 349, - 349, 348, 340, 346, 400, 375, 341, 341, 435, 436, - 375, 371, 473, 348, 348, 339, 375, 341, 721, 379, - 371, 345, 362, 419, 357, 358, 375, 387, 379, 387, - 390, 387, 376, 349, 399, 341, 387, 381, 382, 487, - 400, 340, 348, 357, 404, 340, 519, 346, 521, 400, - 340, 346, 343, 404, 618, 340, 346, 343, 506, 419, - 346, 346, 375, 349, 346, 340, 340, 349, 419, 342, - 430, 346, 346, 346, 343, 346, 482, 651, 349, 430, - 323, 324, 584, 596, 597, 598, 599, 375, 484, 346, - 486, 552, 349, 554, 567, 375, 557, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 341, 346, 346, - 571, 349, 349, 364, 365, 366, 349, 348, 354, 355, - 356, 351, 482, 353, 484, 754, 486, 344, 692, 346, - 704, 482, 348, 484, 375, 486, 317, 318, 346, 347, - 346, 347, 592, 593, 340, 594, 595, 620, 600, 601, - 339, 624, 579, 655, 341, 375, 375, 361, 360, 359, - 325, 327, 558, 342, 341, 339, 344, 349, 339, 349, - 744, 339, 339, 349, 347, 344, 375, 349, 339, 349, - 540, 642, 643, 339, 375, 349, 349, 340, 584, 540, - 651, 342, 375, 342, 346, 339, 760, 383, 558, 342, - 375, 340, 339, 343, 340, 340, 348, 558, 349, 343, - 343, 349, 344, 602, 687, 603, 606, 604, 710, 605, - 693, 489, 607, 320, 584, 387, 578, 665, 695, 738, - 750, 695, 751, 584, 721, 550, 712, 387, 550, 550, - -1, 400, -1, 704, 404, -1, 404, -1, 721, -1, - 398, -1, -1, -1, 614, -1, -1, -1, 618, 655, - 733, -1, 710, 614, -1, 726, -1, 618, -1, -1, - -1, -1, -1, -1, -1, -1, 749, -1, -1, -1, - -1, -1, -1, 744, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 655, -1, 693, -1, -1, - -1, -1, -1, -1, 655, -1, -1, -1, -1, -1, - 716, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 721, -1, -1, -1, -1, - -1, -1, 692, 693, -1, 695, -1, -1, -1, -1, - -1, 692, 693, -1, 695, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 716, -1, -1, -1, - -1, 721, -1, -1, -1, 716, -1, -1, -1, -1, - 721, -1, 732, -1, -1, -1, -1, -1, -1, 739, - -1, 732, -1, -1, -1, -1, -1, -1, 739, -1, - 750, -1, -1, -1, 754, -1, -1, -1, -1, 750, - 760, -1, -1, 754, -1, -1, -1, 0, -1, 760, + 0, 401, 0, 481, 401, 382, 406, 0, 493, 0, + 634, 502, 636, 622, 0, 639, 542, 547, 737, 567, + 434, 439, 552, 569, 401, 348, 440, 359, 390, 406, + 413, 561, 558, 348, 331, 332, 336, 899, 385, 348, + 570, 348, 351, 528, 906, 356, 349, 353, 351, 426, + 374, 375, 376, 385, 916, 358, 351, 368, 381, 382, + 383, 384, 409, 481, 359, 329, 330, 382, 430, 547, + 367, 368, 372, 382, 552, 382, 490, 491, 351, 385, + 558, 499, 500, 561, 446, 349, 359, 351, 351, 349, + 356, 355, 570, 359, 640, 358, 473, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 361, 540, 363, + 601, 589, 603, 531, 546, 351, 548, 358, 351, 551, + 350, 553, 358, 555, 556, 358, 356, 353, 560, 547, + 356, 350, 741, 359, 552, 350, 350, 356, 350, 350, + 558, 356, 356, 561, 356, 356, 354, 350, 356, 634, + 774, 636, 570, 356, 639, 351, 350, 540, 649, 350, + 350, 709, 356, 350, 350, 356, 356, 349, 653, 356, + 356, 589, 349, 556, 408, 409, 410, 411, 412, 413, + 414, 350, 350, 350, 359, 350, 349, 356, 356, 356, + 567, 356, 569, 350, 350, 356, 350, 350, 350, 356, + 356, 920, 356, 565, 356, 350, 350, 350, 350, 350, + 350, 356, 356, 356, 356, 356, 356, 350, 352, 349, + 352, 352, 356, 356, 356, 356, 381, 382, 383, 384, + 854, 779, 632, 842, 349, 632, 720, 721, 722, 723, + 658, 327, 328, 382, 382, 382, 385, 385, 385, 349, + 356, 367, 743, 359, 382, 632, 747, 385, 382, 382, + 349, 385, 385, 640, 382, 333, 334, 385, 798, 799, + 382, 382, 349, 385, 385, 805, 806, 356, 357, 382, + 765, 766, 385, 349, 382, 811, 910, 385, 382, 774, + 704, 385, 364, 365, 366, 713, 714, 715, 716, 717, + 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, + 728, 729, 730, 731, 385, 356, 356, 926, 359, 359, + 798, 799, 356, 356, 359, 359, 359, 805, 806, 356, + 357, 385, 709, 811, 385, 813, 716, 717, 353, 718, + 719, 385, 724, 725, 353, 351, 385, 385, 351, 840, + 358, 350, 843, 385, 359, 356, 358, 385, 371, 356, + 356, 356, 356, 350, 356, 385, 356, 356, 356, 854, + 349, 356, 356, 350, 349, 351, 359, 358, 349, 351, + 798, 799, 382, 348, 352, 335, 337, 805, 806, 369, + 390, 382, 883, 811, 352, 813, 370, 354, 398, 390, + 398, 401, 779, 385, 349, 398, 406, 398, 406, 900, + 401, 896, 398, 406, 349, 406, 416, 359, 385, 359, + 349, 359, 349, 357, 915, 910, 426, 425, 359, 359, + 430, 359, 349, 359, 349, 426, 385, 385, 350, 430, + 358, 348, 356, 843, 350, 356, 446, 356, 350, 352, + 393, 352, 356, 348, 354, 446, 350, 382, 349, 358, + 353, 385, 359, 350, 397, 353, 843, 353, 726, 359, + 354, 727, 729, 473, 430, 728, 731, 430, 730, 426, + 572, 331, 473, 883, 484, 703, 845, 818, 905, 916, + 845, 917, 424, 484, 883, 796, 632, 632, 563, 803, + 398, 794, 801, 632, 806, 799, 883, -1, 813, -1, + -1, 809, -1, -1, -1, 811, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 536, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 558, -1, + -1, -1, -1, -1, -1, 565, -1, 567, -1, 569, + -1, -1, -1, -1, 565, -1, 567, -1, 569, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 622, -1, -1, -1, -1, -1, -1, -1, + -1, 622, 632, -1, -1, -1, -1, -1, -1, -1, + 640, 632, -1, -1, -1, -1, -1, -1, -1, 640, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 709, + -1, -1, -1, -1, -1, -1, -1, -1, 709, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 737, -1, -1, + -1, 741, -1, -1, -1, -1, 737, -1, -1, -1, + 741, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 779, + -1, -1, -1, -1, -1, -1, -1, -1, 779, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 811, -1, 813, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 842, 843, -1, 845, -1, 845, -1, -1, + -1, 842, 843, -1, 845, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 883, -1, -1, -1, -1, -1, -1, + -1, -1, 883, -1, -1, -1, -1, -1, -1, 899, + -1, -1, -1, -1, -1, -1, 906, -1, 899, -1, + -1, -1, -1, -1, -1, 906, 916, -1, -1, -1, + 920, -1, -1, -1, -1, 916, 926, -1, -1, 920, + -1, -1, -1, 0, -1, 926, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, + -1, -1, 359, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, + 377, -1, -1, -1, -1, -1, -1, -1, -1, 386, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 408, 409, 410, 411, 412, 413, -1, -1, -1, + -1, -1, -1, -1, -1, 422, -1, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, + 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 348, 349, -1, 351, -1, 353, 354, + -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, + 375, 376, 377, -1, -1, -1, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, -1, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, @@ -2720,20 +3150,21 @@ static const yytype_int16 yycheck[] = 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 349, -1, -1, -1, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 363, 364, 365, 366, 367, -1, -1, -1, -1, -1, - -1, -1, -1, 376, 377, 378, 379, 380, 381, 382, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 398, 399, 400, 401, 402, - 403, -1, -1, -1, -1, -1, -1, -1, -1, 412, - -1, 414, 415, 416, 417, 418, 419, 420, 421, 422, + -1, -1, -1, -1, -1, 348, 349, -1, 351, -1, + 353, 354, -1, -1, -1, -1, 359, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 373, 374, 375, 376, 377, -1, -1, -1, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, -1, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, - 443, 444, 3, 4, 5, 6, 7, 8, 9, 10, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, @@ -2764,20 +3195,21 @@ static const yytype_int16 yycheck[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, -1, -1, 319, 320, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 338, 339, -1, - 341, -1, 343, 344, -1, -1, -1, -1, 349, 350, - 351, 352, 353, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 363, 364, 365, 366, 367, -1, -1, -1, - 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, - 381, 382, 383, 384, 385, 386, -1, 388, 389, 390, - 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, + 351, -1, 353, -1, -1, -1, -1, -1, 359, 360, + 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, -1, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 3, 4, 5, 6, 7, 8, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -2808,20 +3240,21 @@ static const yytype_int16 yycheck[] = 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, - 319, 320, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 338, - 339, -1, 341, -1, 343, 344, -1, -1, -1, -1, - 349, 350, 351, 352, 353, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 363, 364, 365, 366, 367, -1, - -1, -1, 371, 372, 373, 374, 375, 376, 377, 378, - 379, 380, 381, 382, 383, 384, 385, 386, -1, 388, - 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, -1, -1, + 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, + 349, -1, 351, -1, 353, -1, -1, -1, -1, -1, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 373, 374, 375, 376, 377, -1, + -1, -1, 381, 382, 383, 384, 385, 386, 387, 388, + 389, 390, 391, 392, 393, 394, 395, 396, -1, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 3, 4, 5, 6, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, + 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -2853,19 +3286,20 @@ static const yytype_int16 yycheck[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - -1, -1, 319, 320, -1, -1, -1, -1, -1, -1, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 338, 339, -1, 341, -1, 343, -1, -1, -1, - -1, -1, 349, 350, 351, 352, 353, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 363, 364, 365, 366, - 367, -1, -1, -1, 371, 372, 373, 374, 375, 376, - 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, - -1, 388, 389, 390, 391, 392, 393, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + -1, 348, 349, -1, 351, -1, -1, -1, -1, -1, + -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, + 377, -1, -1, -1, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, + -1, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, - 437, 438, 439, 440, 441, 442, 443, 444, 3, 4, + 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -2897,19 +3331,20 @@ static const yytype_int16 yycheck[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, -1, -1, 319, 320, -1, -1, -1, -1, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 338, 339, -1, 341, -1, 343, -1, - -1, -1, -1, -1, 349, 350, 351, 352, 353, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 363, 364, - 365, 366, 367, -1, -1, -1, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, -1, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + -1, -1, -1, 348, 349, -1, 351, -1, -1, -1, + -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, + 375, 376, 377, -1, -1, -1, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, @@ -2941,20 +3376,21 @@ static const yytype_int16 yycheck[] = 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, -1, -1, 319, 320, -1, -1, + 313, 314, 315, 316, -1, -1, -1, 320, 321, 322, + 323, 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 338, 339, -1, 341, -1, - -1, -1, -1, -1, -1, -1, 349, 350, 351, 352, - 353, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 363, 364, 365, 366, 367, -1, -1, -1, 371, 372, - 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, - 383, 384, 385, 386, -1, 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + -1, -1, -1, -1, -1, 348, 349, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 373, 374, 375, 376, -1, -1, -1, -1, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, - 443, 444, 3, 4, 5, 6, 7, 8, 9, 10, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, @@ -2985,20 +3421,21 @@ static const yytype_int16 yycheck[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, -1, -1, 319, 320, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 338, 339, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 349, 350, - 351, 352, 353, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 363, 364, 365, 366, 367, -1, -1, -1, - 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, - 381, 382, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 412, -1, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 351, -1, -1, -1, -1, -1, -1, -1, 359, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, + -1, -1, -1, -1, -1, 386, 387, 388, 389, 390, + 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 408, 409, 410, + 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, + -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 3, 4, 5, 6, 7, 8, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -3030,19 +3467,20 @@ static const yytype_int16 yycheck[] = 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, - 319, 320, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 338, - 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 350, 351, 352, 353, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 363, 364, 365, 366, -1, -1, - -1, -1, 371, 372, 373, 374, 375, 376, 377, 378, - 379, 380, 381, 382, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, 412, -1, 414, 415, 416, 417, 418, - 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 373, 374, 375, 376, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 386, 387, 388, + 389, 390, 391, 392, 393, -1, -1, 396, -1, 398, + 399, -1, -1, 402, -1, -1, -1, -1, -1, 408, + 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, + -1, -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 3, 4, 5, 6, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, + 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -3074,19 +3512,20 @@ static const yytype_int16 yycheck[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 349, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 363, 364, 365, 366, - 367, -1, -1, -1, -1, -1, -1, -1, -1, 376, - 377, 378, 379, 380, 381, 382, -1, -1, -1, -1, + -1, -1, 359, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, + -1, -1, -1, -1, -1, -1, -1, -1, 385, 386, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 398, 399, 400, 401, 402, 403, -1, -1, -1, - -1, -1, -1, -1, -1, 412, -1, 414, 415, 416, - 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + -1, 408, 409, 410, 411, 412, 413, -1, -1, -1, + -1, -1, -1, -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, - 437, 438, 439, 440, 441, 442, 443, 444, 3, 4, + 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -3118,19 +3557,20 @@ static const yytype_int16 yycheck[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, -1, -1, -1, -1, -1, -1, -1, -1, + 315, 316, -1, -1, -1, 320, 321, 322, 323, 324, + 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 349, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 363, 364, - 365, 366, -1, -1, -1, -1, -1, -1, -1, -1, - 375, 376, 377, 378, 379, 380, 381, 382, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, + 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 386, 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 398, 399, 400, 401, 402, 403, -1, - -1, -1, -1, -1, -1, -1, -1, 412, -1, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + -1, -1, -1, 408, 409, 410, 411, 412, 413, -1, + -1, -1, -1, -1, -1, -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, @@ -3162,20 +3602,21 @@ static const yytype_int16 yycheck[] = 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, + 313, 314, 315, 316, -1, -1, -1, 320, 321, 322, + 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 344, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 363, 364, 365, 366, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 376, 377, 378, 379, 380, 381, 382, + 373, 374, 375, 376, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 386, 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 398, 399, 400, 401, 402, - 403, -1, -1, -1, -1, -1, -1, -1, -1, 412, - -1, 414, 415, 416, 417, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + -1, -1, -1, -1, -1, 408, 409, 410, 411, 412, + 413, -1, -1, -1, -1, -1, -1, -1, -1, 422, + -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, - 443, 444, 3, 4, 5, 6, 7, 8, 9, 10, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, @@ -3206,20 +3647,21 @@ static const yytype_int16 yycheck[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, -1, -1, -1, -1, + 311, 312, 313, 314, 315, 316, -1, -1, -1, 320, + 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 344, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 363, 364, 365, 366, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 376, 377, 378, 379, 380, - 381, 382, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 398, 399, 400, - 401, 402, 403, -1, -1, -1, -1, -1, -1, -1, - -1, 412, -1, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + -1, -1, 373, 374, 375, 376, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 386, 387, 388, 389, 390, + 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 408, 409, 410, + 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, + -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 3, 4, 5, 6, 7, 8, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, @@ -3251,19 +3693,20 @@ static const yytype_int16 yycheck[] = 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, + -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 344, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 363, 364, 365, 366, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 376, 377, 378, - 379, 380, 381, 382, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 398, - 399, 400, 401, 402, 403, -1, -1, -1, -1, -1, - -1, -1, -1, 412, -1, 414, 415, 416, 417, 418, - 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + -1, -1, -1, -1, 373, 374, 375, 376, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 386, 387, 388, + 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 408, + 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, + -1, -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 3, 4, 5, 6, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, + 449, 450, 451, 452, 453, 454, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -3295,19 +3738,20 @@ static const yytype_int16 yycheck[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 363, 364, 365, 366, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 376, - 377, 378, 379, 380, 381, 382, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 386, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 398, 399, 400, 401, 402, 403, -1, -1, -1, - -1, -1, -1, -1, -1, 412, -1, 414, 415, 416, - 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + -1, 408, 409, 410, 411, 412, 413, -1, -1, -1, + -1, -1, -1, -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, - 437, 438, 439, 440, 441, 442, 443, 444, 4, 5, + 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, @@ -3339,18 +3783,19 @@ static const yytype_int16 yycheck[] = 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, -1, -1, 319, 320, -1, -1, -1, -1, -1, + 316, -1, -1, -1, -1, -1, -1, 323, -1, -1, + -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 338, 339, -1, -1, -1, 343, 344, -1, - -1, -1, -1, -1, 350, 351, 352, 353, -1, -1, + -1, -1, 348, 349, -1, -1, -1, 353, 354, -1, + -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 371, 372, 373, 374, 375, - 376, -1, -1, -1, -1, 381, 382, -1, -1, -1, + -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, + 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 404, 405, - 406, 407, 408, 409, 410, 411, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, + 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 426, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, @@ -3381,18 +3826,19 @@ static const yytype_int16 yycheck[] = 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, -1, -1, 319, 320, -1, -1, + 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, + 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 338, 339, -1, -1, 342, - -1, -1, -1, -1, -1, -1, -1, 350, 351, 352, - 353, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 371, 372, - 373, 374, 375, 376, -1, -1, -1, -1, 381, 382, + -1, -1, -1, -1, -1, 348, 349, -1, -1, -1, + 353, 354, -1, -1, -1, -1, -1, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, + 383, 384, 385, 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 404, 405, 406, 407, 408, 409, 410, 411, -1, + -1, 414, 415, 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 426, 4, 5, 6, 7, 8, 9, + -1, -1, -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, @@ -3423,18 +3869,19 @@ static const yytype_int16 yycheck[] = 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, -1, -1, 319, - 320, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 338, 339, - -1, -1, -1, 343, -1, -1, -1, -1, -1, -1, - 350, 351, 352, 353, -1, -1, -1, -1, -1, -1, + 310, 311, 312, 313, 314, 315, 316, -1, -1, -1, + -1, -1, -1, 323, -1, -1, -1, -1, -1, 329, + 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 348, 349, + -1, -1, 352, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 371, 372, 373, 374, 375, 376, -1, -1, -1, - -1, 381, 382, -1, -1, -1, -1, -1, -1, -1, + -1, 381, 382, 383, 384, 385, 386, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 404, 405, 406, 407, 408, 409, - 410, 411, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 426, 4, 5, 6, + -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, + 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -3466,17 +3913,18 @@ static const yytype_int16 yycheck[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - -1, -1, 319, 320, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 323, -1, -1, -1, + -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 338, 339, -1, -1, 342, -1, -1, -1, -1, - -1, -1, -1, 350, 351, 352, 353, -1, -1, -1, + -1, 348, 349, -1, -1, -1, 353, -1, -1, -1, + -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 371, 372, 373, 374, 375, 376, - -1, -1, -1, -1, 381, 382, -1, -1, -1, -1, + -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, + -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 404, 405, 406, - 407, 408, 409, 410, 411, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 426, + -1, -1, -1, -1, -1, -1, -1, 414, 415, 416, + 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -3508,18 +3956,19 @@ static const yytype_int16 yycheck[] = 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, -1, -1, 319, 320, -1, -1, -1, + 314, 315, 316, -1, -1, -1, -1, -1, -1, 323, + -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 338, 339, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 349, 350, 351, 352, 353, + -1, -1, -1, -1, 348, 349, -1, -1, 352, -1, + -1, -1, -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 371, 372, 373, - 374, 375, 376, -1, -1, -1, -1, 381, 382, -1, + -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, + 384, 385, 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 404, 405, 406, 407, 408, 409, 410, 411, -1, -1, + 414, 415, 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 426, 4, 5, 6, 7, 8, 9, 10, + -1, -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, @@ -3550,18 +3999,19 @@ static const yytype_int16 yycheck[] = 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, -1, -1, 319, 320, + 311, 312, 313, 314, 315, 316, -1, -1, -1, -1, + -1, -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 338, 339, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 350, - 351, 352, 353, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 359, 360, + 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 371, 372, 373, 374, 375, 376, -1, -1, -1, -1, - 381, 382, -1, -1, -1, -1, -1, -1, -1, -1, + 381, 382, 383, 384, 385, 386, -1, -1, -1, -1, + 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 404, 405, 406, 407, 408, 409, 410, - 411, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 426, 4, 5, 6, 7, + -1, -1, -1, 414, 415, 416, 417, 418, 419, 420, + 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, @@ -3593,37 +4043,144 @@ static const yytype_int16 yycheck[] = 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, - -1, 319, 320, -1, -1, 413, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, - 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 350, 351, 352, 353, 444, 445, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 371, 372, 373, 374, 375, 376, -1, - -1, -1, -1, 381, 382, -1, -1, -1, 476, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 487, - -1, -1, -1, -1, -1, -1, 404, 405, 406, 407, - 408, 409, 410, 411, -1, -1, -1, -1, 506, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 426, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 323, -1, -1, -1, -1, + -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 348, 349, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 381, 382, 383, 384, 385, 386, -1, + -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 436, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, -1, -1, -1, -1, -1, -1, 323, -1, + -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 576, -1, + -1, -1, -1, 348, 349, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 589, 590, 591, 592, 593, 594, 595, 596, 597, - 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, + 385, 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 414, + 415, 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, + -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, -1, -1, -1, -1, -1, + -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 348, 349, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, + 382, 383, 384, 385, 386, -1, -1, -1, -1, 391, + 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 414, 415, 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 436, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, + -1, -1, -1, -1, 323, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 710 + -1, -1, -1, -1, -1, -1, -1, 386, -1, -1, + -1, -1, 391, 392 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -3661,119 +4218,142 @@ static const yytype_int16 yystos[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 349, 363, 364, 365, 366, - 367, 376, 377, 378, 379, 380, 381, 382, 398, 399, - 400, 401, 402, 403, 412, 414, 415, 416, 417, 418, - 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, - 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 476, 477, 480, 481, - 482, 483, 487, 488, 489, 490, 491, 492, 495, 496, - 497, 498, 499, 501, 506, 507, 508, 549, 550, 551, - 507, 343, 375, 339, 339, 349, 375, 349, 552, 340, - 346, 484, 485, 486, 496, 501, 346, 349, 375, 349, - 375, 497, 501, 357, 503, 504, 0, 550, 501, 510, - 343, 375, 399, 493, 494, 375, 500, 341, 349, 502, - 343, 528, 485, 484, 486, 375, 375, 339, 348, 502, - 343, 346, 349, 479, 319, 320, 338, 339, 350, 351, - 352, 353, 371, 372, 373, 374, 375, 404, 405, 406, - 407, 408, 409, 410, 411, 446, 447, 448, 450, 451, - 452, 453, 454, 455, 456, 457, 458, 499, 501, 505, - 502, 349, 496, 501, 511, 512, 509, 348, 340, 346, - 340, 346, 342, 457, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 468, 469, 470, 341, 349, 341, 343, - 344, 349, 383, 384, 385, 386, 388, 389, 390, 391, - 392, 393, 394, 395, 396, 397, 413, 457, 470, 472, - 474, 476, 480, 499, 501, 517, 518, 519, 520, 521, - 529, 530, 531, 532, 535, 536, 539, 540, 541, 548, - 553, 502, 348, 502, 343, 472, 515, 348, 478, 375, - 346, 349, 457, 457, 474, 319, 320, 341, 345, 340, - 340, 346, 382, 472, 339, 457, 346, 358, 501, 375, - 513, 514, 344, 512, 511, 470, 475, 494, 375, 354, - 355, 356, 351, 353, 317, 318, 321, 322, 357, 358, - 323, 324, 361, 360, 359, 325, 327, 326, 362, 342, - 342, 470, 341, 344, 522, 339, 349, 349, 543, 339, - 339, 349, 349, 474, 339, 474, 347, 349, 349, 349, - 349, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 348, 473, 346, 349, 344, 518, 532, 536, 541, - 515, 348, 515, 516, 515, 511, 375, 340, 449, 474, - 375, 472, 457, 513, 502, 346, 349, 344, 457, 457, - 457, 459, 459, 460, 460, 461, 461, 461, 461, 462, - 462, 463, 464, 465, 466, 467, 468, 471, 342, 375, - 554, 555, 529, 542, 518, 544, 474, 349, 474, 347, - 472, 472, 515, 344, 346, 344, 342, 349, 514, 474, - 339, 342, 346, 523, 474, 489, 496, 534, 383, 517, - 530, 545, 340, 340, 344, 515, 347, 475, 342, 555, - 344, 375, 340, 339, 534, 546, 547, 525, 526, 527, - 533, 537, 472, 340, 348, 519, 524, 528, 474, 349, - 340, 387, 521, 519, 343, 515, 340, 474, 524, 525, - 529, 538, 349, 344 + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 351, 359, 373, 374, 375, + 376, 377, 386, 387, 388, 389, 390, 391, 392, 408, + 409, 410, 411, 412, 413, 422, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 486, 487, 490, + 491, 492, 493, 497, 498, 499, 500, 501, 502, 505, + 506, 507, 508, 509, 511, 516, 517, 518, 559, 560, + 561, 563, 570, 574, 575, 580, 583, 349, 349, 349, + 349, 349, 349, 349, 349, 351, 517, 353, 385, 349, + 349, 359, 385, 359, 562, 350, 356, 494, 495, 496, + 506, 511, 356, 359, 385, 359, 385, 507, 511, 367, + 513, 514, 0, 560, 491, 499, 506, 359, 490, 385, + 566, 567, 584, 585, 382, 385, 566, 382, 566, 382, + 566, 382, 566, 382, 566, 566, 584, 382, 566, 385, + 564, 565, 511, 520, 353, 385, 409, 503, 504, 385, + 510, 351, 359, 512, 353, 538, 563, 495, 494, 496, + 385, 385, 349, 358, 512, 353, 356, 359, 489, 329, + 330, 348, 349, 360, 361, 362, 363, 381, 382, 383, + 384, 385, 414, 415, 416, 417, 418, 419, 420, 421, + 456, 457, 458, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 509, 511, 515, 512, 350, 385, 359, 358, + 356, 350, 356, 350, 356, 358, 356, 356, 356, 350, + 356, 356, 356, 356, 356, 356, 356, 350, 356, 350, + 356, 349, 352, 356, 359, 506, 511, 521, 522, 519, + 358, 350, 356, 350, 356, 352, 467, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 351, + 359, 353, 354, 359, 393, 394, 395, 396, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 423, 467, + 480, 482, 484, 486, 490, 509, 511, 527, 528, 529, + 530, 531, 539, 540, 541, 542, 545, 546, 549, 550, + 551, 558, 563, 512, 358, 512, 353, 482, 525, 358, + 488, 385, 356, 359, 467, 467, 484, 329, 330, 351, + 355, 350, 350, 356, 392, 482, 349, 467, 356, 368, + 563, 348, 351, 382, 567, 584, 385, 585, 348, 381, + 382, 383, 384, 571, 572, 382, 480, 485, 573, 382, + 381, 382, 383, 384, 576, 577, 382, 485, 578, 382, + 348, 579, 382, 584, 385, 485, 511, 581, 582, 382, + 485, 352, 565, 511, 385, 523, 524, 354, 522, 521, + 485, 504, 385, 364, 365, 366, 361, 363, 327, 328, + 331, 332, 367, 368, 333, 334, 371, 370, 369, 335, + 337, 336, 372, 352, 352, 480, 354, 532, 349, 359, + 359, 553, 349, 349, 359, 359, 484, 349, 484, 357, + 359, 359, 359, 359, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 358, 483, 356, 359, 354, 528, + 542, 546, 551, 525, 358, 354, 525, 526, 525, 521, + 385, 350, 459, 484, 385, 482, 467, 348, 382, 568, + 569, 350, 358, 350, 356, 350, 356, 350, 356, 356, + 350, 356, 350, 356, 350, 356, 356, 350, 356, 356, + 350, 356, 350, 356, 350, 350, 523, 512, 356, 359, + 354, 467, 467, 467, 469, 469, 470, 470, 471, 471, + 471, 471, 472, 472, 473, 474, 475, 476, 477, 478, + 481, 352, 539, 552, 528, 554, 484, 359, 484, 357, + 482, 482, 525, 354, 356, 354, 352, 352, 356, 352, + 356, 572, 571, 485, 573, 577, 576, 485, 578, 348, + 579, 581, 582, 359, 524, 484, 533, 484, 499, 544, + 393, 527, 540, 555, 350, 350, 354, 525, 348, 382, + 350, 350, 350, 350, 350, 350, 357, 354, 385, 350, + 349, 544, 556, 557, 535, 536, 537, 543, 547, 482, + 358, 529, 534, 538, 484, 359, 350, 397, 531, 529, + 353, 525, 350, 484, 534, 535, 539, 548, 359, 354 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { - 0, 445, 446, 447, 447, 447, 447, 447, 447, 447, - 447, 447, 447, 447, 447, 447, 447, 447, 448, 448, - 448, 448, 448, 448, 449, 450, 451, 452, 452, 453, - 453, 454, 454, 455, 456, 456, 456, 457, 457, 457, - 457, 458, 458, 458, 458, 459, 459, 459, 459, 460, - 460, 460, 461, 461, 461, 462, 462, 462, 462, 462, - 463, 463, 463, 464, 464, 465, 465, 466, 466, 467, - 467, 468, 468, 469, 469, 470, 471, 470, 472, 472, - 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, - 473, 474, 474, 475, 476, 476, 476, 476, 476, 476, - 476, 476, 476, 478, 477, 479, 479, 480, 481, 481, - 482, 482, 483, 484, 484, 485, 485, 485, 485, 486, - 487, 487, 487, 487, 487, 488, 488, 488, 488, 488, - 489, 489, 490, 491, 491, 491, 491, 491, 491, 491, - 491, 492, 493, 493, 494, 494, 494, 495, 496, 496, - 497, 497, 497, 497, 497, 497, 497, 498, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, - 498, 498, 499, 500, 500, 501, 501, 502, 502, 502, - 502, 503, 503, 504, 505, 505, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 507, 507, 507, 509, 508, 510, 508, 511, 511, 512, - 512, 513, 513, 514, 514, 515, 515, 515, 516, 516, - 517, 518, 518, 519, 519, 519, 519, 519, 519, 519, - 519, 520, 521, 522, 523, 521, 524, 524, 526, 525, - 527, 525, 528, 528, 529, 529, 530, 530, 531, 531, - 532, 533, 533, 534, 534, 535, 535, 537, 536, 538, - 538, 539, 539, 540, 540, 542, 541, 543, 541, 544, - 541, 545, 545, 546, 546, 547, 547, 548, 548, 548, - 548, 548, 548, 548, 548, 549, 549, 550, 550, 550, - 552, 551, 553, 554, 554, 555, 555 + 0, 455, 456, 457, 457, 457, 457, 457, 457, 457, + 457, 457, 457, 457, 457, 457, 457, 457, 458, 458, + 458, 458, 458, 458, 459, 460, 461, 462, 462, 463, + 463, 464, 464, 465, 466, 466, 466, 467, 467, 467, + 467, 468, 468, 468, 468, 469, 469, 469, 469, 470, + 470, 470, 471, 471, 471, 472, 472, 472, 472, 472, + 473, 473, 473, 474, 474, 475, 475, 476, 476, 477, + 477, 478, 478, 479, 479, 480, 481, 480, 482, 482, + 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, + 483, 484, 484, 485, 486, 486, 486, 486, 486, 486, + 486, 486, 486, 486, 486, 488, 487, 489, 489, 490, + 490, 490, 490, 491, 491, 492, 492, 493, 494, 494, + 495, 495, 495, 495, 496, 497, 497, 497, 497, 497, + 498, 498, 498, 498, 498, 499, 499, 500, 501, 501, + 501, 501, 501, 501, 501, 501, 502, 503, 503, 504, + 504, 504, 505, 506, 506, 507, 507, 507, 507, 507, + 507, 507, 507, 507, 507, 507, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 509, 510, 510, 511, 511, 512, 512, 512, 512, + 513, 513, 514, 515, 515, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 517, 517, 517, 519, 518, 520, 518, 521, 521, 522, + 522, 523, 523, 524, 524, 525, 525, 525, 525, 526, + 526, 527, 528, 528, 529, 529, 529, 529, 529, 529, + 529, 529, 530, 531, 532, 533, 531, 534, 534, 536, + 535, 537, 535, 538, 538, 539, 539, 540, 540, 541, + 541, 542, 543, 543, 544, 544, 545, 545, 547, 546, + 548, 548, 549, 549, 550, 550, 552, 551, 553, 551, + 554, 551, 555, 555, 556, 556, 557, 557, 558, 558, + 558, 558, 558, 558, 558, 558, 559, 559, 560, 560, + 560, 562, 561, 563, 564, 564, 565, 565, 566, 566, + 567, 567, 568, 568, 569, 569, 570, 570, 570, 570, + 570, 570, 571, 571, 572, 572, 572, 572, 572, 573, + 573, 574, 574, 575, 575, 575, 575, 575, 575, 575, + 575, 576, 576, 577, 577, 577, 577, 578, 578, 579, + 579, 580, 580, 580, 580, 581, 581, 582, 582, 583, + 583, 584, 584, 585, 585 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -3788,18 +4368,19 @@ static const yytype_int8 yyr2[] = 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 0, 6, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 2, 2, 4, 2, 3, 4, - 2, 3, 4, 0, 6, 2, 3, 2, 1, 1, - 2, 3, 3, 2, 3, 2, 1, 2, 1, 1, - 1, 3, 4, 6, 5, 1, 2, 3, 5, 4, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 3, 1, 3, 1, 1, 1, 2, + 1, 1, 3, 1, 2, 3, 2, 2, 4, 2, + 3, 4, 2, 3, 4, 0, 6, 2, 3, 2, + 3, 3, 4, 1, 1, 2, 3, 3, 2, 3, + 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, + 1, 2, 3, 5, 4, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, + 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 1, 3, 2, 3, 2, 3, 3, - 4, 1, 0, 3, 1, 3, 1, 1, 1, 1, + 4, 1, 1, 3, 2, 3, 2, 3, 3, 4, + 1, 0, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -3832,15 +4413,21 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, 0, 5, 1, 2, 3, - 4, 1, 3, 1, 2, 1, 3, 4, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 0, 0, 5, 1, 1, 0, 2, - 0, 2, 2, 3, 1, 2, 1, 2, 1, 2, - 5, 3, 1, 1, 4, 1, 2, 0, 8, 0, - 1, 3, 2, 1, 2, 0, 6, 0, 8, 0, - 7, 1, 1, 1, 0, 2, 3, 2, 2, 2, - 3, 2, 2, 2, 2, 1, 2, 1, 1, 1, - 0, 3, 5, 1, 3, 1, 4 + 4, 1, 3, 1, 2, 1, 3, 4, 2, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 0, 0, 5, 1, 1, 0, + 2, 0, 2, 2, 3, 1, 2, 1, 2, 1, + 2, 5, 3, 1, 1, 4, 1, 2, 0, 8, + 0, 1, 3, 2, 1, 2, 0, 6, 0, 8, + 0, 7, 1, 1, 1, 0, 2, 3, 2, 2, + 2, 3, 2, 2, 2, 2, 1, 2, 1, 1, + 1, 0, 3, 5, 1, 3, 1, 4, 1, 3, + 5, 5, 1, 3, 1, 3, 4, 6, 6, 8, + 6, 8, 1, 3, 1, 1, 1, 1, 1, 1, + 3, 4, 6, 4, 6, 6, 8, 6, 8, 6, + 8, 1, 3, 1, 1, 1, 1, 1, 3, 1, + 3, 6, 8, 4, 6, 1, 3, 1, 1, 4, + 6, 1, 3, 3, 3 }; @@ -4586,260 +5173,260 @@ yyreduce: switch (yyn) { case 2: /* variable_identifier: IDENTIFIER */ -#line 371 "MachineIndependent/glslang.y" +#line 392 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } -#line 4594 "MachineIndependent/glslang_tab.cpp" +#line 5181 "MachineIndependent/glslang_tab.cpp" break; case 3: /* primary_expression: variable_identifier */ -#line 377 "MachineIndependent/glslang.y" +#line 398 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 4602 "MachineIndependent/glslang_tab.cpp" +#line 5189 "MachineIndependent/glslang_tab.cpp" break; case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ -#line 380 "MachineIndependent/glslang.y" +#line 401 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } -#line 4612 "MachineIndependent/glslang_tab.cpp" +#line 5199 "MachineIndependent/glslang_tab.cpp" break; case 5: /* primary_expression: FLOATCONSTANT */ -#line 385 "MachineIndependent/glslang.y" +#line 406 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 4620 "MachineIndependent/glslang_tab.cpp" +#line 5207 "MachineIndependent/glslang_tab.cpp" break; case 6: /* primary_expression: INTCONSTANT */ -#line 388 "MachineIndependent/glslang.y" +#line 409 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 4628 "MachineIndependent/glslang_tab.cpp" +#line 5215 "MachineIndependent/glslang_tab.cpp" break; case 7: /* primary_expression: UINTCONSTANT */ -#line 391 "MachineIndependent/glslang.y" +#line 412 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 4637 "MachineIndependent/glslang_tab.cpp" +#line 5224 "MachineIndependent/glslang_tab.cpp" break; case 8: /* primary_expression: BOOLCONSTANT */ -#line 395 "MachineIndependent/glslang.y" +#line 416 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 4645 "MachineIndependent/glslang_tab.cpp" +#line 5232 "MachineIndependent/glslang_tab.cpp" break; case 9: /* primary_expression: STRING_LITERAL */ -#line 399 "MachineIndependent/glslang.y" +#line 420 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 4653 "MachineIndependent/glslang_tab.cpp" +#line 5240 "MachineIndependent/glslang_tab.cpp" break; case 10: /* primary_expression: INT32CONSTANT */ -#line 402 "MachineIndependent/glslang.y" +#line 423 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 4662 "MachineIndependent/glslang_tab.cpp" +#line 5249 "MachineIndependent/glslang_tab.cpp" break; case 11: /* primary_expression: UINT32CONSTANT */ -#line 406 "MachineIndependent/glslang.y" +#line 427 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 4671 "MachineIndependent/glslang_tab.cpp" +#line 5258 "MachineIndependent/glslang_tab.cpp" break; case 12: /* primary_expression: INT64CONSTANT */ -#line 410 "MachineIndependent/glslang.y" +#line 431 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); } -#line 4680 "MachineIndependent/glslang_tab.cpp" +#line 5267 "MachineIndependent/glslang_tab.cpp" break; case 13: /* primary_expression: UINT64CONSTANT */ -#line 414 "MachineIndependent/glslang.y" +#line 435 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); } -#line 4689 "MachineIndependent/glslang_tab.cpp" +#line 5276 "MachineIndependent/glslang_tab.cpp" break; case 14: /* primary_expression: INT16CONSTANT */ -#line 418 "MachineIndependent/glslang.y" +#line 439 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 4698 "MachineIndependent/glslang_tab.cpp" +#line 5285 "MachineIndependent/glslang_tab.cpp" break; case 15: /* primary_expression: UINT16CONSTANT */ -#line 422 "MachineIndependent/glslang.y" +#line 443 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 4707 "MachineIndependent/glslang_tab.cpp" +#line 5294 "MachineIndependent/glslang_tab.cpp" break; case 16: /* primary_expression: DOUBLECONSTANT */ -#line 426 "MachineIndependent/glslang.y" +#line 447 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); } -#line 4718 "MachineIndependent/glslang_tab.cpp" +#line 5305 "MachineIndependent/glslang_tab.cpp" break; case 17: /* primary_expression: FLOAT16CONSTANT */ -#line 432 "MachineIndependent/glslang.y" +#line 453 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); } -#line 4727 "MachineIndependent/glslang_tab.cpp" +#line 5314 "MachineIndependent/glslang_tab.cpp" break; case 18: /* postfix_expression: primary_expression */ -#line 440 "MachineIndependent/glslang.y" +#line 461 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 4735 "MachineIndependent/glslang_tab.cpp" +#line 5322 "MachineIndependent/glslang_tab.cpp" break; case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */ -#line 443 "MachineIndependent/glslang.y" +#line 464 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } -#line 4743 "MachineIndependent/glslang_tab.cpp" +#line 5330 "MachineIndependent/glslang_tab.cpp" break; case 20: /* postfix_expression: function_call */ -#line 446 "MachineIndependent/glslang.y" +#line 467 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 4751 "MachineIndependent/glslang_tab.cpp" +#line 5338 "MachineIndependent/glslang_tab.cpp" break; case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */ -#line 449 "MachineIndependent/glslang.y" +#line 470 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } -#line 4759 "MachineIndependent/glslang_tab.cpp" +#line 5346 "MachineIndependent/glslang_tab.cpp" break; case 22: /* postfix_expression: postfix_expression INC_OP */ -#line 452 "MachineIndependent/glslang.y" +#line 473 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); } -#line 4769 "MachineIndependent/glslang_tab.cpp" +#line 5356 "MachineIndependent/glslang_tab.cpp" break; case 23: /* postfix_expression: postfix_expression DEC_OP */ -#line 457 "MachineIndependent/glslang.y" +#line 478 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); } -#line 4779 "MachineIndependent/glslang_tab.cpp" +#line 5366 "MachineIndependent/glslang_tab.cpp" break; case 24: /* integer_expression: expression */ -#line 465 "MachineIndependent/glslang.y" +#line 486 "MachineIndependent/glslang.y" { parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 4788 "MachineIndependent/glslang_tab.cpp" +#line 5375 "MachineIndependent/glslang_tab.cpp" break; case 25: /* function_call: function_call_or_method */ -#line 472 "MachineIndependent/glslang.y" +#line 493 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); delete (yyvsp[0].interm).function; } -#line 4797 "MachineIndependent/glslang_tab.cpp" +#line 5384 "MachineIndependent/glslang_tab.cpp" break; case 26: /* function_call_or_method: function_call_generic */ -#line 479 "MachineIndependent/glslang.y" +#line 500 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 4805 "MachineIndependent/glslang_tab.cpp" +#line 5392 "MachineIndependent/glslang_tab.cpp" break; case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ -#line 485 "MachineIndependent/glslang.y" +#line 506 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 4814 "MachineIndependent/glslang_tab.cpp" +#line 5401 "MachineIndependent/glslang_tab.cpp" break; case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ -#line 489 "MachineIndependent/glslang.y" +#line 510 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 4823 "MachineIndependent/glslang_tab.cpp" +#line 5410 "MachineIndependent/glslang_tab.cpp" break; case 29: /* function_call_header_no_parameters: function_call_header VOID */ -#line 496 "MachineIndependent/glslang.y" +#line 517 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 4831 "MachineIndependent/glslang_tab.cpp" +#line 5418 "MachineIndependent/glslang_tab.cpp" break; case 30: /* function_call_header_no_parameters: function_call_header */ -#line 499 "MachineIndependent/glslang.y" +#line 520 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 4839 "MachineIndependent/glslang_tab.cpp" +#line 5426 "MachineIndependent/glslang_tab.cpp" break; case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ -#line 505 "MachineIndependent/glslang.y" +#line 526 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType }; param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); @@ -4847,11 +5434,11 @@ yyreduce: (yyval.interm).function = (yyvsp[-1].interm).function; (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); } -#line 4851 "MachineIndependent/glslang_tab.cpp" +#line 5438 "MachineIndependent/glslang_tab.cpp" break; case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ -#line 512 "MachineIndependent/glslang.y" +#line 533 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType }; param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); @@ -4859,29 +5446,29 @@ yyreduce: (yyval.interm).function = (yyvsp[-2].interm).function; (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); } -#line 4863 "MachineIndependent/glslang_tab.cpp" +#line 5450 "MachineIndependent/glslang_tab.cpp" break; case 33: /* function_call_header: function_identifier LEFT_PAREN */ -#line 522 "MachineIndependent/glslang.y" +#line 543 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 4871 "MachineIndependent/glslang_tab.cpp" +#line 5458 "MachineIndependent/glslang_tab.cpp" break; case 34: /* function_identifier: type_specifier */ -#line 530 "MachineIndependent/glslang.y" +#line 551 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 4881 "MachineIndependent/glslang_tab.cpp" +#line 5468 "MachineIndependent/glslang_tab.cpp" break; case 35: /* function_identifier: postfix_expression */ -#line 535 "MachineIndependent/glslang.y" +#line 556 "MachineIndependent/glslang.y" { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. @@ -4909,50 +5496,50 @@ yyreduce: (yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull); } } -#line 4913 "MachineIndependent/glslang_tab.cpp" +#line 5500 "MachineIndependent/glslang_tab.cpp" break; case 36: /* function_identifier: non_uniform_qualifier */ -#line 563 "MachineIndependent/glslang.y" +#line 584 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 4923 "MachineIndependent/glslang_tab.cpp" +#line 5510 "MachineIndependent/glslang_tab.cpp" break; case 37: /* unary_expression: postfix_expression */ -#line 572 "MachineIndependent/glslang.y" +#line 593 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } -#line 4934 "MachineIndependent/glslang_tab.cpp" +#line 5521 "MachineIndependent/glslang_tab.cpp" break; case 38: /* unary_expression: INC_OP unary_expression */ -#line 578 "MachineIndependent/glslang.y" +#line 599 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); } -#line 4943 "MachineIndependent/glslang_tab.cpp" +#line 5530 "MachineIndependent/glslang_tab.cpp" break; case 39: /* unary_expression: DEC_OP unary_expression */ -#line 582 "MachineIndependent/glslang.y" +#line 603 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); } -#line 4952 "MachineIndependent/glslang_tab.cpp" +#line 5539 "MachineIndependent/glslang_tab.cpp" break; case 40: /* unary_expression: unary_operator unary_expression */ -#line 586 "MachineIndependent/glslang.y" +#line 607 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).op != EOpNull) { char errorOp[2] = {0, 0}; @@ -4969,179 +5556,179 @@ yyreduce: (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } -#line 4973 "MachineIndependent/glslang_tab.cpp" +#line 5560 "MachineIndependent/glslang_tab.cpp" break; case 41: /* unary_operator: PLUS */ -#line 606 "MachineIndependent/glslang.y" +#line 627 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 4979 "MachineIndependent/glslang_tab.cpp" +#line 5566 "MachineIndependent/glslang_tab.cpp" break; case 42: /* unary_operator: DASH */ -#line 607 "MachineIndependent/glslang.y" +#line 628 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } -#line 4985 "MachineIndependent/glslang_tab.cpp" +#line 5572 "MachineIndependent/glslang_tab.cpp" break; case 43: /* unary_operator: BANG */ -#line 608 "MachineIndependent/glslang.y" +#line 629 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } -#line 4991 "MachineIndependent/glslang_tab.cpp" +#line 5578 "MachineIndependent/glslang_tab.cpp" break; case 44: /* unary_operator: TILDE */ -#line 609 "MachineIndependent/glslang.y" +#line 630 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } -#line 4998 "MachineIndependent/glslang_tab.cpp" +#line 5585 "MachineIndependent/glslang_tab.cpp" break; case 45: /* multiplicative_expression: unary_expression */ -#line 615 "MachineIndependent/glslang.y" +#line 636 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5004 "MachineIndependent/glslang_tab.cpp" +#line 5591 "MachineIndependent/glslang_tab.cpp" break; case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ -#line 616 "MachineIndependent/glslang.y" +#line 637 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5014 "MachineIndependent/glslang_tab.cpp" +#line 5601 "MachineIndependent/glslang_tab.cpp" break; case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ -#line 621 "MachineIndependent/glslang.y" +#line 642 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5024 "MachineIndependent/glslang_tab.cpp" +#line 5611 "MachineIndependent/glslang_tab.cpp" break; case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ -#line 626 "MachineIndependent/glslang.y" +#line 647 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5035 "MachineIndependent/glslang_tab.cpp" +#line 5622 "MachineIndependent/glslang_tab.cpp" break; case 49: /* additive_expression: multiplicative_expression */ -#line 635 "MachineIndependent/glslang.y" +#line 656 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5041 "MachineIndependent/glslang_tab.cpp" +#line 5628 "MachineIndependent/glslang_tab.cpp" break; case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */ -#line 636 "MachineIndependent/glslang.y" +#line 657 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5051 "MachineIndependent/glslang_tab.cpp" +#line 5638 "MachineIndependent/glslang_tab.cpp" break; case 51: /* additive_expression: additive_expression DASH multiplicative_expression */ -#line 641 "MachineIndependent/glslang.y" +#line 662 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5061 "MachineIndependent/glslang_tab.cpp" +#line 5648 "MachineIndependent/glslang_tab.cpp" break; case 52: /* shift_expression: additive_expression */ -#line 649 "MachineIndependent/glslang.y" +#line 670 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5067 "MachineIndependent/glslang_tab.cpp" +#line 5654 "MachineIndependent/glslang_tab.cpp" break; case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */ -#line 650 "MachineIndependent/glslang.y" +#line 671 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5078 "MachineIndependent/glslang_tab.cpp" +#line 5665 "MachineIndependent/glslang_tab.cpp" break; case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */ -#line 656 "MachineIndependent/glslang.y" +#line 677 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5089 "MachineIndependent/glslang_tab.cpp" +#line 5676 "MachineIndependent/glslang_tab.cpp" break; case 55: /* relational_expression: shift_expression */ -#line 665 "MachineIndependent/glslang.y" +#line 686 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5095 "MachineIndependent/glslang_tab.cpp" +#line 5682 "MachineIndependent/glslang_tab.cpp" break; case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ -#line 666 "MachineIndependent/glslang.y" +#line 687 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5105 "MachineIndependent/glslang_tab.cpp" +#line 5692 "MachineIndependent/glslang_tab.cpp" break; case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ -#line 671 "MachineIndependent/glslang.y" +#line 692 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5115 "MachineIndependent/glslang_tab.cpp" +#line 5702 "MachineIndependent/glslang_tab.cpp" break; case 58: /* relational_expression: relational_expression LE_OP shift_expression */ -#line 676 "MachineIndependent/glslang.y" +#line 697 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5125 "MachineIndependent/glslang_tab.cpp" +#line 5712 "MachineIndependent/glslang_tab.cpp" break; case 59: /* relational_expression: relational_expression GE_OP shift_expression */ -#line 681 "MachineIndependent/glslang.y" +#line 702 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5135 "MachineIndependent/glslang_tab.cpp" +#line 5722 "MachineIndependent/glslang_tab.cpp" break; case 60: /* equality_expression: relational_expression */ -#line 689 "MachineIndependent/glslang.y" +#line 710 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5141 "MachineIndependent/glslang_tab.cpp" +#line 5728 "MachineIndependent/glslang_tab.cpp" break; case 61: /* equality_expression: equality_expression EQ_OP relational_expression */ -#line 690 "MachineIndependent/glslang.y" +#line 711 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); @@ -5151,11 +5738,11 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5155 "MachineIndependent/glslang_tab.cpp" +#line 5742 "MachineIndependent/glslang_tab.cpp" break; case 62: /* equality_expression: equality_expression NE_OP relational_expression */ -#line 699 "MachineIndependent/glslang.y" +#line 720 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); @@ -5165,124 +5752,124 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5169 "MachineIndependent/glslang_tab.cpp" +#line 5756 "MachineIndependent/glslang_tab.cpp" break; case 63: /* and_expression: equality_expression */ -#line 711 "MachineIndependent/glslang.y" +#line 732 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5175 "MachineIndependent/glslang_tab.cpp" +#line 5762 "MachineIndependent/glslang_tab.cpp" break; case 64: /* and_expression: and_expression AMPERSAND equality_expression */ -#line 712 "MachineIndependent/glslang.y" +#line 733 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5186 "MachineIndependent/glslang_tab.cpp" +#line 5773 "MachineIndependent/glslang_tab.cpp" break; case 65: /* exclusive_or_expression: and_expression */ -#line 721 "MachineIndependent/glslang.y" +#line 742 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5192 "MachineIndependent/glslang_tab.cpp" +#line 5779 "MachineIndependent/glslang_tab.cpp" break; case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ -#line 722 "MachineIndependent/glslang.y" +#line 743 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5203 "MachineIndependent/glslang_tab.cpp" +#line 5790 "MachineIndependent/glslang_tab.cpp" break; case 67: /* inclusive_or_expression: exclusive_or_expression */ -#line 731 "MachineIndependent/glslang.y" +#line 752 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5209 "MachineIndependent/glslang_tab.cpp" +#line 5796 "MachineIndependent/glslang_tab.cpp" break; case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */ -#line 732 "MachineIndependent/glslang.y" +#line 753 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5220 "MachineIndependent/glslang_tab.cpp" +#line 5807 "MachineIndependent/glslang_tab.cpp" break; case 69: /* logical_and_expression: inclusive_or_expression */ -#line 741 "MachineIndependent/glslang.y" +#line 762 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5226 "MachineIndependent/glslang_tab.cpp" +#line 5813 "MachineIndependent/glslang_tab.cpp" break; case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ -#line 742 "MachineIndependent/glslang.y" +#line 763 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5236 "MachineIndependent/glslang_tab.cpp" +#line 5823 "MachineIndependent/glslang_tab.cpp" break; case 71: /* logical_xor_expression: logical_and_expression */ -#line 750 "MachineIndependent/glslang.y" +#line 771 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5242 "MachineIndependent/glslang_tab.cpp" +#line 5829 "MachineIndependent/glslang_tab.cpp" break; case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ -#line 751 "MachineIndependent/glslang.y" +#line 772 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5252 "MachineIndependent/glslang_tab.cpp" +#line 5839 "MachineIndependent/glslang_tab.cpp" break; case 73: /* logical_or_expression: logical_xor_expression */ -#line 759 "MachineIndependent/glslang.y" +#line 780 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5258 "MachineIndependent/glslang_tab.cpp" +#line 5845 "MachineIndependent/glslang_tab.cpp" break; case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ -#line 760 "MachineIndependent/glslang.y" +#line 781 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5268 "MachineIndependent/glslang_tab.cpp" +#line 5855 "MachineIndependent/glslang_tab.cpp" break; case 75: /* conditional_expression: logical_or_expression */ -#line 768 "MachineIndependent/glslang.y" +#line 789 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5274 "MachineIndependent/glslang_tab.cpp" +#line 5861 "MachineIndependent/glslang_tab.cpp" break; case 76: /* $@1: %empty */ -#line 769 "MachineIndependent/glslang.y" +#line 790 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 5282 "MachineIndependent/glslang_tab.cpp" +#line 5869 "MachineIndependent/glslang_tab.cpp" break; case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */ -#line 772 "MachineIndependent/glslang.y" +#line 793 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); @@ -5295,17 +5882,17 @@ yyreduce: (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 5299 "MachineIndependent/glslang_tab.cpp" +#line 5886 "MachineIndependent/glslang_tab.cpp" break; case 78: /* assignment_expression: conditional_expression */ -#line 787 "MachineIndependent/glslang.y" +#line 808 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5305 "MachineIndependent/glslang_tab.cpp" +#line 5892 "MachineIndependent/glslang_tab.cpp" break; case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */ -#line 788 "MachineIndependent/glslang.y" +#line 809 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); @@ -5319,119 +5906,119 @@ yyreduce: (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } } -#line 5323 "MachineIndependent/glslang_tab.cpp" +#line 5910 "MachineIndependent/glslang_tab.cpp" break; case 80: /* assignment_operator: EQUAL */ -#line 804 "MachineIndependent/glslang.y" +#line 825 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAssign; } -#line 5332 "MachineIndependent/glslang_tab.cpp" +#line 5919 "MachineIndependent/glslang_tab.cpp" break; case 81: /* assignment_operator: MUL_ASSIGN */ -#line 808 "MachineIndependent/glslang.y" +#line 829 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpMulAssign; } -#line 5341 "MachineIndependent/glslang_tab.cpp" +#line 5928 "MachineIndependent/glslang_tab.cpp" break; case 82: /* assignment_operator: DIV_ASSIGN */ -#line 812 "MachineIndependent/glslang.y" +#line 833 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpDivAssign; } -#line 5350 "MachineIndependent/glslang_tab.cpp" +#line 5937 "MachineIndependent/glslang_tab.cpp" break; case 83: /* assignment_operator: MOD_ASSIGN */ -#line 816 "MachineIndependent/glslang.y" +#line 837 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpModAssign; } -#line 5360 "MachineIndependent/glslang_tab.cpp" +#line 5947 "MachineIndependent/glslang_tab.cpp" break; case 84: /* assignment_operator: ADD_ASSIGN */ -#line 821 "MachineIndependent/glslang.y" +#line 842 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAddAssign; } -#line 5369 "MachineIndependent/glslang_tab.cpp" +#line 5956 "MachineIndependent/glslang_tab.cpp" break; case 85: /* assignment_operator: SUB_ASSIGN */ -#line 825 "MachineIndependent/glslang.y" +#line 846 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpSubAssign; } -#line 5378 "MachineIndependent/glslang_tab.cpp" +#line 5965 "MachineIndependent/glslang_tab.cpp" break; case 86: /* assignment_operator: LEFT_ASSIGN */ -#line 829 "MachineIndependent/glslang.y" +#line 850 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } -#line 5387 "MachineIndependent/glslang_tab.cpp" +#line 5974 "MachineIndependent/glslang_tab.cpp" break; case 87: /* assignment_operator: RIGHT_ASSIGN */ -#line 833 "MachineIndependent/glslang.y" +#line 854 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } -#line 5396 "MachineIndependent/glslang_tab.cpp" +#line 5983 "MachineIndependent/glslang_tab.cpp" break; case 88: /* assignment_operator: AND_ASSIGN */ -#line 837 "MachineIndependent/glslang.y" +#line 858 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } -#line 5405 "MachineIndependent/glslang_tab.cpp" +#line 5992 "MachineIndependent/glslang_tab.cpp" break; case 89: /* assignment_operator: XOR_ASSIGN */ -#line 841 "MachineIndependent/glslang.y" +#line 862 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } -#line 5414 "MachineIndependent/glslang_tab.cpp" +#line 6001 "MachineIndependent/glslang_tab.cpp" break; case 90: /* assignment_operator: OR_ASSIGN */ -#line 845 "MachineIndependent/glslang.y" +#line 866 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } -#line 5423 "MachineIndependent/glslang_tab.cpp" +#line 6010 "MachineIndependent/glslang_tab.cpp" break; case 91: /* expression: assignment_expression */ -#line 852 "MachineIndependent/glslang.y" +#line 873 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5431 "MachineIndependent/glslang_tab.cpp" +#line 6018 "MachineIndependent/glslang_tab.cpp" break; case 92: /* expression: expression COMMA assignment_expression */ -#line 855 "MachineIndependent/glslang.y" +#line 876 "MachineIndependent/glslang.y" { parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); @@ -5440,40 +6027,62 @@ yyreduce: (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 5444 "MachineIndependent/glslang_tab.cpp" +#line 6031 "MachineIndependent/glslang_tab.cpp" break; case 93: /* constant_expression: conditional_expression */ -#line 866 "MachineIndependent/glslang.y" +#line 887 "MachineIndependent/glslang.y" { parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5453 "MachineIndependent/glslang_tab.cpp" +#line 6040 "MachineIndependent/glslang_tab.cpp" break; case 94: /* declaration: function_prototype SEMICOLON */ -#line 873 "MachineIndependent/glslang.y" +#line 894 "MachineIndependent/glslang.y" { parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 5463 "MachineIndependent/glslang_tab.cpp" +#line 6050 "MachineIndependent/glslang_tab.cpp" + break; + + case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */ +#line 900 "MachineIndependent/glslang.y" + { + parseContext.requireExtensions((yyvsp[-1].interm).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); + (yyvsp[-1].interm).function->setSpirvInstruction(*(yyvsp[-2].interm.spirvInst)); // Attach SPIR-V intruction qualifier + parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); + (yyval.interm.intermNode) = 0; + // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + } +#line 6062 "MachineIndependent/glslang_tab.cpp" + break; + + case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */ +#line 907 "MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[0].lex).loc, "SPIR-V execution mode qualifier"); + parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); + (yyval.interm.intermNode) = 0; + } +#line 6072 "MachineIndependent/glslang_tab.cpp" break; - case 95: /* declaration: init_declarator_list SEMICOLON */ -#line 878 "MachineIndependent/glslang.y" + case 97: /* declaration: init_declarator_list SEMICOLON */ +#line 913 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; } -#line 5473 "MachineIndependent/glslang_tab.cpp" +#line 6082 "MachineIndependent/glslang_tab.cpp" break; - case 96: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ -#line 883 "MachineIndependent/glslang.y" + case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ +#line 918 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope @@ -5481,75 +6090,75 @@ yyreduce: parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } -#line 5485 "MachineIndependent/glslang_tab.cpp" +#line 6094 "MachineIndependent/glslang_tab.cpp" break; - case 97: /* declaration: block_structure SEMICOLON */ -#line 890 "MachineIndependent/glslang.y" + case 99: /* declaration: block_structure SEMICOLON */ +#line 925 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); (yyval.interm.intermNode) = 0; } -#line 5494 "MachineIndependent/glslang_tab.cpp" +#line 6103 "MachineIndependent/glslang_tab.cpp" break; - case 98: /* declaration: block_structure IDENTIFIER SEMICOLON */ -#line 894 "MachineIndependent/glslang.y" + case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */ +#line 929 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 5503 "MachineIndependent/glslang_tab.cpp" +#line 6112 "MachineIndependent/glslang_tab.cpp" break; - case 99: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ -#line 898 "MachineIndependent/glslang.y" + case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ +#line 933 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); (yyval.interm.intermNode) = 0; } -#line 5512 "MachineIndependent/glslang_tab.cpp" +#line 6121 "MachineIndependent/glslang_tab.cpp" break; - case 100: /* declaration: type_qualifier SEMICOLON */ -#line 902 "MachineIndependent/glslang.y" + case 102: /* declaration: type_qualifier SEMICOLON */ +#line 937 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); (yyval.interm.intermNode) = 0; } -#line 5522 "MachineIndependent/glslang_tab.cpp" +#line 6131 "MachineIndependent/glslang_tab.cpp" break; - case 101: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ -#line 907 "MachineIndependent/glslang.y" + case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ +#line 942 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 5532 "MachineIndependent/glslang_tab.cpp" +#line 6141 "MachineIndependent/glslang_tab.cpp" break; - case 102: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ -#line 912 "MachineIndependent/glslang.y" + case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ +#line 947 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); (yyval.interm.intermNode) = 0; } -#line 5543 "MachineIndependent/glslang_tab.cpp" +#line 6152 "MachineIndependent/glslang_tab.cpp" break; - case 103: /* $@2: %empty */ -#line 921 "MachineIndependent/glslang.y" + case 105: /* $@2: %empty */ +#line 956 "MachineIndependent/glslang.y" { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 5549 "MachineIndependent/glslang_tab.cpp" +#line 6158 "MachineIndependent/glslang_tab.cpp" break; - case 104: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ -#line 921 "MachineIndependent/glslang.y" + case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ +#line 956 "MachineIndependent/glslang.y" { --parseContext.blockNestingLevel; parseContext.blockName = (yyvsp[-4].lex).string; @@ -5559,54 +6168,88 @@ yyreduce: (yyval.interm).loc = (yyvsp[-5].interm.type).loc; (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } -#line 5563 "MachineIndependent/glslang_tab.cpp" +#line 6172 "MachineIndependent/glslang_tab.cpp" break; - case 105: /* identifier_list: COMMA IDENTIFIER */ -#line 932 "MachineIndependent/glslang.y" + case 107: /* identifier_list: COMMA IDENTIFIER */ +#line 967 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = new TIdentifierList; (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 5572 "MachineIndependent/glslang_tab.cpp" +#line 6181 "MachineIndependent/glslang_tab.cpp" break; - case 106: /* identifier_list: identifier_list COMMA IDENTIFIER */ -#line 936 "MachineIndependent/glslang.y" + case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */ +#line 971 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 5581 "MachineIndependent/glslang_tab.cpp" +#line 6190 "MachineIndependent/glslang_tab.cpp" break; - case 107: /* function_prototype: function_declarator RIGHT_PAREN */ -#line 943 "MachineIndependent/glslang.y" + case 109: /* function_prototype: function_declarator RIGHT_PAREN */ +#line 978 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5590 "MachineIndependent/glslang_tab.cpp" +#line 6199 "MachineIndependent/glslang_tab.cpp" + break; + + case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */ +#line 982 "MachineIndependent/glslang.y" + { + (yyval.interm).function = (yyvsp[-2].interm.function); + (yyval.interm).loc = (yyvsp[-1].lex).loc; + parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); + parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes), (yyval.interm).function); + } +#line 6210 "MachineIndependent/glslang_tab.cpp" + break; + + case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */ +#line 988 "MachineIndependent/glslang.y" + { + (yyval.interm).function = (yyvsp[-1].interm.function); + (yyval.interm).loc = (yyvsp[0].lex).loc; + parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); + parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes), (yyval.interm).function); + } +#line 6221 "MachineIndependent/glslang_tab.cpp" + break; + + case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */ +#line 994 "MachineIndependent/glslang.y" + { + (yyval.interm).function = (yyvsp[-2].interm.function); + (yyval.interm).loc = (yyvsp[-1].lex).loc; + parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); + parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes), (yyval.interm).function); + parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes), (yyval.interm).function); + } +#line 6233 "MachineIndependent/glslang_tab.cpp" break; - case 108: /* function_declarator: function_header */ -#line 950 "MachineIndependent/glslang.y" + case 113: /* function_declarator: function_header */ +#line 1004 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 5598 "MachineIndependent/glslang_tab.cpp" +#line 6241 "MachineIndependent/glslang_tab.cpp" break; - case 109: /* function_declarator: function_header_with_parameters */ -#line 953 "MachineIndependent/glslang.y" + case 114: /* function_declarator: function_header_with_parameters */ +#line 1007 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 5606 "MachineIndependent/glslang_tab.cpp" +#line 6249 "MachineIndependent/glslang_tab.cpp" break; - case 110: /* function_header_with_parameters: function_header parameter_declaration */ -#line 960 "MachineIndependent/glslang.y" + case 115: /* function_header_with_parameters: function_header parameter_declaration */ +#line 1014 "MachineIndependent/glslang.y" { // Add the parameter (yyval.interm.function) = (yyvsp[-1].interm.function); @@ -5615,11 +6258,11 @@ yyreduce: else delete (yyvsp[0].interm).param.type; } -#line 5619 "MachineIndependent/glslang_tab.cpp" +#line 6262 "MachineIndependent/glslang_tab.cpp" break; - case 111: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ -#line 968 "MachineIndependent/glslang.y" + case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ +#line 1022 "MachineIndependent/glslang.y" { // // Only first parameter of one-parameter functions can be void @@ -5637,11 +6280,11 @@ yyreduce: (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); } } -#line 5641 "MachineIndependent/glslang_tab.cpp" +#line 6284 "MachineIndependent/glslang_tab.cpp" break; - case 112: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ -#line 988 "MachineIndependent/glslang.y" + case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ +#line 1042 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", @@ -5661,11 +6304,11 @@ yyreduce: function = new TFunction((yyvsp[-1].lex).string, type); (yyval.interm.function) = function; } -#line 5665 "MachineIndependent/glslang_tab.cpp" +#line 6308 "MachineIndependent/glslang_tab.cpp" break; - case 113: /* parameter_declarator: type_specifier IDENTIFIER */ -#line 1011 "MachineIndependent/glslang.y" + case 118: /* parameter_declarator: type_specifier IDENTIFIER */ +#line 1065 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -5681,11 +6324,11 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).param = param; } -#line 5685 "MachineIndependent/glslang_tab.cpp" +#line 6328 "MachineIndependent/glslang_tab.cpp" break; - case 114: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ -#line 1026 "MachineIndependent/glslang.y" + case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ +#line 1080 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -5705,11 +6348,11 @@ yyreduce: (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).param = param; } -#line 5709 "MachineIndependent/glslang_tab.cpp" +#line 6352 "MachineIndependent/glslang_tab.cpp" break; - case 115: /* parameter_declaration: type_qualifier parameter_declarator */ -#line 1051 "MachineIndependent/glslang.y" + case 120: /* parameter_declaration: type_qualifier parameter_declarator */ +#line 1105 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) @@ -5721,11 +6364,11 @@ yyreduce: parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 5725 "MachineIndependent/glslang_tab.cpp" +#line 6368 "MachineIndependent/glslang_tab.cpp" break; - case 116: /* parameter_declaration: parameter_declarator */ -#line 1062 "MachineIndependent/glslang.y" + case 121: /* parameter_declaration: parameter_declarator */ +#line 1116 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); @@ -5733,11 +6376,11 @@ yyreduce: parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 5737 "MachineIndependent/glslang_tab.cpp" +#line 6380 "MachineIndependent/glslang_tab.cpp" break; - case 117: /* parameter_declaration: type_qualifier parameter_type_specifier */ -#line 1072 "MachineIndependent/glslang.y" + case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */ +#line 1126 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) @@ -5748,11 +6391,11 @@ yyreduce: parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 5752 "MachineIndependent/glslang_tab.cpp" +#line 6395 "MachineIndependent/glslang_tab.cpp" break; - case 118: /* parameter_declaration: parameter_type_specifier */ -#line 1082 "MachineIndependent/glslang.y" + case 123: /* parameter_declaration: parameter_type_specifier */ +#line 1136 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); @@ -5760,68 +6403,68 @@ yyreduce: parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 5764 "MachineIndependent/glslang_tab.cpp" +#line 6407 "MachineIndependent/glslang_tab.cpp" break; - case 119: /* parameter_type_specifier: type_specifier */ -#line 1092 "MachineIndependent/glslang.y" + case 124: /* parameter_type_specifier: type_specifier */ +#line 1146 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; (yyval.interm).param = param; if ((yyvsp[0].interm.type).arraySizes) parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } -#line 5775 "MachineIndependent/glslang_tab.cpp" +#line 6418 "MachineIndependent/glslang_tab.cpp" break; - case 120: /* init_declarator_list: single_declaration */ -#line 1101 "MachineIndependent/glslang.y" + case 125: /* init_declarator_list: single_declaration */ +#line 1155 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5783 "MachineIndependent/glslang_tab.cpp" +#line 6426 "MachineIndependent/glslang_tab.cpp" break; - case 121: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ -#line 1104 "MachineIndependent/glslang.y" + case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ +#line 1158 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } -#line 5792 "MachineIndependent/glslang_tab.cpp" +#line 6435 "MachineIndependent/glslang_tab.cpp" break; - case 122: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ -#line 1108 "MachineIndependent/glslang.y" + case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ +#line 1162 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } -#line 5801 "MachineIndependent/glslang_tab.cpp" +#line 6444 "MachineIndependent/glslang_tab.cpp" break; - case 123: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ -#line 1112 "MachineIndependent/glslang.y" + case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ +#line 1166 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-5].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 5811 "MachineIndependent/glslang_tab.cpp" +#line 6454 "MachineIndependent/glslang_tab.cpp" break; - case 124: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ -#line 1117 "MachineIndependent/glslang.y" + case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ +#line 1171 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 5821 "MachineIndependent/glslang_tab.cpp" +#line 6464 "MachineIndependent/glslang_tab.cpp" break; - case 125: /* single_declaration: fully_specified_type */ -#line 1125 "MachineIndependent/glslang.y" + case 130: /* single_declaration: fully_specified_type */ +#line 1179 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[0].interm.type); (yyval.interm).intermNode = 0; @@ -5829,51 +6472,51 @@ yyreduce: parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } -#line 5833 "MachineIndependent/glslang_tab.cpp" +#line 6476 "MachineIndependent/glslang_tab.cpp" break; - case 126: /* single_declaration: fully_specified_type IDENTIFIER */ -#line 1132 "MachineIndependent/glslang.y" + case 131: /* single_declaration: fully_specified_type IDENTIFIER */ +#line 1186 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-1].interm.type); (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } -#line 5843 "MachineIndependent/glslang_tab.cpp" +#line 6486 "MachineIndependent/glslang_tab.cpp" break; - case 127: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ -#line 1137 "MachineIndependent/glslang.y" + case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ +#line 1191 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-2].interm.type); (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } -#line 5853 "MachineIndependent/glslang_tab.cpp" +#line 6496 "MachineIndependent/glslang_tab.cpp" break; - case 128: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ -#line 1142 "MachineIndependent/glslang.y" + case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ +#line 1196 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 5863 "MachineIndependent/glslang_tab.cpp" +#line 6506 "MachineIndependent/glslang_tab.cpp" break; - case 129: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 1147 "MachineIndependent/glslang.y" + case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ +#line 1201 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-3].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 5873 "MachineIndependent/glslang_tab.cpp" +#line 6516 "MachineIndependent/glslang_tab.cpp" break; - case 130: /* fully_specified_type: type_specifier */ -#line 1156 "MachineIndependent/glslang.y" + case 135: /* fully_specified_type: type_specifier */ +#line 1210 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); @@ -5884,11 +6527,11 @@ yyreduce: } parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); } -#line 5888 "MachineIndependent/glslang_tab.cpp" +#line 6531 "MachineIndependent/glslang_tab.cpp" break; - case 131: /* fully_specified_type: type_qualifier type_specifier */ -#line 1166 "MachineIndependent/glslang.y" + case 136: /* fully_specified_type: type_qualifier type_specifier */ +#line 1220 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); @@ -5913,22 +6556,22 @@ yyreduce: (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } -#line 5917 "MachineIndependent/glslang_tab.cpp" +#line 6560 "MachineIndependent/glslang_tab.cpp" break; - case 132: /* invariant_qualifier: INVARIANT */ -#line 1193 "MachineIndependent/glslang.y" + case 137: /* invariant_qualifier: INVARIANT */ +#line 1247 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.invariant = true; } -#line 5928 "MachineIndependent/glslang_tab.cpp" +#line 6571 "MachineIndependent/glslang_tab.cpp" break; - case 133: /* interpolation_qualifier: SMOOTH */ -#line 1202 "MachineIndependent/glslang.y" + case 138: /* interpolation_qualifier: SMOOTH */ +#line 1256 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); @@ -5936,11 +6579,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.smooth = true; } -#line 5940 "MachineIndependent/glslang_tab.cpp" +#line 6583 "MachineIndependent/glslang_tab.cpp" break; - case 134: /* interpolation_qualifier: FLAT */ -#line 1209 "MachineIndependent/glslang.y" + case 139: /* interpolation_qualifier: FLAT */ +#line 1263 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); @@ -5948,11 +6591,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.flat = true; } -#line 5952 "MachineIndependent/glslang_tab.cpp" +#line 6595 "MachineIndependent/glslang_tab.cpp" break; - case 135: /* interpolation_qualifier: NOPERSPECTIVE */ -#line 1217 "MachineIndependent/glslang.y" + case 140: /* interpolation_qualifier: NOPERSPECTIVE */ +#line 1271 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); @@ -5960,11 +6603,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nopersp = true; } -#line 5964 "MachineIndependent/glslang_tab.cpp" +#line 6607 "MachineIndependent/glslang_tab.cpp" break; - case 136: /* interpolation_qualifier: EXPLICITINTERPAMD */ -#line 1224 "MachineIndependent/glslang.y" + case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */ +#line 1278 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); @@ -5972,11 +6615,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.explicitInterp = true; } -#line 5976 "MachineIndependent/glslang_tab.cpp" +#line 6619 "MachineIndependent/glslang_tab.cpp" break; - case 137: /* interpolation_qualifier: PERVERTEXNV */ -#line 1231 "MachineIndependent/glslang.y" + case 142: /* interpolation_qualifier: PERVERTEXNV */ +#line 1285 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); @@ -5985,11 +6628,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexNV = true; } -#line 5989 "MachineIndependent/glslang_tab.cpp" +#line 6632 "MachineIndependent/glslang_tab.cpp" break; - case 138: /* interpolation_qualifier: PERPRIMITIVENV */ -#line 1239 "MachineIndependent/glslang.y" + case 143: /* interpolation_qualifier: PERPRIMITIVENV */ +#line 1293 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV"); @@ -6000,11 +6643,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6004 "MachineIndependent/glslang_tab.cpp" +#line 6647 "MachineIndependent/glslang_tab.cpp" break; - case 139: /* interpolation_qualifier: PERVIEWNV */ -#line 1249 "MachineIndependent/glslang.y" + case 144: /* interpolation_qualifier: PERVIEWNV */ +#line 1303 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV"); @@ -6012,11 +6655,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perViewNV = true; } -#line 6016 "MachineIndependent/glslang_tab.cpp" +#line 6659 "MachineIndependent/glslang_tab.cpp" break; - case 140: /* interpolation_qualifier: PERTASKNV */ -#line 1256 "MachineIndependent/glslang.y" + case 145: /* interpolation_qualifier: PERTASKNV */ +#line 1310 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV"); @@ -6024,84 +6667,84 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perTaskNV = true; } -#line 6028 "MachineIndependent/glslang_tab.cpp" +#line 6671 "MachineIndependent/glslang_tab.cpp" break; - case 141: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ -#line 1267 "MachineIndependent/glslang.y" + case 146: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ +#line 1321 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); } -#line 6036 "MachineIndependent/glslang_tab.cpp" +#line 6679 "MachineIndependent/glslang_tab.cpp" break; - case 142: /* layout_qualifier_id_list: layout_qualifier_id */ -#line 1273 "MachineIndependent/glslang.y" + case 147: /* layout_qualifier_id_list: layout_qualifier_id */ +#line 1327 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6044 "MachineIndependent/glslang_tab.cpp" +#line 6687 "MachineIndependent/glslang_tab.cpp" break; - case 143: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ -#line 1276 "MachineIndependent/glslang.y" + case 148: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ +#line 1330 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } -#line 6054 "MachineIndependent/glslang_tab.cpp" +#line 6697 "MachineIndependent/glslang_tab.cpp" break; - case 144: /* layout_qualifier_id: IDENTIFIER */ -#line 1283 "MachineIndependent/glslang.y" + case 149: /* layout_qualifier_id: IDENTIFIER */ +#line 1337 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); } -#line 6063 "MachineIndependent/glslang_tab.cpp" +#line 6706 "MachineIndependent/glslang_tab.cpp" break; - case 145: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ -#line 1287 "MachineIndependent/glslang.y" + case 150: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ +#line 1341 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-2].lex).loc); parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); } -#line 6072 "MachineIndependent/glslang_tab.cpp" +#line 6715 "MachineIndependent/glslang_tab.cpp" break; - case 146: /* layout_qualifier_id: SHARED */ -#line 1291 "MachineIndependent/glslang.y" + case 151: /* layout_qualifier_id: SHARED */ +#line 1345 "MachineIndependent/glslang.y" { // because "shared" is both an identifier and a keyword (yyval.interm.type).init((yyvsp[0].lex).loc); TString strShared("shared"); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); } -#line 6082 "MachineIndependent/glslang_tab.cpp" +#line 6725 "MachineIndependent/glslang_tab.cpp" break; - case 147: /* precise_qualifier: PRECISE */ -#line 1300 "MachineIndependent/glslang.y" + case 152: /* precise_qualifier: PRECISE */ +#line 1354 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.noContraction = true; } -#line 6093 "MachineIndependent/glslang_tab.cpp" +#line 6736 "MachineIndependent/glslang_tab.cpp" break; - case 148: /* type_qualifier: single_type_qualifier */ -#line 1310 "MachineIndependent/glslang.y" + case 153: /* type_qualifier: single_type_qualifier */ +#line 1364 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6101 "MachineIndependent/glslang_tab.cpp" +#line 6744 "MachineIndependent/glslang_tab.cpp" break; - case 149: /* type_qualifier: type_qualifier single_type_qualifier */ -#line 1313 "MachineIndependent/glslang.y" + case 154: /* type_qualifier: type_qualifier single_type_qualifier */ +#line 1367 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); if ((yyval.interm.type).basicType == EbtVoid) @@ -6110,112 +6753,151 @@ yyreduce: (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } -#line 6114 "MachineIndependent/glslang_tab.cpp" +#line 6757 "MachineIndependent/glslang_tab.cpp" break; - case 150: /* single_type_qualifier: storage_qualifier */ -#line 1324 "MachineIndependent/glslang.y" + case 155: /* single_type_qualifier: storage_qualifier */ +#line 1378 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6122 "MachineIndependent/glslang_tab.cpp" +#line 6765 "MachineIndependent/glslang_tab.cpp" break; - case 151: /* single_type_qualifier: layout_qualifier */ -#line 1327 "MachineIndependent/glslang.y" + case 156: /* single_type_qualifier: layout_qualifier */ +#line 1381 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6130 "MachineIndependent/glslang_tab.cpp" +#line 6773 "MachineIndependent/glslang_tab.cpp" break; - case 152: /* single_type_qualifier: precision_qualifier */ -#line 1330 "MachineIndependent/glslang.y" + case 157: /* single_type_qualifier: precision_qualifier */ +#line 1384 "MachineIndependent/glslang.y" { parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6139 "MachineIndependent/glslang_tab.cpp" +#line 6782 "MachineIndependent/glslang_tab.cpp" break; - case 153: /* single_type_qualifier: interpolation_qualifier */ -#line 1334 "MachineIndependent/glslang.y" + case 158: /* single_type_qualifier: interpolation_qualifier */ +#line 1388 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6148 "MachineIndependent/glslang_tab.cpp" +#line 6791 "MachineIndependent/glslang_tab.cpp" break; - case 154: /* single_type_qualifier: invariant_qualifier */ -#line 1338 "MachineIndependent/glslang.y" + case 159: /* single_type_qualifier: invariant_qualifier */ +#line 1392 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6157 "MachineIndependent/glslang_tab.cpp" +#line 6800 "MachineIndependent/glslang_tab.cpp" break; - case 155: /* single_type_qualifier: precise_qualifier */ -#line 1343 "MachineIndependent/glslang.y" + case 160: /* single_type_qualifier: precise_qualifier */ +#line 1397 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6166 "MachineIndependent/glslang_tab.cpp" +#line 6809 "MachineIndependent/glslang_tab.cpp" break; - case 156: /* single_type_qualifier: non_uniform_qualifier */ -#line 1347 "MachineIndependent/glslang.y" + case 161: /* single_type_qualifier: non_uniform_qualifier */ +#line 1401 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6174 "MachineIndependent/glslang_tab.cpp" +#line 6817 "MachineIndependent/glslang_tab.cpp" break; - case 157: /* storage_qualifier: CONST */ -#line 1354 "MachineIndependent/glslang.y" + case 162: /* single_type_qualifier: spirv_storage_class_qualifier */ +#line 1404 "MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[0].interm.type).loc, "spirv_storage_class"); + parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); + (yyval.interm.type) = (yyvsp[0].interm.type); + } +#line 6827 "MachineIndependent/glslang_tab.cpp" + break; + + case 163: /* single_type_qualifier: spirv_decorate_qualifier */ +#line 1409 "MachineIndependent/glslang.y" + { + parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); + (yyval.interm.type) = (yyvsp[0].interm.type); + } +#line 6836 "MachineIndependent/glslang_tab.cpp" + break; + + case 164: /* single_type_qualifier: SPIRV_BY_REFERENCE */ +#line 1413 "MachineIndependent/glslang.y" + { + parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.setSpirvByReference(); + } +#line 6846 "MachineIndependent/glslang_tab.cpp" + break; + + case 165: /* single_type_qualifier: SPIRV_LITERAL */ +#line 1418 "MachineIndependent/glslang.y" + { + parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.setSpirvLiteral(); + } +#line 6856 "MachineIndependent/glslang_tab.cpp" + break; + + case 166: /* storage_qualifier: CONST */ +#line 1427 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant } -#line 6183 "MachineIndependent/glslang_tab.cpp" +#line 6865 "MachineIndependent/glslang_tab.cpp" break; - case 158: /* storage_qualifier: INOUT */ -#line 1358 "MachineIndependent/glslang.y" + case 167: /* storage_qualifier: INOUT */ +#line 1431 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqInOut; } -#line 6193 "MachineIndependent/glslang_tab.cpp" +#line 6875 "MachineIndependent/glslang_tab.cpp" break; - case 159: /* storage_qualifier: IN */ -#line 1363 "MachineIndependent/glslang.y" + case 168: /* storage_qualifier: IN */ +#line 1436 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "in"); (yyval.interm.type).init((yyvsp[0].lex).loc); // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqIn; } -#line 6204 "MachineIndependent/glslang_tab.cpp" +#line 6886 "MachineIndependent/glslang_tab.cpp" break; - case 160: /* storage_qualifier: OUT */ -#line 1369 "MachineIndependent/glslang.y" + case 169: /* storage_qualifier: OUT */ +#line 1442 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "out"); (yyval.interm.type).init((yyvsp[0].lex).loc); // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqOut; } -#line 6215 "MachineIndependent/glslang_tab.cpp" +#line 6897 "MachineIndependent/glslang_tab.cpp" break; - case 161: /* storage_qualifier: CENTROID */ -#line 1375 "MachineIndependent/glslang.y" + case 170: /* storage_qualifier: CENTROID */ +#line 1448 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); @@ -6223,21 +6905,21 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.centroid = true; } -#line 6227 "MachineIndependent/glslang_tab.cpp" +#line 6909 "MachineIndependent/glslang_tab.cpp" break; - case 162: /* storage_qualifier: UNIFORM */ -#line 1382 "MachineIndependent/glslang.y" + case 171: /* storage_qualifier: UNIFORM */ +#line 1455 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; } -#line 6237 "MachineIndependent/glslang_tab.cpp" +#line 6919 "MachineIndependent/glslang_tab.cpp" break; - case 163: /* storage_qualifier: SHARED */ -#line 1387 "MachineIndependent/glslang.y" + case 172: /* storage_qualifier: SHARED */ +#line 1460 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); @@ -6246,21 +6928,21 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } -#line 6250 "MachineIndependent/glslang_tab.cpp" +#line 6932 "MachineIndependent/glslang_tab.cpp" break; - case 164: /* storage_qualifier: BUFFER */ -#line 1395 "MachineIndependent/glslang.y" + case 173: /* storage_qualifier: BUFFER */ +#line 1468 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqBuffer; } -#line 6260 "MachineIndependent/glslang_tab.cpp" +#line 6942 "MachineIndependent/glslang_tab.cpp" break; - case 165: /* storage_qualifier: ATTRIBUTE */ -#line 1401 "MachineIndependent/glslang.y" + case 174: /* storage_qualifier: ATTRIBUTE */ +#line 1474 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); @@ -6273,11 +6955,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 6277 "MachineIndependent/glslang_tab.cpp" +#line 6959 "MachineIndependent/glslang_tab.cpp" break; - case 166: /* storage_qualifier: VARYING */ -#line 1413 "MachineIndependent/glslang.y" + case 175: /* storage_qualifier: VARYING */ +#line 1486 "MachineIndependent/glslang.y" { parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); @@ -6292,32 +6974,32 @@ yyreduce: else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 6296 "MachineIndependent/glslang_tab.cpp" +#line 6978 "MachineIndependent/glslang_tab.cpp" break; - case 167: /* storage_qualifier: PATCH */ -#line 1427 "MachineIndependent/glslang.y" + case 176: /* storage_qualifier: PATCH */ +#line 1500 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.patch = true; } -#line 6307 "MachineIndependent/glslang_tab.cpp" +#line 6989 "MachineIndependent/glslang_tab.cpp" break; - case 168: /* storage_qualifier: SAMPLE */ -#line 1433 "MachineIndependent/glslang.y" + case 177: /* storage_qualifier: SAMPLE */ +#line 1506 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.sample = true; } -#line 6317 "MachineIndependent/glslang_tab.cpp" +#line 6999 "MachineIndependent/glslang_tab.cpp" break; - case 169: /* storage_qualifier: HITATTRNV */ -#line 1438 "MachineIndependent/glslang.y" + case 178: /* storage_qualifier: HITATTRNV */ +#line 1511 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -6326,11 +7008,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 6330 "MachineIndependent/glslang_tab.cpp" +#line 7012 "MachineIndependent/glslang_tab.cpp" break; - case 170: /* storage_qualifier: HITATTREXT */ -#line 1446 "MachineIndependent/glslang.y" + case 179: /* storage_qualifier: HITATTREXT */ +#line 1519 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -6339,11 +7021,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 6343 "MachineIndependent/glslang_tab.cpp" +#line 7025 "MachineIndependent/glslang_tab.cpp" break; - case 171: /* storage_qualifier: PAYLOADNV */ -#line 1454 "MachineIndependent/glslang.y" + case 180: /* storage_qualifier: PAYLOADNV */ +#line 1527 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -6352,11 +7034,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 6356 "MachineIndependent/glslang_tab.cpp" +#line 7038 "MachineIndependent/glslang_tab.cpp" break; - case 172: /* storage_qualifier: PAYLOADEXT */ -#line 1462 "MachineIndependent/glslang.y" + case 181: /* storage_qualifier: PAYLOADEXT */ +#line 1535 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -6365,11 +7047,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 6369 "MachineIndependent/glslang_tab.cpp" +#line 7051 "MachineIndependent/glslang_tab.cpp" break; - case 173: /* storage_qualifier: PAYLOADINNV */ -#line 1470 "MachineIndependent/glslang.y" + case 182: /* storage_qualifier: PAYLOADINNV */ +#line 1543 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -6378,11 +7060,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 6382 "MachineIndependent/glslang_tab.cpp" +#line 7064 "MachineIndependent/glslang_tab.cpp" break; - case 174: /* storage_qualifier: PAYLOADINEXT */ -#line 1478 "MachineIndependent/glslang.y" + case 183: /* storage_qualifier: PAYLOADINEXT */ +#line 1551 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -6391,11 +7073,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 6395 "MachineIndependent/glslang_tab.cpp" +#line 7077 "MachineIndependent/glslang_tab.cpp" break; - case 175: /* storage_qualifier: CALLDATANV */ -#line 1486 "MachineIndependent/glslang.y" + case 184: /* storage_qualifier: CALLDATANV */ +#line 1559 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -6404,11 +7086,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 6408 "MachineIndependent/glslang_tab.cpp" +#line 7090 "MachineIndependent/glslang_tab.cpp" break; - case 176: /* storage_qualifier: CALLDATAEXT */ -#line 1494 "MachineIndependent/glslang.y" + case 185: /* storage_qualifier: CALLDATAEXT */ +#line 1567 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -6417,11 +7099,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 6421 "MachineIndependent/glslang_tab.cpp" +#line 7103 "MachineIndependent/glslang_tab.cpp" break; - case 177: /* storage_qualifier: CALLDATAINNV */ -#line 1502 "MachineIndependent/glslang.y" + case 186: /* storage_qualifier: CALLDATAINNV */ +#line 1575 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); @@ -6429,11 +7111,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 6433 "MachineIndependent/glslang_tab.cpp" +#line 7115 "MachineIndependent/glslang_tab.cpp" break; - case 178: /* storage_qualifier: CALLDATAINEXT */ -#line 1509 "MachineIndependent/glslang.y" + case 187: /* storage_qualifier: CALLDATAINEXT */ +#line 1582 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); @@ -6441,175 +7123,175 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 6445 "MachineIndependent/glslang_tab.cpp" +#line 7127 "MachineIndependent/glslang_tab.cpp" break; - case 179: /* storage_qualifier: COHERENT */ -#line 1516 "MachineIndependent/glslang.y" + case 188: /* storage_qualifier: COHERENT */ +#line 1589 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.coherent = true; } -#line 6454 "MachineIndependent/glslang_tab.cpp" +#line 7136 "MachineIndependent/glslang_tab.cpp" break; - case 180: /* storage_qualifier: DEVICECOHERENT */ -#line 1520 "MachineIndependent/glslang.y" + case 189: /* storage_qualifier: DEVICECOHERENT */ +#line 1593 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent"); (yyval.interm.type).qualifier.devicecoherent = true; } -#line 6464 "MachineIndependent/glslang_tab.cpp" +#line 7146 "MachineIndependent/glslang_tab.cpp" break; - case 181: /* storage_qualifier: QUEUEFAMILYCOHERENT */ -#line 1525 "MachineIndependent/glslang.y" + case 190: /* storage_qualifier: QUEUEFAMILYCOHERENT */ +#line 1598 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent"); (yyval.interm.type).qualifier.queuefamilycoherent = true; } -#line 6474 "MachineIndependent/glslang_tab.cpp" +#line 7156 "MachineIndependent/glslang_tab.cpp" break; - case 182: /* storage_qualifier: WORKGROUPCOHERENT */ -#line 1530 "MachineIndependent/glslang.y" + case 191: /* storage_qualifier: WORKGROUPCOHERENT */ +#line 1603 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent"); (yyval.interm.type).qualifier.workgroupcoherent = true; } -#line 6484 "MachineIndependent/glslang_tab.cpp" +#line 7166 "MachineIndependent/glslang_tab.cpp" break; - case 183: /* storage_qualifier: SUBGROUPCOHERENT */ -#line 1535 "MachineIndependent/glslang.y" + case 192: /* storage_qualifier: SUBGROUPCOHERENT */ +#line 1608 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent"); (yyval.interm.type).qualifier.subgroupcoherent = true; } -#line 6494 "MachineIndependent/glslang_tab.cpp" +#line 7176 "MachineIndependent/glslang_tab.cpp" break; - case 184: /* storage_qualifier: NONPRIVATE */ -#line 1540 "MachineIndependent/glslang.y" + case 193: /* storage_qualifier: NONPRIVATE */ +#line 1613 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate"); (yyval.interm.type).qualifier.nonprivate = true; } -#line 6504 "MachineIndependent/glslang_tab.cpp" +#line 7186 "MachineIndependent/glslang_tab.cpp" break; - case 185: /* storage_qualifier: SHADERCALLCOHERENT */ -#line 1545 "MachineIndependent/glslang.y" + case 194: /* storage_qualifier: SHADERCALLCOHERENT */ +#line 1618 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent"); (yyval.interm.type).qualifier.shadercallcoherent = true; } -#line 6514 "MachineIndependent/glslang_tab.cpp" +#line 7196 "MachineIndependent/glslang_tab.cpp" break; - case 186: /* storage_qualifier: VOLATILE */ -#line 1550 "MachineIndependent/glslang.y" + case 195: /* storage_qualifier: VOLATILE */ +#line 1623 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.volatil = true; } -#line 6523 "MachineIndependent/glslang_tab.cpp" +#line 7205 "MachineIndependent/glslang_tab.cpp" break; - case 187: /* storage_qualifier: RESTRICT */ -#line 1554 "MachineIndependent/glslang.y" + case 196: /* storage_qualifier: RESTRICT */ +#line 1627 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.restrict = true; } -#line 6532 "MachineIndependent/glslang_tab.cpp" +#line 7214 "MachineIndependent/glslang_tab.cpp" break; - case 188: /* storage_qualifier: READONLY */ -#line 1558 "MachineIndependent/glslang.y" + case 197: /* storage_qualifier: READONLY */ +#line 1631 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.readonly = true; } -#line 6541 "MachineIndependent/glslang_tab.cpp" +#line 7223 "MachineIndependent/glslang_tab.cpp" break; - case 189: /* storage_qualifier: WRITEONLY */ -#line 1562 "MachineIndependent/glslang.y" + case 198: /* storage_qualifier: WRITEONLY */ +#line 1635 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } -#line 6550 "MachineIndependent/glslang_tab.cpp" +#line 7232 "MachineIndependent/glslang_tab.cpp" break; - case 190: /* storage_qualifier: SUBROUTINE */ -#line 1566 "MachineIndependent/glslang.y" + case 199: /* storage_qualifier: SUBROUTINE */ +#line 1639 "MachineIndependent/glslang.y" { parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine"); (yyval.interm.type).init((yyvsp[0].lex).loc); } -#line 6561 "MachineIndependent/glslang_tab.cpp" +#line 7243 "MachineIndependent/glslang_tab.cpp" break; - case 191: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ -#line 1572 "MachineIndependent/glslang.y" + case 200: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ +#line 1645 "MachineIndependent/glslang.y" { parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine"); (yyval.interm.type).init((yyvsp[-3].lex).loc); } -#line 6572 "MachineIndependent/glslang_tab.cpp" +#line 7254 "MachineIndependent/glslang_tab.cpp" break; - case 192: /* non_uniform_qualifier: NONUNIFORM */ -#line 1583 "MachineIndependent/glslang.y" + case 201: /* non_uniform_qualifier: NONUNIFORM */ +#line 1656 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nonUniform = true; } -#line 6581 "MachineIndependent/glslang_tab.cpp" +#line 7263 "MachineIndependent/glslang_tab.cpp" break; - case 193: /* type_name_list: IDENTIFIER */ -#line 1590 "MachineIndependent/glslang.y" + case 202: /* type_name_list: IDENTIFIER */ +#line 1663 "MachineIndependent/glslang.y" { // TODO } -#line 6589 "MachineIndependent/glslang_tab.cpp" +#line 7271 "MachineIndependent/glslang_tab.cpp" break; - case 194: /* type_name_list: type_name_list COMMA IDENTIFIER */ -#line 1593 "MachineIndependent/glslang.y" + case 203: /* type_name_list: type_name_list COMMA IDENTIFIER */ +#line 1666 "MachineIndependent/glslang.y" { // TODO: 4.0 semantics: subroutines // 1) make sure each identifier is a type declared earlier with SUBROUTINE // 2) save all of the identifiers for future comparison with the declared function } -#line 6599 "MachineIndependent/glslang_tab.cpp" +#line 7281 "MachineIndependent/glslang_tab.cpp" break; - case 195: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ -#line 1602 "MachineIndependent/glslang.y" + case 204: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ +#line 1675 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[0].interm.typeParameters); } -#line 6609 "MachineIndependent/glslang_tab.cpp" +#line 7291 "MachineIndependent/glslang_tab.cpp" break; - case 196: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ -#line 1607 "MachineIndependent/glslang.y" + case 205: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ +#line 1680 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.type) = (yyvsp[-2].interm.type); @@ -6617,21 +7299,21 @@ yyreduce: (yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters); (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; } -#line 6621 "MachineIndependent/glslang_tab.cpp" +#line 7303 "MachineIndependent/glslang_tab.cpp" break; - case 197: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ -#line 1617 "MachineIndependent/glslang.y" + case 206: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ +#line 1690 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } -#line 6631 "MachineIndependent/glslang_tab.cpp" +#line 7313 "MachineIndependent/glslang_tab.cpp" break; - case 198: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1622 "MachineIndependent/glslang.y" + case 207: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1695 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-2].lex).loc; (yyval.interm).arraySizes = new TArraySizes; @@ -6640,20 +7322,20 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 6644 "MachineIndependent/glslang_tab.cpp" +#line 7326 "MachineIndependent/glslang_tab.cpp" break; - case 199: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ -#line 1630 "MachineIndependent/glslang.y" + case 208: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ +#line 1703 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); (yyval.interm).arraySizes->addInnerSize(); } -#line 6653 "MachineIndependent/glslang_tab.cpp" +#line 7335 "MachineIndependent/glslang_tab.cpp" break; - case 200: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1634 "MachineIndependent/glslang.y" + case 209: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1707 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); @@ -6661,35 +7343,35 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 6665 "MachineIndependent/glslang_tab.cpp" +#line 7347 "MachineIndependent/glslang_tab.cpp" break; - case 201: /* type_parameter_specifier_opt: type_parameter_specifier */ -#line 1644 "MachineIndependent/glslang.y" + case 210: /* type_parameter_specifier_opt: type_parameter_specifier */ +#line 1717 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters); } -#line 6673 "MachineIndependent/glslang_tab.cpp" +#line 7355 "MachineIndependent/glslang_tab.cpp" break; - case 202: /* type_parameter_specifier_opt: %empty */ -#line 1647 "MachineIndependent/glslang.y" + case 211: /* type_parameter_specifier_opt: %empty */ +#line 1720 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = 0; } -#line 6681 "MachineIndependent/glslang_tab.cpp" +#line 7363 "MachineIndependent/glslang_tab.cpp" break; - case 203: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ -#line 1653 "MachineIndependent/glslang.y" + case 212: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ +#line 1726 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters); } -#line 6689 "MachineIndependent/glslang_tab.cpp" +#line 7371 "MachineIndependent/glslang_tab.cpp" break; - case 204: /* type_parameter_specifier_list: unary_expression */ -#line 1659 "MachineIndependent/glslang.y" + case 213: /* type_parameter_specifier_list: unary_expression */ +#line 1732 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = new TArraySizes; @@ -6697,11 +7379,11 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); (yyval.interm.typeParameters)->addInnerSize(size); } -#line 6701 "MachineIndependent/glslang_tab.cpp" +#line 7383 "MachineIndependent/glslang_tab.cpp" break; - case 205: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ -#line 1666 "MachineIndependent/glslang.y" + case 214: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ +#line 1739 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters); @@ -6709,300 +7391,300 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); (yyval.interm.typeParameters)->addInnerSize(size); } -#line 6713 "MachineIndependent/glslang_tab.cpp" +#line 7395 "MachineIndependent/glslang_tab.cpp" break; - case 206: /* type_specifier_nonarray: VOID */ -#line 1676 "MachineIndependent/glslang.y" + case 215: /* type_specifier_nonarray: VOID */ +#line 1749 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } -#line 6722 "MachineIndependent/glslang_tab.cpp" +#line 7404 "MachineIndependent/glslang_tab.cpp" break; - case 207: /* type_specifier_nonarray: FLOAT */ -#line 1680 "MachineIndependent/glslang.y" + case 216: /* type_specifier_nonarray: FLOAT */ +#line 1753 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 6731 "MachineIndependent/glslang_tab.cpp" +#line 7413 "MachineIndependent/glslang_tab.cpp" break; - case 208: /* type_specifier_nonarray: INT */ -#line 1684 "MachineIndependent/glslang.y" + case 217: /* type_specifier_nonarray: INT */ +#line 1757 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 6740 "MachineIndependent/glslang_tab.cpp" +#line 7422 "MachineIndependent/glslang_tab.cpp" break; - case 209: /* type_specifier_nonarray: UINT */ -#line 1688 "MachineIndependent/glslang.y" + case 218: /* type_specifier_nonarray: UINT */ +#line 1761 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } -#line 6750 "MachineIndependent/glslang_tab.cpp" +#line 7432 "MachineIndependent/glslang_tab.cpp" break; - case 210: /* type_specifier_nonarray: BOOL */ -#line 1693 "MachineIndependent/glslang.y" + case 219: /* type_specifier_nonarray: BOOL */ +#line 1766 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; } -#line 6759 "MachineIndependent/glslang_tab.cpp" +#line 7441 "MachineIndependent/glslang_tab.cpp" break; - case 211: /* type_specifier_nonarray: VEC2 */ -#line 1697 "MachineIndependent/glslang.y" + case 220: /* type_specifier_nonarray: VEC2 */ +#line 1770 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } -#line 6769 "MachineIndependent/glslang_tab.cpp" +#line 7451 "MachineIndependent/glslang_tab.cpp" break; - case 212: /* type_specifier_nonarray: VEC3 */ -#line 1702 "MachineIndependent/glslang.y" + case 221: /* type_specifier_nonarray: VEC3 */ +#line 1775 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } -#line 6779 "MachineIndependent/glslang_tab.cpp" +#line 7461 "MachineIndependent/glslang_tab.cpp" break; - case 213: /* type_specifier_nonarray: VEC4 */ -#line 1707 "MachineIndependent/glslang.y" + case 222: /* type_specifier_nonarray: VEC4 */ +#line 1780 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } -#line 6789 "MachineIndependent/glslang_tab.cpp" +#line 7471 "MachineIndependent/glslang_tab.cpp" break; - case 214: /* type_specifier_nonarray: BVEC2 */ -#line 1712 "MachineIndependent/glslang.y" + case 223: /* type_specifier_nonarray: BVEC2 */ +#line 1785 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(2); } -#line 6799 "MachineIndependent/glslang_tab.cpp" +#line 7481 "MachineIndependent/glslang_tab.cpp" break; - case 215: /* type_specifier_nonarray: BVEC3 */ -#line 1717 "MachineIndependent/glslang.y" + case 224: /* type_specifier_nonarray: BVEC3 */ +#line 1790 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(3); } -#line 6809 "MachineIndependent/glslang_tab.cpp" +#line 7491 "MachineIndependent/glslang_tab.cpp" break; - case 216: /* type_specifier_nonarray: BVEC4 */ -#line 1722 "MachineIndependent/glslang.y" + case 225: /* type_specifier_nonarray: BVEC4 */ +#line 1795 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(4); } -#line 6819 "MachineIndependent/glslang_tab.cpp" +#line 7501 "MachineIndependent/glslang_tab.cpp" break; - case 217: /* type_specifier_nonarray: IVEC2 */ -#line 1727 "MachineIndependent/glslang.y" + case 226: /* type_specifier_nonarray: IVEC2 */ +#line 1800 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } -#line 6829 "MachineIndependent/glslang_tab.cpp" +#line 7511 "MachineIndependent/glslang_tab.cpp" break; - case 218: /* type_specifier_nonarray: IVEC3 */ -#line 1732 "MachineIndependent/glslang.y" + case 227: /* type_specifier_nonarray: IVEC3 */ +#line 1805 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } -#line 6839 "MachineIndependent/glslang_tab.cpp" +#line 7521 "MachineIndependent/glslang_tab.cpp" break; - case 219: /* type_specifier_nonarray: IVEC4 */ -#line 1737 "MachineIndependent/glslang.y" + case 228: /* type_specifier_nonarray: IVEC4 */ +#line 1810 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } -#line 6849 "MachineIndependent/glslang_tab.cpp" +#line 7531 "MachineIndependent/glslang_tab.cpp" break; - case 220: /* type_specifier_nonarray: UVEC2 */ -#line 1742 "MachineIndependent/glslang.y" + case 229: /* type_specifier_nonarray: UVEC2 */ +#line 1815 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } -#line 6860 "MachineIndependent/glslang_tab.cpp" +#line 7542 "MachineIndependent/glslang_tab.cpp" break; - case 221: /* type_specifier_nonarray: UVEC3 */ -#line 1748 "MachineIndependent/glslang.y" + case 230: /* type_specifier_nonarray: UVEC3 */ +#line 1821 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } -#line 6871 "MachineIndependent/glslang_tab.cpp" +#line 7553 "MachineIndependent/glslang_tab.cpp" break; - case 222: /* type_specifier_nonarray: UVEC4 */ -#line 1754 "MachineIndependent/glslang.y" + case 231: /* type_specifier_nonarray: UVEC4 */ +#line 1827 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } -#line 6882 "MachineIndependent/glslang_tab.cpp" +#line 7564 "MachineIndependent/glslang_tab.cpp" break; - case 223: /* type_specifier_nonarray: MAT2 */ -#line 1760 "MachineIndependent/glslang.y" + case 232: /* type_specifier_nonarray: MAT2 */ +#line 1833 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 6892 "MachineIndependent/glslang_tab.cpp" +#line 7574 "MachineIndependent/glslang_tab.cpp" break; - case 224: /* type_specifier_nonarray: MAT3 */ -#line 1765 "MachineIndependent/glslang.y" + case 233: /* type_specifier_nonarray: MAT3 */ +#line 1838 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 6902 "MachineIndependent/glslang_tab.cpp" +#line 7584 "MachineIndependent/glslang_tab.cpp" break; - case 225: /* type_specifier_nonarray: MAT4 */ -#line 1770 "MachineIndependent/glslang.y" + case 234: /* type_specifier_nonarray: MAT4 */ +#line 1843 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 6912 "MachineIndependent/glslang_tab.cpp" +#line 7594 "MachineIndependent/glslang_tab.cpp" break; - case 226: /* type_specifier_nonarray: MAT2X2 */ -#line 1775 "MachineIndependent/glslang.y" + case 235: /* type_specifier_nonarray: MAT2X2 */ +#line 1848 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 6922 "MachineIndependent/glslang_tab.cpp" +#line 7604 "MachineIndependent/glslang_tab.cpp" break; - case 227: /* type_specifier_nonarray: MAT2X3 */ -#line 1780 "MachineIndependent/glslang.y" + case 236: /* type_specifier_nonarray: MAT2X3 */ +#line 1853 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } -#line 6932 "MachineIndependent/glslang_tab.cpp" +#line 7614 "MachineIndependent/glslang_tab.cpp" break; - case 228: /* type_specifier_nonarray: MAT2X4 */ -#line 1785 "MachineIndependent/glslang.y" + case 237: /* type_specifier_nonarray: MAT2X4 */ +#line 1858 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } -#line 6942 "MachineIndependent/glslang_tab.cpp" +#line 7624 "MachineIndependent/glslang_tab.cpp" break; - case 229: /* type_specifier_nonarray: MAT3X2 */ -#line 1790 "MachineIndependent/glslang.y" + case 238: /* type_specifier_nonarray: MAT3X2 */ +#line 1863 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } -#line 6952 "MachineIndependent/glslang_tab.cpp" +#line 7634 "MachineIndependent/glslang_tab.cpp" break; - case 230: /* type_specifier_nonarray: MAT3X3 */ -#line 1795 "MachineIndependent/glslang.y" + case 239: /* type_specifier_nonarray: MAT3X3 */ +#line 1868 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 6962 "MachineIndependent/glslang_tab.cpp" +#line 7644 "MachineIndependent/glslang_tab.cpp" break; - case 231: /* type_specifier_nonarray: MAT3X4 */ -#line 1800 "MachineIndependent/glslang.y" + case 240: /* type_specifier_nonarray: MAT3X4 */ +#line 1873 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } -#line 6972 "MachineIndependent/glslang_tab.cpp" +#line 7654 "MachineIndependent/glslang_tab.cpp" break; - case 232: /* type_specifier_nonarray: MAT4X2 */ -#line 1805 "MachineIndependent/glslang.y" + case 241: /* type_specifier_nonarray: MAT4X2 */ +#line 1878 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } -#line 6982 "MachineIndependent/glslang_tab.cpp" +#line 7664 "MachineIndependent/glslang_tab.cpp" break; - case 233: /* type_specifier_nonarray: MAT4X3 */ -#line 1810 "MachineIndependent/glslang.y" + case 242: /* type_specifier_nonarray: MAT4X3 */ +#line 1883 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } -#line 6992 "MachineIndependent/glslang_tab.cpp" +#line 7674 "MachineIndependent/glslang_tab.cpp" break; - case 234: /* type_specifier_nonarray: MAT4X4 */ -#line 1815 "MachineIndependent/glslang.y" + case 243: /* type_specifier_nonarray: MAT4X4 */ +#line 1888 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7002 "MachineIndependent/glslang_tab.cpp" +#line 7684 "MachineIndependent/glslang_tab.cpp" break; - case 235: /* type_specifier_nonarray: DOUBLE */ -#line 1821 "MachineIndependent/glslang.y" + case 244: /* type_specifier_nonarray: DOUBLE */ +#line 1894 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7010,121 +7692,121 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7014 "MachineIndependent/glslang_tab.cpp" +#line 7696 "MachineIndependent/glslang_tab.cpp" break; - case 236: /* type_specifier_nonarray: FLOAT16_T */ -#line 1828 "MachineIndependent/glslang.y" + case 245: /* type_specifier_nonarray: FLOAT16_T */ +#line 1901 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; } -#line 7024 "MachineIndependent/glslang_tab.cpp" +#line 7706 "MachineIndependent/glslang_tab.cpp" break; - case 237: /* type_specifier_nonarray: FLOAT32_T */ -#line 1833 "MachineIndependent/glslang.y" + case 246: /* type_specifier_nonarray: FLOAT32_T */ +#line 1906 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 7034 "MachineIndependent/glslang_tab.cpp" +#line 7716 "MachineIndependent/glslang_tab.cpp" break; - case 238: /* type_specifier_nonarray: FLOAT64_T */ -#line 1838 "MachineIndependent/glslang.y" + case 247: /* type_specifier_nonarray: FLOAT64_T */ +#line 1911 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7044 "MachineIndependent/glslang_tab.cpp" +#line 7726 "MachineIndependent/glslang_tab.cpp" break; - case 239: /* type_specifier_nonarray: INT8_T */ -#line 1843 "MachineIndependent/glslang.y" + case 248: /* type_specifier_nonarray: INT8_T */ +#line 1916 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; } -#line 7054 "MachineIndependent/glslang_tab.cpp" +#line 7736 "MachineIndependent/glslang_tab.cpp" break; - case 240: /* type_specifier_nonarray: UINT8_T */ -#line 1848 "MachineIndependent/glslang.y" + case 249: /* type_specifier_nonarray: UINT8_T */ +#line 1921 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; } -#line 7064 "MachineIndependent/glslang_tab.cpp" +#line 7746 "MachineIndependent/glslang_tab.cpp" break; - case 241: /* type_specifier_nonarray: INT16_T */ -#line 1853 "MachineIndependent/glslang.y" + case 250: /* type_specifier_nonarray: INT16_T */ +#line 1926 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; } -#line 7074 "MachineIndependent/glslang_tab.cpp" +#line 7756 "MachineIndependent/glslang_tab.cpp" break; - case 242: /* type_specifier_nonarray: UINT16_T */ -#line 1858 "MachineIndependent/glslang.y" + case 251: /* type_specifier_nonarray: UINT16_T */ +#line 1931 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; } -#line 7084 "MachineIndependent/glslang_tab.cpp" +#line 7766 "MachineIndependent/glslang_tab.cpp" break; - case 243: /* type_specifier_nonarray: INT32_T */ -#line 1863 "MachineIndependent/glslang.y" + case 252: /* type_specifier_nonarray: INT32_T */ +#line 1936 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 7094 "MachineIndependent/glslang_tab.cpp" +#line 7776 "MachineIndependent/glslang_tab.cpp" break; - case 244: /* type_specifier_nonarray: UINT32_T */ -#line 1868 "MachineIndependent/glslang.y" + case 253: /* type_specifier_nonarray: UINT32_T */ +#line 1941 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } -#line 7104 "MachineIndependent/glslang_tab.cpp" +#line 7786 "MachineIndependent/glslang_tab.cpp" break; - case 245: /* type_specifier_nonarray: INT64_T */ -#line 1873 "MachineIndependent/glslang.y" + case 254: /* type_specifier_nonarray: INT64_T */ +#line 1946 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; } -#line 7114 "MachineIndependent/glslang_tab.cpp" +#line 7796 "MachineIndependent/glslang_tab.cpp" break; - case 246: /* type_specifier_nonarray: UINT64_T */ -#line 1878 "MachineIndependent/glslang.y" + case 255: /* type_specifier_nonarray: UINT64_T */ +#line 1951 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; } -#line 7124 "MachineIndependent/glslang_tab.cpp" +#line 7806 "MachineIndependent/glslang_tab.cpp" break; - case 247: /* type_specifier_nonarray: DVEC2 */ -#line 1883 "MachineIndependent/glslang.y" + case 256: /* type_specifier_nonarray: DVEC2 */ +#line 1956 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7133,11 +7815,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 7137 "MachineIndependent/glslang_tab.cpp" +#line 7819 "MachineIndependent/glslang_tab.cpp" break; - case 248: /* type_specifier_nonarray: DVEC3 */ -#line 1891 "MachineIndependent/glslang.y" + case 257: /* type_specifier_nonarray: DVEC3 */ +#line 1964 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7146,11 +7828,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 7150 "MachineIndependent/glslang_tab.cpp" +#line 7832 "MachineIndependent/glslang_tab.cpp" break; - case 249: /* type_specifier_nonarray: DVEC4 */ -#line 1899 "MachineIndependent/glslang.y" + case 258: /* type_specifier_nonarray: DVEC4 */ +#line 1972 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7159,374 +7841,374 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } -#line 7163 "MachineIndependent/glslang_tab.cpp" +#line 7845 "MachineIndependent/glslang_tab.cpp" break; - case 250: /* type_specifier_nonarray: F16VEC2 */ -#line 1907 "MachineIndependent/glslang.y" + case 259: /* type_specifier_nonarray: F16VEC2 */ +#line 1980 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(2); } -#line 7174 "MachineIndependent/glslang_tab.cpp" +#line 7856 "MachineIndependent/glslang_tab.cpp" break; - case 251: /* type_specifier_nonarray: F16VEC3 */ -#line 1913 "MachineIndependent/glslang.y" + case 260: /* type_specifier_nonarray: F16VEC3 */ +#line 1986 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(3); } -#line 7185 "MachineIndependent/glslang_tab.cpp" +#line 7867 "MachineIndependent/glslang_tab.cpp" break; - case 252: /* type_specifier_nonarray: F16VEC4 */ -#line 1919 "MachineIndependent/glslang.y" + case 261: /* type_specifier_nonarray: F16VEC4 */ +#line 1992 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(4); } -#line 7196 "MachineIndependent/glslang_tab.cpp" +#line 7878 "MachineIndependent/glslang_tab.cpp" break; - case 253: /* type_specifier_nonarray: F32VEC2 */ -#line 1925 "MachineIndependent/glslang.y" + case 262: /* type_specifier_nonarray: F32VEC2 */ +#line 1998 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } -#line 7207 "MachineIndependent/glslang_tab.cpp" +#line 7889 "MachineIndependent/glslang_tab.cpp" break; - case 254: /* type_specifier_nonarray: F32VEC3 */ -#line 1931 "MachineIndependent/glslang.y" + case 263: /* type_specifier_nonarray: F32VEC3 */ +#line 2004 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } -#line 7218 "MachineIndependent/glslang_tab.cpp" +#line 7900 "MachineIndependent/glslang_tab.cpp" break; - case 255: /* type_specifier_nonarray: F32VEC4 */ -#line 1937 "MachineIndependent/glslang.y" + case 264: /* type_specifier_nonarray: F32VEC4 */ +#line 2010 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } -#line 7229 "MachineIndependent/glslang_tab.cpp" +#line 7911 "MachineIndependent/glslang_tab.cpp" break; - case 256: /* type_specifier_nonarray: F64VEC2 */ -#line 1943 "MachineIndependent/glslang.y" + case 265: /* type_specifier_nonarray: F64VEC2 */ +#line 2016 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 7240 "MachineIndependent/glslang_tab.cpp" +#line 7922 "MachineIndependent/glslang_tab.cpp" break; - case 257: /* type_specifier_nonarray: F64VEC3 */ -#line 1949 "MachineIndependent/glslang.y" + case 266: /* type_specifier_nonarray: F64VEC3 */ +#line 2022 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 7251 "MachineIndependent/glslang_tab.cpp" +#line 7933 "MachineIndependent/glslang_tab.cpp" break; - case 258: /* type_specifier_nonarray: F64VEC4 */ -#line 1955 "MachineIndependent/glslang.y" + case 267: /* type_specifier_nonarray: F64VEC4 */ +#line 2028 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } -#line 7262 "MachineIndependent/glslang_tab.cpp" +#line 7944 "MachineIndependent/glslang_tab.cpp" break; - case 259: /* type_specifier_nonarray: I8VEC2 */ -#line 1961 "MachineIndependent/glslang.y" + case 268: /* type_specifier_nonarray: I8VEC2 */ +#line 2034 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(2); } -#line 7273 "MachineIndependent/glslang_tab.cpp" +#line 7955 "MachineIndependent/glslang_tab.cpp" break; - case 260: /* type_specifier_nonarray: I8VEC3 */ -#line 1967 "MachineIndependent/glslang.y" + case 269: /* type_specifier_nonarray: I8VEC3 */ +#line 2040 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(3); } -#line 7284 "MachineIndependent/glslang_tab.cpp" +#line 7966 "MachineIndependent/glslang_tab.cpp" break; - case 261: /* type_specifier_nonarray: I8VEC4 */ -#line 1973 "MachineIndependent/glslang.y" + case 270: /* type_specifier_nonarray: I8VEC4 */ +#line 2046 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(4); } -#line 7295 "MachineIndependent/glslang_tab.cpp" +#line 7977 "MachineIndependent/glslang_tab.cpp" break; - case 262: /* type_specifier_nonarray: I16VEC2 */ -#line 1979 "MachineIndependent/glslang.y" + case 271: /* type_specifier_nonarray: I16VEC2 */ +#line 2052 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(2); } -#line 7306 "MachineIndependent/glslang_tab.cpp" +#line 7988 "MachineIndependent/glslang_tab.cpp" break; - case 263: /* type_specifier_nonarray: I16VEC3 */ -#line 1985 "MachineIndependent/glslang.y" + case 272: /* type_specifier_nonarray: I16VEC3 */ +#line 2058 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(3); } -#line 7317 "MachineIndependent/glslang_tab.cpp" +#line 7999 "MachineIndependent/glslang_tab.cpp" break; - case 264: /* type_specifier_nonarray: I16VEC4 */ -#line 1991 "MachineIndependent/glslang.y" + case 273: /* type_specifier_nonarray: I16VEC4 */ +#line 2064 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(4); } -#line 7328 "MachineIndependent/glslang_tab.cpp" +#line 8010 "MachineIndependent/glslang_tab.cpp" break; - case 265: /* type_specifier_nonarray: I32VEC2 */ -#line 1997 "MachineIndependent/glslang.y" + case 274: /* type_specifier_nonarray: I32VEC2 */ +#line 2070 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } -#line 7339 "MachineIndependent/glslang_tab.cpp" +#line 8021 "MachineIndependent/glslang_tab.cpp" break; - case 266: /* type_specifier_nonarray: I32VEC3 */ -#line 2003 "MachineIndependent/glslang.y" + case 275: /* type_specifier_nonarray: I32VEC3 */ +#line 2076 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } -#line 7350 "MachineIndependent/glslang_tab.cpp" +#line 8032 "MachineIndependent/glslang_tab.cpp" break; - case 267: /* type_specifier_nonarray: I32VEC4 */ -#line 2009 "MachineIndependent/glslang.y" + case 276: /* type_specifier_nonarray: I32VEC4 */ +#line 2082 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } -#line 7361 "MachineIndependent/glslang_tab.cpp" +#line 8043 "MachineIndependent/glslang_tab.cpp" break; - case 268: /* type_specifier_nonarray: I64VEC2 */ -#line 2015 "MachineIndependent/glslang.y" + case 277: /* type_specifier_nonarray: I64VEC2 */ +#line 2088 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(2); } -#line 7372 "MachineIndependent/glslang_tab.cpp" +#line 8054 "MachineIndependent/glslang_tab.cpp" break; - case 269: /* type_specifier_nonarray: I64VEC3 */ -#line 2021 "MachineIndependent/glslang.y" + case 278: /* type_specifier_nonarray: I64VEC3 */ +#line 2094 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(3); } -#line 7383 "MachineIndependent/glslang_tab.cpp" +#line 8065 "MachineIndependent/glslang_tab.cpp" break; - case 270: /* type_specifier_nonarray: I64VEC4 */ -#line 2027 "MachineIndependent/glslang.y" + case 279: /* type_specifier_nonarray: I64VEC4 */ +#line 2100 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(4); } -#line 7394 "MachineIndependent/glslang_tab.cpp" +#line 8076 "MachineIndependent/glslang_tab.cpp" break; - case 271: /* type_specifier_nonarray: U8VEC2 */ -#line 2033 "MachineIndependent/glslang.y" + case 280: /* type_specifier_nonarray: U8VEC2 */ +#line 2106 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(2); } -#line 7405 "MachineIndependent/glslang_tab.cpp" +#line 8087 "MachineIndependent/glslang_tab.cpp" break; - case 272: /* type_specifier_nonarray: U8VEC3 */ -#line 2039 "MachineIndependent/glslang.y" + case 281: /* type_specifier_nonarray: U8VEC3 */ +#line 2112 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(3); } -#line 7416 "MachineIndependent/glslang_tab.cpp" +#line 8098 "MachineIndependent/glslang_tab.cpp" break; - case 273: /* type_specifier_nonarray: U8VEC4 */ -#line 2045 "MachineIndependent/glslang.y" + case 282: /* type_specifier_nonarray: U8VEC4 */ +#line 2118 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(4); } -#line 7427 "MachineIndependent/glslang_tab.cpp" +#line 8109 "MachineIndependent/glslang_tab.cpp" break; - case 274: /* type_specifier_nonarray: U16VEC2 */ -#line 2051 "MachineIndependent/glslang.y" + case 283: /* type_specifier_nonarray: U16VEC2 */ +#line 2124 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(2); } -#line 7438 "MachineIndependent/glslang_tab.cpp" +#line 8120 "MachineIndependent/glslang_tab.cpp" break; - case 275: /* type_specifier_nonarray: U16VEC3 */ -#line 2057 "MachineIndependent/glslang.y" + case 284: /* type_specifier_nonarray: U16VEC3 */ +#line 2130 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(3); } -#line 7449 "MachineIndependent/glslang_tab.cpp" +#line 8131 "MachineIndependent/glslang_tab.cpp" break; - case 276: /* type_specifier_nonarray: U16VEC4 */ -#line 2063 "MachineIndependent/glslang.y" + case 285: /* type_specifier_nonarray: U16VEC4 */ +#line 2136 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(4); } -#line 7460 "MachineIndependent/glslang_tab.cpp" +#line 8142 "MachineIndependent/glslang_tab.cpp" break; - case 277: /* type_specifier_nonarray: U32VEC2 */ -#line 2069 "MachineIndependent/glslang.y" + case 286: /* type_specifier_nonarray: U32VEC2 */ +#line 2142 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } -#line 7471 "MachineIndependent/glslang_tab.cpp" +#line 8153 "MachineIndependent/glslang_tab.cpp" break; - case 278: /* type_specifier_nonarray: U32VEC3 */ -#line 2075 "MachineIndependent/glslang.y" + case 287: /* type_specifier_nonarray: U32VEC3 */ +#line 2148 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } -#line 7482 "MachineIndependent/glslang_tab.cpp" +#line 8164 "MachineIndependent/glslang_tab.cpp" break; - case 279: /* type_specifier_nonarray: U32VEC4 */ -#line 2081 "MachineIndependent/glslang.y" + case 288: /* type_specifier_nonarray: U32VEC4 */ +#line 2154 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } -#line 7493 "MachineIndependent/glslang_tab.cpp" +#line 8175 "MachineIndependent/glslang_tab.cpp" break; - case 280: /* type_specifier_nonarray: U64VEC2 */ -#line 2087 "MachineIndependent/glslang.y" + case 289: /* type_specifier_nonarray: U64VEC2 */ +#line 2160 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(2); } -#line 7504 "MachineIndependent/glslang_tab.cpp" +#line 8186 "MachineIndependent/glslang_tab.cpp" break; - case 281: /* type_specifier_nonarray: U64VEC3 */ -#line 2093 "MachineIndependent/glslang.y" + case 290: /* type_specifier_nonarray: U64VEC3 */ +#line 2166 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(3); } -#line 7515 "MachineIndependent/glslang_tab.cpp" +#line 8197 "MachineIndependent/glslang_tab.cpp" break; - case 282: /* type_specifier_nonarray: U64VEC4 */ -#line 2099 "MachineIndependent/glslang.y" + case 291: /* type_specifier_nonarray: U64VEC4 */ +#line 2172 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(4); } -#line 7526 "MachineIndependent/glslang_tab.cpp" +#line 8208 "MachineIndependent/glslang_tab.cpp" break; - case 283: /* type_specifier_nonarray: DMAT2 */ -#line 2105 "MachineIndependent/glslang.y" + case 292: /* type_specifier_nonarray: DMAT2 */ +#line 2178 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7535,11 +8217,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 7539 "MachineIndependent/glslang_tab.cpp" +#line 8221 "MachineIndependent/glslang_tab.cpp" break; - case 284: /* type_specifier_nonarray: DMAT3 */ -#line 2113 "MachineIndependent/glslang.y" + case 293: /* type_specifier_nonarray: DMAT3 */ +#line 2186 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7548,11 +8230,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 7552 "MachineIndependent/glslang_tab.cpp" +#line 8234 "MachineIndependent/glslang_tab.cpp" break; - case 285: /* type_specifier_nonarray: DMAT4 */ -#line 2121 "MachineIndependent/glslang.y" + case 294: /* type_specifier_nonarray: DMAT4 */ +#line 2194 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7561,11 +8243,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 7565 "MachineIndependent/glslang_tab.cpp" +#line 8247 "MachineIndependent/glslang_tab.cpp" break; - case 286: /* type_specifier_nonarray: DMAT2X2 */ -#line 2129 "MachineIndependent/glslang.y" + case 295: /* type_specifier_nonarray: DMAT2X2 */ +#line 2202 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7574,11 +8256,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 7578 "MachineIndependent/glslang_tab.cpp" +#line 8260 "MachineIndependent/glslang_tab.cpp" break; - case 287: /* type_specifier_nonarray: DMAT2X3 */ -#line 2137 "MachineIndependent/glslang.y" + case 296: /* type_specifier_nonarray: DMAT2X3 */ +#line 2210 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7587,11 +8269,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 7591 "MachineIndependent/glslang_tab.cpp" +#line 8273 "MachineIndependent/glslang_tab.cpp" break; - case 288: /* type_specifier_nonarray: DMAT2X4 */ -#line 2145 "MachineIndependent/glslang.y" + case 297: /* type_specifier_nonarray: DMAT2X4 */ +#line 2218 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7600,11 +8282,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 7604 "MachineIndependent/glslang_tab.cpp" +#line 8286 "MachineIndependent/glslang_tab.cpp" break; - case 289: /* type_specifier_nonarray: DMAT3X2 */ -#line 2153 "MachineIndependent/glslang.y" + case 298: /* type_specifier_nonarray: DMAT3X2 */ +#line 2226 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7613,11 +8295,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 7617 "MachineIndependent/glslang_tab.cpp" +#line 8299 "MachineIndependent/glslang_tab.cpp" break; - case 290: /* type_specifier_nonarray: DMAT3X3 */ -#line 2161 "MachineIndependent/glslang.y" + case 299: /* type_specifier_nonarray: DMAT3X3 */ +#line 2234 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7626,11 +8308,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 7630 "MachineIndependent/glslang_tab.cpp" +#line 8312 "MachineIndependent/glslang_tab.cpp" break; - case 291: /* type_specifier_nonarray: DMAT3X4 */ -#line 2169 "MachineIndependent/glslang.y" + case 300: /* type_specifier_nonarray: DMAT3X4 */ +#line 2242 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7639,11 +8321,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 7643 "MachineIndependent/glslang_tab.cpp" +#line 8325 "MachineIndependent/glslang_tab.cpp" break; - case 292: /* type_specifier_nonarray: DMAT4X2 */ -#line 2177 "MachineIndependent/glslang.y" + case 301: /* type_specifier_nonarray: DMAT4X2 */ +#line 2250 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7652,11 +8334,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 7656 "MachineIndependent/glslang_tab.cpp" +#line 8338 "MachineIndependent/glslang_tab.cpp" break; - case 293: /* type_specifier_nonarray: DMAT4X3 */ -#line 2185 "MachineIndependent/glslang.y" + case 302: /* type_specifier_nonarray: DMAT4X3 */ +#line 2258 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7665,11 +8347,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 7669 "MachineIndependent/glslang_tab.cpp" +#line 8351 "MachineIndependent/glslang_tab.cpp" break; - case 294: /* type_specifier_nonarray: DMAT4X4 */ -#line 2193 "MachineIndependent/glslang.y" + case 303: /* type_specifier_nonarray: DMAT4X4 */ +#line 2266 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7678,2228 +8360,2228 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 7682 "MachineIndependent/glslang_tab.cpp" +#line 8364 "MachineIndependent/glslang_tab.cpp" break; - case 295: /* type_specifier_nonarray: F16MAT2 */ -#line 2201 "MachineIndependent/glslang.y" + case 304: /* type_specifier_nonarray: F16MAT2 */ +#line 2274 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); } -#line 7693 "MachineIndependent/glslang_tab.cpp" +#line 8375 "MachineIndependent/glslang_tab.cpp" break; - case 296: /* type_specifier_nonarray: F16MAT3 */ -#line 2207 "MachineIndependent/glslang.y" + case 305: /* type_specifier_nonarray: F16MAT3 */ +#line 2280 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); } -#line 7704 "MachineIndependent/glslang_tab.cpp" +#line 8386 "MachineIndependent/glslang_tab.cpp" break; - case 297: /* type_specifier_nonarray: F16MAT4 */ -#line 2213 "MachineIndependent/glslang.y" + case 306: /* type_specifier_nonarray: F16MAT4 */ +#line 2286 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); } -#line 7715 "MachineIndependent/glslang_tab.cpp" +#line 8397 "MachineIndependent/glslang_tab.cpp" break; - case 298: /* type_specifier_nonarray: F16MAT2X2 */ -#line 2219 "MachineIndependent/glslang.y" + case 307: /* type_specifier_nonarray: F16MAT2X2 */ +#line 2292 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); } -#line 7726 "MachineIndependent/glslang_tab.cpp" +#line 8408 "MachineIndependent/glslang_tab.cpp" break; - case 299: /* type_specifier_nonarray: F16MAT2X3 */ -#line 2225 "MachineIndependent/glslang.y" + case 308: /* type_specifier_nonarray: F16MAT2X3 */ +#line 2298 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 3); } -#line 7737 "MachineIndependent/glslang_tab.cpp" +#line 8419 "MachineIndependent/glslang_tab.cpp" break; - case 300: /* type_specifier_nonarray: F16MAT2X4 */ -#line 2231 "MachineIndependent/glslang.y" + case 309: /* type_specifier_nonarray: F16MAT2X4 */ +#line 2304 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 4); } -#line 7748 "MachineIndependent/glslang_tab.cpp" +#line 8430 "MachineIndependent/glslang_tab.cpp" break; - case 301: /* type_specifier_nonarray: F16MAT3X2 */ -#line 2237 "MachineIndependent/glslang.y" + case 310: /* type_specifier_nonarray: F16MAT3X2 */ +#line 2310 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 2); } -#line 7759 "MachineIndependent/glslang_tab.cpp" +#line 8441 "MachineIndependent/glslang_tab.cpp" break; - case 302: /* type_specifier_nonarray: F16MAT3X3 */ -#line 2243 "MachineIndependent/glslang.y" + case 311: /* type_specifier_nonarray: F16MAT3X3 */ +#line 2316 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); } -#line 7770 "MachineIndependent/glslang_tab.cpp" +#line 8452 "MachineIndependent/glslang_tab.cpp" break; - case 303: /* type_specifier_nonarray: F16MAT3X4 */ -#line 2249 "MachineIndependent/glslang.y" + case 312: /* type_specifier_nonarray: F16MAT3X4 */ +#line 2322 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 4); } -#line 7781 "MachineIndependent/glslang_tab.cpp" +#line 8463 "MachineIndependent/glslang_tab.cpp" break; - case 304: /* type_specifier_nonarray: F16MAT4X2 */ -#line 2255 "MachineIndependent/glslang.y" + case 313: /* type_specifier_nonarray: F16MAT4X2 */ +#line 2328 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 2); } -#line 7792 "MachineIndependent/glslang_tab.cpp" +#line 8474 "MachineIndependent/glslang_tab.cpp" break; - case 305: /* type_specifier_nonarray: F16MAT4X3 */ -#line 2261 "MachineIndependent/glslang.y" + case 314: /* type_specifier_nonarray: F16MAT4X3 */ +#line 2334 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 3); } -#line 7803 "MachineIndependent/glslang_tab.cpp" +#line 8485 "MachineIndependent/glslang_tab.cpp" break; - case 306: /* type_specifier_nonarray: F16MAT4X4 */ -#line 2267 "MachineIndependent/glslang.y" + case 315: /* type_specifier_nonarray: F16MAT4X4 */ +#line 2340 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); } -#line 7814 "MachineIndependent/glslang_tab.cpp" +#line 8496 "MachineIndependent/glslang_tab.cpp" break; - case 307: /* type_specifier_nonarray: F32MAT2 */ -#line 2273 "MachineIndependent/glslang.y" + case 316: /* type_specifier_nonarray: F32MAT2 */ +#line 2346 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 7825 "MachineIndependent/glslang_tab.cpp" +#line 8507 "MachineIndependent/glslang_tab.cpp" break; - case 308: /* type_specifier_nonarray: F32MAT3 */ -#line 2279 "MachineIndependent/glslang.y" + case 317: /* type_specifier_nonarray: F32MAT3 */ +#line 2352 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 7836 "MachineIndependent/glslang_tab.cpp" +#line 8518 "MachineIndependent/glslang_tab.cpp" break; - case 309: /* type_specifier_nonarray: F32MAT4 */ -#line 2285 "MachineIndependent/glslang.y" + case 318: /* type_specifier_nonarray: F32MAT4 */ +#line 2358 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7847 "MachineIndependent/glslang_tab.cpp" +#line 8529 "MachineIndependent/glslang_tab.cpp" break; - case 310: /* type_specifier_nonarray: F32MAT2X2 */ -#line 2291 "MachineIndependent/glslang.y" + case 319: /* type_specifier_nonarray: F32MAT2X2 */ +#line 2364 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 7858 "MachineIndependent/glslang_tab.cpp" +#line 8540 "MachineIndependent/glslang_tab.cpp" break; - case 311: /* type_specifier_nonarray: F32MAT2X3 */ -#line 2297 "MachineIndependent/glslang.y" + case 320: /* type_specifier_nonarray: F32MAT2X3 */ +#line 2370 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } -#line 7869 "MachineIndependent/glslang_tab.cpp" +#line 8551 "MachineIndependent/glslang_tab.cpp" break; - case 312: /* type_specifier_nonarray: F32MAT2X4 */ -#line 2303 "MachineIndependent/glslang.y" + case 321: /* type_specifier_nonarray: F32MAT2X4 */ +#line 2376 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } -#line 7880 "MachineIndependent/glslang_tab.cpp" +#line 8562 "MachineIndependent/glslang_tab.cpp" break; - case 313: /* type_specifier_nonarray: F32MAT3X2 */ -#line 2309 "MachineIndependent/glslang.y" + case 322: /* type_specifier_nonarray: F32MAT3X2 */ +#line 2382 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } -#line 7891 "MachineIndependent/glslang_tab.cpp" +#line 8573 "MachineIndependent/glslang_tab.cpp" break; - case 314: /* type_specifier_nonarray: F32MAT3X3 */ -#line 2315 "MachineIndependent/glslang.y" + case 323: /* type_specifier_nonarray: F32MAT3X3 */ +#line 2388 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 7902 "MachineIndependent/glslang_tab.cpp" +#line 8584 "MachineIndependent/glslang_tab.cpp" break; - case 315: /* type_specifier_nonarray: F32MAT3X4 */ -#line 2321 "MachineIndependent/glslang.y" + case 324: /* type_specifier_nonarray: F32MAT3X4 */ +#line 2394 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } -#line 7913 "MachineIndependent/glslang_tab.cpp" +#line 8595 "MachineIndependent/glslang_tab.cpp" break; - case 316: /* type_specifier_nonarray: F32MAT4X2 */ -#line 2327 "MachineIndependent/glslang.y" + case 325: /* type_specifier_nonarray: F32MAT4X2 */ +#line 2400 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } -#line 7924 "MachineIndependent/glslang_tab.cpp" +#line 8606 "MachineIndependent/glslang_tab.cpp" break; - case 317: /* type_specifier_nonarray: F32MAT4X3 */ -#line 2333 "MachineIndependent/glslang.y" + case 326: /* type_specifier_nonarray: F32MAT4X3 */ +#line 2406 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } -#line 7935 "MachineIndependent/glslang_tab.cpp" +#line 8617 "MachineIndependent/glslang_tab.cpp" break; - case 318: /* type_specifier_nonarray: F32MAT4X4 */ -#line 2339 "MachineIndependent/glslang.y" + case 327: /* type_specifier_nonarray: F32MAT4X4 */ +#line 2412 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7946 "MachineIndependent/glslang_tab.cpp" +#line 8628 "MachineIndependent/glslang_tab.cpp" break; - case 319: /* type_specifier_nonarray: F64MAT2 */ -#line 2345 "MachineIndependent/glslang.y" + case 328: /* type_specifier_nonarray: F64MAT2 */ +#line 2418 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 7957 "MachineIndependent/glslang_tab.cpp" +#line 8639 "MachineIndependent/glslang_tab.cpp" break; - case 320: /* type_specifier_nonarray: F64MAT3 */ -#line 2351 "MachineIndependent/glslang.y" + case 329: /* type_specifier_nonarray: F64MAT3 */ +#line 2424 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 7968 "MachineIndependent/glslang_tab.cpp" +#line 8650 "MachineIndependent/glslang_tab.cpp" break; - case 321: /* type_specifier_nonarray: F64MAT4 */ -#line 2357 "MachineIndependent/glslang.y" + case 330: /* type_specifier_nonarray: F64MAT4 */ +#line 2430 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 7979 "MachineIndependent/glslang_tab.cpp" +#line 8661 "MachineIndependent/glslang_tab.cpp" break; - case 322: /* type_specifier_nonarray: F64MAT2X2 */ -#line 2363 "MachineIndependent/glslang.y" + case 331: /* type_specifier_nonarray: F64MAT2X2 */ +#line 2436 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 7990 "MachineIndependent/glslang_tab.cpp" +#line 8672 "MachineIndependent/glslang_tab.cpp" break; - case 323: /* type_specifier_nonarray: F64MAT2X3 */ -#line 2369 "MachineIndependent/glslang.y" + case 332: /* type_specifier_nonarray: F64MAT2X3 */ +#line 2442 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 8001 "MachineIndependent/glslang_tab.cpp" +#line 8683 "MachineIndependent/glslang_tab.cpp" break; - case 324: /* type_specifier_nonarray: F64MAT2X4 */ -#line 2375 "MachineIndependent/glslang.y" + case 333: /* type_specifier_nonarray: F64MAT2X4 */ +#line 2448 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 8012 "MachineIndependent/glslang_tab.cpp" +#line 8694 "MachineIndependent/glslang_tab.cpp" break; - case 325: /* type_specifier_nonarray: F64MAT3X2 */ -#line 2381 "MachineIndependent/glslang.y" + case 334: /* type_specifier_nonarray: F64MAT3X2 */ +#line 2454 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 8023 "MachineIndependent/glslang_tab.cpp" +#line 8705 "MachineIndependent/glslang_tab.cpp" break; - case 326: /* type_specifier_nonarray: F64MAT3X3 */ -#line 2387 "MachineIndependent/glslang.y" + case 335: /* type_specifier_nonarray: F64MAT3X3 */ +#line 2460 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8034 "MachineIndependent/glslang_tab.cpp" +#line 8716 "MachineIndependent/glslang_tab.cpp" break; - case 327: /* type_specifier_nonarray: F64MAT3X4 */ -#line 2393 "MachineIndependent/glslang.y" + case 336: /* type_specifier_nonarray: F64MAT3X4 */ +#line 2466 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 8045 "MachineIndependent/glslang_tab.cpp" +#line 8727 "MachineIndependent/glslang_tab.cpp" break; - case 328: /* type_specifier_nonarray: F64MAT4X2 */ -#line 2399 "MachineIndependent/glslang.y" + case 337: /* type_specifier_nonarray: F64MAT4X2 */ +#line 2472 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 8056 "MachineIndependent/glslang_tab.cpp" +#line 8738 "MachineIndependent/glslang_tab.cpp" break; - case 329: /* type_specifier_nonarray: F64MAT4X3 */ -#line 2405 "MachineIndependent/glslang.y" + case 338: /* type_specifier_nonarray: F64MAT4X3 */ +#line 2478 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 8067 "MachineIndependent/glslang_tab.cpp" +#line 8749 "MachineIndependent/glslang_tab.cpp" break; - case 330: /* type_specifier_nonarray: F64MAT4X4 */ -#line 2411 "MachineIndependent/glslang.y" + case 339: /* type_specifier_nonarray: F64MAT4X4 */ +#line 2484 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8078 "MachineIndependent/glslang_tab.cpp" +#line 8760 "MachineIndependent/glslang_tab.cpp" break; - case 331: /* type_specifier_nonarray: ACCSTRUCTNV */ -#line 2417 "MachineIndependent/glslang.y" + case 340: /* type_specifier_nonarray: ACCSTRUCTNV */ +#line 2490 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8087 "MachineIndependent/glslang_tab.cpp" +#line 8769 "MachineIndependent/glslang_tab.cpp" break; - case 332: /* type_specifier_nonarray: ACCSTRUCTEXT */ -#line 2421 "MachineIndependent/glslang.y" + case 341: /* type_specifier_nonarray: ACCSTRUCTEXT */ +#line 2494 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8096 "MachineIndependent/glslang_tab.cpp" +#line 8778 "MachineIndependent/glslang_tab.cpp" break; - case 333: /* type_specifier_nonarray: RAYQUERYEXT */ -#line 2425 "MachineIndependent/glslang.y" + case 342: /* type_specifier_nonarray: RAYQUERYEXT */ +#line 2498 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtRayQuery; } -#line 8105 "MachineIndependent/glslang_tab.cpp" +#line 8787 "MachineIndependent/glslang_tab.cpp" break; - case 334: /* type_specifier_nonarray: ATOMIC_UINT */ -#line 2429 "MachineIndependent/glslang.y" + case 343: /* type_specifier_nonarray: ATOMIC_UINT */ +#line 2502 "MachineIndependent/glslang.y" { parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAtomicUint; } -#line 8115 "MachineIndependent/glslang_tab.cpp" +#line 8797 "MachineIndependent/glslang_tab.cpp" break; - case 335: /* type_specifier_nonarray: SAMPLER1D */ -#line 2434 "MachineIndependent/glslang.y" + case 344: /* type_specifier_nonarray: SAMPLER1D */ +#line 2507 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } -#line 8125 "MachineIndependent/glslang_tab.cpp" +#line 8807 "MachineIndependent/glslang_tab.cpp" break; - case 336: /* type_specifier_nonarray: SAMPLER2D */ -#line 2440 "MachineIndependent/glslang.y" + case 345: /* type_specifier_nonarray: SAMPLER2D */ +#line 2513 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } -#line 8135 "MachineIndependent/glslang_tab.cpp" +#line 8817 "MachineIndependent/glslang_tab.cpp" break; - case 337: /* type_specifier_nonarray: SAMPLER3D */ -#line 2445 "MachineIndependent/glslang.y" + case 346: /* type_specifier_nonarray: SAMPLER3D */ +#line 2518 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } -#line 8145 "MachineIndependent/glslang_tab.cpp" +#line 8827 "MachineIndependent/glslang_tab.cpp" break; - case 338: /* type_specifier_nonarray: SAMPLERCUBE */ -#line 2450 "MachineIndependent/glslang.y" + case 347: /* type_specifier_nonarray: SAMPLERCUBE */ +#line 2523 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } -#line 8155 "MachineIndependent/glslang_tab.cpp" +#line 8837 "MachineIndependent/glslang_tab.cpp" break; - case 339: /* type_specifier_nonarray: SAMPLER2DSHADOW */ -#line 2455 "MachineIndependent/glslang.y" + case 348: /* type_specifier_nonarray: SAMPLER2DSHADOW */ +#line 2528 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); } -#line 8165 "MachineIndependent/glslang_tab.cpp" +#line 8847 "MachineIndependent/glslang_tab.cpp" break; - case 340: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ -#line 2460 "MachineIndependent/glslang.y" + case 349: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ +#line 2533 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); } -#line 8175 "MachineIndependent/glslang_tab.cpp" +#line 8857 "MachineIndependent/glslang_tab.cpp" break; - case 341: /* type_specifier_nonarray: SAMPLER2DARRAY */ -#line 2465 "MachineIndependent/glslang.y" + case 350: /* type_specifier_nonarray: SAMPLER2DARRAY */ +#line 2538 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); } -#line 8185 "MachineIndependent/glslang_tab.cpp" +#line 8867 "MachineIndependent/glslang_tab.cpp" break; - case 342: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ -#line 2470 "MachineIndependent/glslang.y" + case 351: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ +#line 2543 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); } -#line 8195 "MachineIndependent/glslang_tab.cpp" +#line 8877 "MachineIndependent/glslang_tab.cpp" break; - case 343: /* type_specifier_nonarray: SAMPLER1DSHADOW */ -#line 2476 "MachineIndependent/glslang.y" + case 352: /* type_specifier_nonarray: SAMPLER1DSHADOW */ +#line 2549 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); } -#line 8205 "MachineIndependent/glslang_tab.cpp" +#line 8887 "MachineIndependent/glslang_tab.cpp" break; - case 344: /* type_specifier_nonarray: SAMPLER1DARRAY */ -#line 2481 "MachineIndependent/glslang.y" + case 353: /* type_specifier_nonarray: SAMPLER1DARRAY */ +#line 2554 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); } -#line 8215 "MachineIndependent/glslang_tab.cpp" +#line 8897 "MachineIndependent/glslang_tab.cpp" break; - case 345: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ -#line 2486 "MachineIndependent/glslang.y" + case 354: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ +#line 2559 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); } -#line 8225 "MachineIndependent/glslang_tab.cpp" +#line 8907 "MachineIndependent/glslang_tab.cpp" break; - case 346: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ -#line 2491 "MachineIndependent/glslang.y" + case 355: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ +#line 2564 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); } -#line 8235 "MachineIndependent/glslang_tab.cpp" +#line 8917 "MachineIndependent/glslang_tab.cpp" break; - case 347: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ -#line 2496 "MachineIndependent/glslang.y" + case 356: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ +#line 2569 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); } -#line 8245 "MachineIndependent/glslang_tab.cpp" +#line 8927 "MachineIndependent/glslang_tab.cpp" break; - case 348: /* type_specifier_nonarray: F16SAMPLER1D */ -#line 2501 "MachineIndependent/glslang.y" + case 357: /* type_specifier_nonarray: F16SAMPLER1D */ +#line 2574 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D); } -#line 8256 "MachineIndependent/glslang_tab.cpp" +#line 8938 "MachineIndependent/glslang_tab.cpp" break; - case 349: /* type_specifier_nonarray: F16SAMPLER2D */ -#line 2507 "MachineIndependent/glslang.y" + case 358: /* type_specifier_nonarray: F16SAMPLER2D */ +#line 2580 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D); } -#line 8267 "MachineIndependent/glslang_tab.cpp" +#line 8949 "MachineIndependent/glslang_tab.cpp" break; - case 350: /* type_specifier_nonarray: F16SAMPLER3D */ -#line 2513 "MachineIndependent/glslang.y" + case 359: /* type_specifier_nonarray: F16SAMPLER3D */ +#line 2586 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd3D); } -#line 8278 "MachineIndependent/glslang_tab.cpp" +#line 8960 "MachineIndependent/glslang_tab.cpp" break; - case 351: /* type_specifier_nonarray: F16SAMPLERCUBE */ -#line 2519 "MachineIndependent/glslang.y" + case 360: /* type_specifier_nonarray: F16SAMPLERCUBE */ +#line 2592 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube); } -#line 8289 "MachineIndependent/glslang_tab.cpp" +#line 8971 "MachineIndependent/glslang_tab.cpp" break; - case 352: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ -#line 2525 "MachineIndependent/glslang.y" + case 361: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ +#line 2598 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, false, true); } -#line 8300 "MachineIndependent/glslang_tab.cpp" +#line 8982 "MachineIndependent/glslang_tab.cpp" break; - case 353: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ -#line 2531 "MachineIndependent/glslang.y" + case 362: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ +#line 2604 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, true); } -#line 8311 "MachineIndependent/glslang_tab.cpp" +#line 8993 "MachineIndependent/glslang_tab.cpp" break; - case 354: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ -#line 2537 "MachineIndependent/glslang.y" + case 363: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ +#line 2610 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, false, true); } -#line 8322 "MachineIndependent/glslang_tab.cpp" +#line 9004 "MachineIndependent/glslang_tab.cpp" break; - case 355: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ -#line 2543 "MachineIndependent/glslang.y" + case 364: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ +#line 2616 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true); } -#line 8333 "MachineIndependent/glslang_tab.cpp" +#line 9015 "MachineIndependent/glslang_tab.cpp" break; - case 356: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ -#line 2549 "MachineIndependent/glslang.y" + case 365: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ +#line 2622 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true); } -#line 8344 "MachineIndependent/glslang_tab.cpp" +#line 9026 "MachineIndependent/glslang_tab.cpp" break; - case 357: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ -#line 2555 "MachineIndependent/glslang.y" + case 366: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ +#line 2628 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true, true); } -#line 8355 "MachineIndependent/glslang_tab.cpp" +#line 9037 "MachineIndependent/glslang_tab.cpp" break; - case 358: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ -#line 2561 "MachineIndependent/glslang.y" + case 367: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ +#line 2634 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, true); } -#line 8366 "MachineIndependent/glslang_tab.cpp" +#line 9048 "MachineIndependent/glslang_tab.cpp" break; - case 359: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ -#line 2567 "MachineIndependent/glslang.y" + case 368: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ +#line 2640 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true); } -#line 8377 "MachineIndependent/glslang_tab.cpp" +#line 9059 "MachineIndependent/glslang_tab.cpp" break; - case 360: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ -#line 2573 "MachineIndependent/glslang.y" + case 369: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ +#line 2646 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true, true); } -#line 8388 "MachineIndependent/glslang_tab.cpp" +#line 9070 "MachineIndependent/glslang_tab.cpp" break; - case 361: /* type_specifier_nonarray: ISAMPLER1D */ -#line 2579 "MachineIndependent/glslang.y" + case 370: /* type_specifier_nonarray: ISAMPLER1D */ +#line 2652 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D); } -#line 8398 "MachineIndependent/glslang_tab.cpp" +#line 9080 "MachineIndependent/glslang_tab.cpp" break; - case 362: /* type_specifier_nonarray: ISAMPLER2D */ -#line 2585 "MachineIndependent/glslang.y" + case 371: /* type_specifier_nonarray: ISAMPLER2D */ +#line 2658 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D); } -#line 8408 "MachineIndependent/glslang_tab.cpp" +#line 9090 "MachineIndependent/glslang_tab.cpp" break; - case 363: /* type_specifier_nonarray: ISAMPLER3D */ -#line 2590 "MachineIndependent/glslang.y" + case 372: /* type_specifier_nonarray: ISAMPLER3D */ +#line 2663 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd3D); } -#line 8418 "MachineIndependent/glslang_tab.cpp" +#line 9100 "MachineIndependent/glslang_tab.cpp" break; - case 364: /* type_specifier_nonarray: ISAMPLERCUBE */ -#line 2595 "MachineIndependent/glslang.y" + case 373: /* type_specifier_nonarray: ISAMPLERCUBE */ +#line 2668 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube); } -#line 8428 "MachineIndependent/glslang_tab.cpp" +#line 9110 "MachineIndependent/glslang_tab.cpp" break; - case 365: /* type_specifier_nonarray: ISAMPLER2DARRAY */ -#line 2600 "MachineIndependent/glslang.y" + case 374: /* type_specifier_nonarray: ISAMPLER2DARRAY */ +#line 2673 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); } -#line 8438 "MachineIndependent/glslang_tab.cpp" +#line 9120 "MachineIndependent/glslang_tab.cpp" break; - case 366: /* type_specifier_nonarray: USAMPLER2D */ -#line 2605 "MachineIndependent/glslang.y" + case 375: /* type_specifier_nonarray: USAMPLER2D */ +#line 2678 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D); } -#line 8448 "MachineIndependent/glslang_tab.cpp" +#line 9130 "MachineIndependent/glslang_tab.cpp" break; - case 367: /* type_specifier_nonarray: USAMPLER3D */ -#line 2610 "MachineIndependent/glslang.y" + case 376: /* type_specifier_nonarray: USAMPLER3D */ +#line 2683 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd3D); } -#line 8458 "MachineIndependent/glslang_tab.cpp" +#line 9140 "MachineIndependent/glslang_tab.cpp" break; - case 368: /* type_specifier_nonarray: USAMPLERCUBE */ -#line 2615 "MachineIndependent/glslang.y" + case 377: /* type_specifier_nonarray: USAMPLERCUBE */ +#line 2688 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube); } -#line 8468 "MachineIndependent/glslang_tab.cpp" +#line 9150 "MachineIndependent/glslang_tab.cpp" break; - case 369: /* type_specifier_nonarray: ISAMPLER1DARRAY */ -#line 2621 "MachineIndependent/glslang.y" + case 378: /* type_specifier_nonarray: ISAMPLER1DARRAY */ +#line 2694 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); } -#line 8478 "MachineIndependent/glslang_tab.cpp" +#line 9160 "MachineIndependent/glslang_tab.cpp" break; - case 370: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ -#line 2626 "MachineIndependent/glslang.y" + case 379: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ +#line 2699 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); } -#line 8488 "MachineIndependent/glslang_tab.cpp" +#line 9170 "MachineIndependent/glslang_tab.cpp" break; - case 371: /* type_specifier_nonarray: USAMPLER1D */ -#line 2631 "MachineIndependent/glslang.y" + case 380: /* type_specifier_nonarray: USAMPLER1D */ +#line 2704 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D); } -#line 8498 "MachineIndependent/glslang_tab.cpp" +#line 9180 "MachineIndependent/glslang_tab.cpp" break; - case 372: /* type_specifier_nonarray: USAMPLER1DARRAY */ -#line 2636 "MachineIndependent/glslang.y" + case 381: /* type_specifier_nonarray: USAMPLER1DARRAY */ +#line 2709 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); } -#line 8508 "MachineIndependent/glslang_tab.cpp" +#line 9190 "MachineIndependent/glslang_tab.cpp" break; - case 373: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ -#line 2641 "MachineIndependent/glslang.y" + case 382: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ +#line 2714 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); } -#line 8518 "MachineIndependent/glslang_tab.cpp" +#line 9200 "MachineIndependent/glslang_tab.cpp" break; - case 374: /* type_specifier_nonarray: TEXTURECUBEARRAY */ -#line 2646 "MachineIndependent/glslang.y" + case 383: /* type_specifier_nonarray: TEXTURECUBEARRAY */ +#line 2719 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); } -#line 8528 "MachineIndependent/glslang_tab.cpp" +#line 9210 "MachineIndependent/glslang_tab.cpp" break; - case 375: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ -#line 2651 "MachineIndependent/glslang.y" + case 384: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ +#line 2724 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); } -#line 8538 "MachineIndependent/glslang_tab.cpp" +#line 9220 "MachineIndependent/glslang_tab.cpp" break; - case 376: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ -#line 2656 "MachineIndependent/glslang.y" + case 385: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ +#line 2729 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); } -#line 8548 "MachineIndependent/glslang_tab.cpp" +#line 9230 "MachineIndependent/glslang_tab.cpp" break; - case 377: /* type_specifier_nonarray: USAMPLER2DARRAY */ -#line 2662 "MachineIndependent/glslang.y" + case 386: /* type_specifier_nonarray: USAMPLER2DARRAY */ +#line 2735 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); } -#line 8558 "MachineIndependent/glslang_tab.cpp" +#line 9240 "MachineIndependent/glslang_tab.cpp" break; - case 378: /* type_specifier_nonarray: TEXTURE2D */ -#line 2667 "MachineIndependent/glslang.y" + case 387: /* type_specifier_nonarray: TEXTURE2D */ +#line 2740 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } -#line 8568 "MachineIndependent/glslang_tab.cpp" +#line 9250 "MachineIndependent/glslang_tab.cpp" break; - case 379: /* type_specifier_nonarray: TEXTURE3D */ -#line 2672 "MachineIndependent/glslang.y" + case 388: /* type_specifier_nonarray: TEXTURE3D */ +#line 2745 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } -#line 8578 "MachineIndependent/glslang_tab.cpp" +#line 9260 "MachineIndependent/glslang_tab.cpp" break; - case 380: /* type_specifier_nonarray: TEXTURE2DARRAY */ -#line 2677 "MachineIndependent/glslang.y" + case 389: /* type_specifier_nonarray: TEXTURE2DARRAY */ +#line 2750 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); } -#line 8588 "MachineIndependent/glslang_tab.cpp" +#line 9270 "MachineIndependent/glslang_tab.cpp" break; - case 381: /* type_specifier_nonarray: TEXTURECUBE */ -#line 2682 "MachineIndependent/glslang.y" + case 390: /* type_specifier_nonarray: TEXTURECUBE */ +#line 2755 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } -#line 8598 "MachineIndependent/glslang_tab.cpp" +#line 9280 "MachineIndependent/glslang_tab.cpp" break; - case 382: /* type_specifier_nonarray: ITEXTURE2D */ -#line 2687 "MachineIndependent/glslang.y" + case 391: /* type_specifier_nonarray: ITEXTURE2D */ +#line 2760 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } -#line 8608 "MachineIndependent/glslang_tab.cpp" +#line 9290 "MachineIndependent/glslang_tab.cpp" break; - case 383: /* type_specifier_nonarray: ITEXTURE3D */ -#line 2692 "MachineIndependent/glslang.y" + case 392: /* type_specifier_nonarray: ITEXTURE3D */ +#line 2765 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } -#line 8618 "MachineIndependent/glslang_tab.cpp" +#line 9300 "MachineIndependent/glslang_tab.cpp" break; - case 384: /* type_specifier_nonarray: ITEXTURECUBE */ -#line 2697 "MachineIndependent/glslang.y" + case 393: /* type_specifier_nonarray: ITEXTURECUBE */ +#line 2770 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } -#line 8628 "MachineIndependent/glslang_tab.cpp" +#line 9310 "MachineIndependent/glslang_tab.cpp" break; - case 385: /* type_specifier_nonarray: ITEXTURE2DARRAY */ -#line 2702 "MachineIndependent/glslang.y" + case 394: /* type_specifier_nonarray: ITEXTURE2DARRAY */ +#line 2775 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); } -#line 8638 "MachineIndependent/glslang_tab.cpp" +#line 9320 "MachineIndependent/glslang_tab.cpp" break; - case 386: /* type_specifier_nonarray: UTEXTURE2D */ -#line 2707 "MachineIndependent/glslang.y" + case 395: /* type_specifier_nonarray: UTEXTURE2D */ +#line 2780 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } -#line 8648 "MachineIndependent/glslang_tab.cpp" +#line 9330 "MachineIndependent/glslang_tab.cpp" break; - case 387: /* type_specifier_nonarray: UTEXTURE3D */ -#line 2712 "MachineIndependent/glslang.y" + case 396: /* type_specifier_nonarray: UTEXTURE3D */ +#line 2785 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } -#line 8658 "MachineIndependent/glslang_tab.cpp" +#line 9340 "MachineIndependent/glslang_tab.cpp" break; - case 388: /* type_specifier_nonarray: UTEXTURECUBE */ -#line 2717 "MachineIndependent/glslang.y" + case 397: /* type_specifier_nonarray: UTEXTURECUBE */ +#line 2790 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } -#line 8668 "MachineIndependent/glslang_tab.cpp" +#line 9350 "MachineIndependent/glslang_tab.cpp" break; - case 389: /* type_specifier_nonarray: UTEXTURE2DARRAY */ -#line 2722 "MachineIndependent/glslang.y" + case 398: /* type_specifier_nonarray: UTEXTURE2DARRAY */ +#line 2795 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); } -#line 8678 "MachineIndependent/glslang_tab.cpp" +#line 9360 "MachineIndependent/glslang_tab.cpp" break; - case 390: /* type_specifier_nonarray: SAMPLER */ -#line 2727 "MachineIndependent/glslang.y" + case 399: /* type_specifier_nonarray: SAMPLER */ +#line 2800 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(false); } -#line 8688 "MachineIndependent/glslang_tab.cpp" +#line 9370 "MachineIndependent/glslang_tab.cpp" break; - case 391: /* type_specifier_nonarray: SAMPLERSHADOW */ -#line 2732 "MachineIndependent/glslang.y" + case 400: /* type_specifier_nonarray: SAMPLERSHADOW */ +#line 2805 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(true); } -#line 8698 "MachineIndependent/glslang_tab.cpp" +#line 9380 "MachineIndependent/glslang_tab.cpp" break; - case 392: /* type_specifier_nonarray: SAMPLER2DRECT */ -#line 2738 "MachineIndependent/glslang.y" + case 401: /* type_specifier_nonarray: SAMPLER2DRECT */ +#line 2811 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } -#line 8708 "MachineIndependent/glslang_tab.cpp" +#line 9390 "MachineIndependent/glslang_tab.cpp" break; - case 393: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ -#line 2743 "MachineIndependent/glslang.y" + case 402: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ +#line 2816 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); } -#line 8718 "MachineIndependent/glslang_tab.cpp" +#line 9400 "MachineIndependent/glslang_tab.cpp" break; - case 394: /* type_specifier_nonarray: F16SAMPLER2DRECT */ -#line 2748 "MachineIndependent/glslang.y" + case 403: /* type_specifier_nonarray: F16SAMPLER2DRECT */ +#line 2821 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdRect); } -#line 8729 "MachineIndependent/glslang_tab.cpp" +#line 9411 "MachineIndependent/glslang_tab.cpp" break; - case 395: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ -#line 2754 "MachineIndependent/glslang.y" + case 404: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ +#line 2827 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true); } -#line 8740 "MachineIndependent/glslang_tab.cpp" +#line 9422 "MachineIndependent/glslang_tab.cpp" break; - case 396: /* type_specifier_nonarray: ISAMPLER2DRECT */ -#line 2760 "MachineIndependent/glslang.y" + case 405: /* type_specifier_nonarray: ISAMPLER2DRECT */ +#line 2833 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdRect); } -#line 8750 "MachineIndependent/glslang_tab.cpp" +#line 9432 "MachineIndependent/glslang_tab.cpp" break; - case 397: /* type_specifier_nonarray: USAMPLER2DRECT */ -#line 2765 "MachineIndependent/glslang.y" + case 406: /* type_specifier_nonarray: USAMPLER2DRECT */ +#line 2838 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdRect); } -#line 8760 "MachineIndependent/glslang_tab.cpp" +#line 9442 "MachineIndependent/glslang_tab.cpp" break; - case 398: /* type_specifier_nonarray: SAMPLERBUFFER */ -#line 2770 "MachineIndependent/glslang.y" + case 407: /* type_specifier_nonarray: SAMPLERBUFFER */ +#line 2843 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } -#line 8770 "MachineIndependent/glslang_tab.cpp" +#line 9452 "MachineIndependent/glslang_tab.cpp" break; - case 399: /* type_specifier_nonarray: F16SAMPLERBUFFER */ -#line 2775 "MachineIndependent/glslang.y" + case 408: /* type_specifier_nonarray: F16SAMPLERBUFFER */ +#line 2848 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer); } -#line 8781 "MachineIndependent/glslang_tab.cpp" +#line 9463 "MachineIndependent/glslang_tab.cpp" break; - case 400: /* type_specifier_nonarray: ISAMPLERBUFFER */ -#line 2781 "MachineIndependent/glslang.y" + case 409: /* type_specifier_nonarray: ISAMPLERBUFFER */ +#line 2854 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } -#line 8791 "MachineIndependent/glslang_tab.cpp" +#line 9473 "MachineIndependent/glslang_tab.cpp" break; - case 401: /* type_specifier_nonarray: USAMPLERBUFFER */ -#line 2786 "MachineIndependent/glslang.y" + case 410: /* type_specifier_nonarray: USAMPLERBUFFER */ +#line 2859 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } -#line 8801 "MachineIndependent/glslang_tab.cpp" +#line 9483 "MachineIndependent/glslang_tab.cpp" break; - case 402: /* type_specifier_nonarray: SAMPLER2DMS */ -#line 2791 "MachineIndependent/glslang.y" + case 411: /* type_specifier_nonarray: SAMPLER2DMS */ +#line 2864 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); } -#line 8811 "MachineIndependent/glslang_tab.cpp" +#line 9493 "MachineIndependent/glslang_tab.cpp" break; - case 403: /* type_specifier_nonarray: F16SAMPLER2DMS */ -#line 2796 "MachineIndependent/glslang.y" + case 412: /* type_specifier_nonarray: F16SAMPLER2DMS */ +#line 2869 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true); } -#line 8822 "MachineIndependent/glslang_tab.cpp" +#line 9504 "MachineIndependent/glslang_tab.cpp" break; - case 404: /* type_specifier_nonarray: ISAMPLER2DMS */ -#line 2802 "MachineIndependent/glslang.y" + case 413: /* type_specifier_nonarray: ISAMPLER2DMS */ +#line 2875 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } -#line 8832 "MachineIndependent/glslang_tab.cpp" +#line 9514 "MachineIndependent/glslang_tab.cpp" break; - case 405: /* type_specifier_nonarray: USAMPLER2DMS */ -#line 2807 "MachineIndependent/glslang.y" + case 414: /* type_specifier_nonarray: USAMPLER2DMS */ +#line 2880 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } -#line 8842 "MachineIndependent/glslang_tab.cpp" +#line 9524 "MachineIndependent/glslang_tab.cpp" break; - case 406: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ -#line 2812 "MachineIndependent/glslang.y" + case 415: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ +#line 2885 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); } -#line 8852 "MachineIndependent/glslang_tab.cpp" +#line 9534 "MachineIndependent/glslang_tab.cpp" break; - case 407: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ -#line 2817 "MachineIndependent/glslang.y" + case 416: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ +#line 2890 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true); } -#line 8863 "MachineIndependent/glslang_tab.cpp" +#line 9545 "MachineIndependent/glslang_tab.cpp" break; - case 408: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ -#line 2823 "MachineIndependent/glslang.y" + case 417: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ +#line 2896 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } -#line 8873 "MachineIndependent/glslang_tab.cpp" +#line 9555 "MachineIndependent/glslang_tab.cpp" break; - case 409: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ -#line 2828 "MachineIndependent/glslang.y" + case 418: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ +#line 2901 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } -#line 8883 "MachineIndependent/glslang_tab.cpp" +#line 9565 "MachineIndependent/glslang_tab.cpp" break; - case 410: /* type_specifier_nonarray: TEXTURE1D */ -#line 2833 "MachineIndependent/glslang.y" + case 419: /* type_specifier_nonarray: TEXTURE1D */ +#line 2906 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } -#line 8893 "MachineIndependent/glslang_tab.cpp" +#line 9575 "MachineIndependent/glslang_tab.cpp" break; - case 411: /* type_specifier_nonarray: F16TEXTURE1D */ -#line 2838 "MachineIndependent/glslang.y" + case 420: /* type_specifier_nonarray: F16TEXTURE1D */ +#line 2911 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D); } -#line 8904 "MachineIndependent/glslang_tab.cpp" +#line 9586 "MachineIndependent/glslang_tab.cpp" break; - case 412: /* type_specifier_nonarray: F16TEXTURE2D */ -#line 2844 "MachineIndependent/glslang.y" + case 421: /* type_specifier_nonarray: F16TEXTURE2D */ +#line 2917 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D); } -#line 8915 "MachineIndependent/glslang_tab.cpp" +#line 9597 "MachineIndependent/glslang_tab.cpp" break; - case 413: /* type_specifier_nonarray: F16TEXTURE3D */ -#line 2850 "MachineIndependent/glslang.y" + case 422: /* type_specifier_nonarray: F16TEXTURE3D */ +#line 2923 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D); } -#line 8926 "MachineIndependent/glslang_tab.cpp" +#line 9608 "MachineIndependent/glslang_tab.cpp" break; - case 414: /* type_specifier_nonarray: F16TEXTURECUBE */ -#line 2856 "MachineIndependent/glslang.y" + case 423: /* type_specifier_nonarray: F16TEXTURECUBE */ +#line 2929 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube); } -#line 8937 "MachineIndependent/glslang_tab.cpp" +#line 9619 "MachineIndependent/glslang_tab.cpp" break; - case 415: /* type_specifier_nonarray: TEXTURE1DARRAY */ -#line 2862 "MachineIndependent/glslang.y" + case 424: /* type_specifier_nonarray: TEXTURE1DARRAY */ +#line 2935 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); } -#line 8947 "MachineIndependent/glslang_tab.cpp" +#line 9629 "MachineIndependent/glslang_tab.cpp" break; - case 416: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ -#line 2867 "MachineIndependent/glslang.y" + case 425: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ +#line 2940 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true); } -#line 8958 "MachineIndependent/glslang_tab.cpp" +#line 9640 "MachineIndependent/glslang_tab.cpp" break; - case 417: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ -#line 2873 "MachineIndependent/glslang.y" + case 426: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ +#line 2946 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true); } -#line 8969 "MachineIndependent/glslang_tab.cpp" +#line 9651 "MachineIndependent/glslang_tab.cpp" break; - case 418: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ -#line 2879 "MachineIndependent/glslang.y" + case 427: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ +#line 2952 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true); } -#line 8980 "MachineIndependent/glslang_tab.cpp" +#line 9662 "MachineIndependent/glslang_tab.cpp" break; - case 419: /* type_specifier_nonarray: ITEXTURE1D */ -#line 2885 "MachineIndependent/glslang.y" + case 428: /* type_specifier_nonarray: ITEXTURE1D */ +#line 2958 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } -#line 8990 "MachineIndependent/glslang_tab.cpp" +#line 9672 "MachineIndependent/glslang_tab.cpp" break; - case 420: /* type_specifier_nonarray: ITEXTURE1DARRAY */ -#line 2890 "MachineIndependent/glslang.y" + case 429: /* type_specifier_nonarray: ITEXTURE1DARRAY */ +#line 2963 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); } -#line 9000 "MachineIndependent/glslang_tab.cpp" +#line 9682 "MachineIndependent/glslang_tab.cpp" break; - case 421: /* type_specifier_nonarray: UTEXTURE1D */ -#line 2895 "MachineIndependent/glslang.y" + case 430: /* type_specifier_nonarray: UTEXTURE1D */ +#line 2968 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } -#line 9010 "MachineIndependent/glslang_tab.cpp" +#line 9692 "MachineIndependent/glslang_tab.cpp" break; - case 422: /* type_specifier_nonarray: UTEXTURE1DARRAY */ -#line 2900 "MachineIndependent/glslang.y" + case 431: /* type_specifier_nonarray: UTEXTURE1DARRAY */ +#line 2973 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); } -#line 9020 "MachineIndependent/glslang_tab.cpp" +#line 9702 "MachineIndependent/glslang_tab.cpp" break; - case 423: /* type_specifier_nonarray: TEXTURE2DRECT */ -#line 2905 "MachineIndependent/glslang.y" + case 432: /* type_specifier_nonarray: TEXTURE2DRECT */ +#line 2978 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } -#line 9030 "MachineIndependent/glslang_tab.cpp" +#line 9712 "MachineIndependent/glslang_tab.cpp" break; - case 424: /* type_specifier_nonarray: F16TEXTURE2DRECT */ -#line 2910 "MachineIndependent/glslang.y" + case 433: /* type_specifier_nonarray: F16TEXTURE2DRECT */ +#line 2983 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdRect); } -#line 9041 "MachineIndependent/glslang_tab.cpp" +#line 9723 "MachineIndependent/glslang_tab.cpp" break; - case 425: /* type_specifier_nonarray: ITEXTURE2DRECT */ -#line 2916 "MachineIndependent/glslang.y" + case 434: /* type_specifier_nonarray: ITEXTURE2DRECT */ +#line 2989 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } -#line 9051 "MachineIndependent/glslang_tab.cpp" +#line 9733 "MachineIndependent/glslang_tab.cpp" break; - case 426: /* type_specifier_nonarray: UTEXTURE2DRECT */ -#line 2921 "MachineIndependent/glslang.y" + case 435: /* type_specifier_nonarray: UTEXTURE2DRECT */ +#line 2994 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } -#line 9061 "MachineIndependent/glslang_tab.cpp" +#line 9743 "MachineIndependent/glslang_tab.cpp" break; - case 427: /* type_specifier_nonarray: TEXTUREBUFFER */ -#line 2926 "MachineIndependent/glslang.y" + case 436: /* type_specifier_nonarray: TEXTUREBUFFER */ +#line 2999 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } -#line 9071 "MachineIndependent/glslang_tab.cpp" +#line 9753 "MachineIndependent/glslang_tab.cpp" break; - case 428: /* type_specifier_nonarray: F16TEXTUREBUFFER */ -#line 2931 "MachineIndependent/glslang.y" + case 437: /* type_specifier_nonarray: F16TEXTUREBUFFER */ +#line 3004 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdBuffer); } -#line 9082 "MachineIndependent/glslang_tab.cpp" +#line 9764 "MachineIndependent/glslang_tab.cpp" break; - case 429: /* type_specifier_nonarray: ITEXTUREBUFFER */ -#line 2937 "MachineIndependent/glslang.y" + case 438: /* type_specifier_nonarray: ITEXTUREBUFFER */ +#line 3010 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } -#line 9092 "MachineIndependent/glslang_tab.cpp" +#line 9774 "MachineIndependent/glslang_tab.cpp" break; - case 430: /* type_specifier_nonarray: UTEXTUREBUFFER */ -#line 2942 "MachineIndependent/glslang.y" + case 439: /* type_specifier_nonarray: UTEXTUREBUFFER */ +#line 3015 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } -#line 9102 "MachineIndependent/glslang_tab.cpp" +#line 9784 "MachineIndependent/glslang_tab.cpp" break; - case 431: /* type_specifier_nonarray: TEXTURE2DMS */ -#line 2947 "MachineIndependent/glslang.y" + case 440: /* type_specifier_nonarray: TEXTURE2DMS */ +#line 3020 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); } -#line 9112 "MachineIndependent/glslang_tab.cpp" +#line 9794 "MachineIndependent/glslang_tab.cpp" break; - case 432: /* type_specifier_nonarray: F16TEXTURE2DMS */ -#line 2952 "MachineIndependent/glslang.y" + case 441: /* type_specifier_nonarray: F16TEXTURE2DMS */ +#line 3025 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, false, false, true); } -#line 9123 "MachineIndependent/glslang_tab.cpp" +#line 9805 "MachineIndependent/glslang_tab.cpp" break; - case 433: /* type_specifier_nonarray: ITEXTURE2DMS */ -#line 2958 "MachineIndependent/glslang.y" + case 442: /* type_specifier_nonarray: ITEXTURE2DMS */ +#line 3031 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } -#line 9133 "MachineIndependent/glslang_tab.cpp" +#line 9815 "MachineIndependent/glslang_tab.cpp" break; - case 434: /* type_specifier_nonarray: UTEXTURE2DMS */ -#line 2963 "MachineIndependent/glslang.y" + case 443: /* type_specifier_nonarray: UTEXTURE2DMS */ +#line 3036 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } -#line 9143 "MachineIndependent/glslang_tab.cpp" +#line 9825 "MachineIndependent/glslang_tab.cpp" break; - case 435: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ -#line 2968 "MachineIndependent/glslang.y" + case 444: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ +#line 3041 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); } -#line 9153 "MachineIndependent/glslang_tab.cpp" +#line 9835 "MachineIndependent/glslang_tab.cpp" break; - case 436: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ -#line 2973 "MachineIndependent/glslang.y" + case 445: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ +#line 3046 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true, false, true); } -#line 9164 "MachineIndependent/glslang_tab.cpp" +#line 9846 "MachineIndependent/glslang_tab.cpp" break; - case 437: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ -#line 2979 "MachineIndependent/glslang.y" + case 446: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ +#line 3052 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } -#line 9174 "MachineIndependent/glslang_tab.cpp" +#line 9856 "MachineIndependent/glslang_tab.cpp" break; - case 438: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ -#line 2984 "MachineIndependent/glslang.y" + case 447: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ +#line 3057 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } -#line 9184 "MachineIndependent/glslang_tab.cpp" +#line 9866 "MachineIndependent/glslang_tab.cpp" break; - case 439: /* type_specifier_nonarray: IMAGE1D */ -#line 2989 "MachineIndependent/glslang.y" + case 448: /* type_specifier_nonarray: IMAGE1D */ +#line 3062 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } -#line 9194 "MachineIndependent/glslang_tab.cpp" +#line 9876 "MachineIndependent/glslang_tab.cpp" break; - case 440: /* type_specifier_nonarray: F16IMAGE1D */ -#line 2994 "MachineIndependent/glslang.y" + case 449: /* type_specifier_nonarray: F16IMAGE1D */ +#line 3067 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D); } -#line 9205 "MachineIndependent/glslang_tab.cpp" +#line 9887 "MachineIndependent/glslang_tab.cpp" break; - case 441: /* type_specifier_nonarray: IIMAGE1D */ -#line 3000 "MachineIndependent/glslang.y" + case 450: /* type_specifier_nonarray: IIMAGE1D */ +#line 3073 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } -#line 9215 "MachineIndependent/glslang_tab.cpp" +#line 9897 "MachineIndependent/glslang_tab.cpp" break; - case 442: /* type_specifier_nonarray: UIMAGE1D */ -#line 3005 "MachineIndependent/glslang.y" + case 451: /* type_specifier_nonarray: UIMAGE1D */ +#line 3078 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } -#line 9225 "MachineIndependent/glslang_tab.cpp" +#line 9907 "MachineIndependent/glslang_tab.cpp" break; - case 443: /* type_specifier_nonarray: IMAGE2D */ -#line 3010 "MachineIndependent/glslang.y" + case 452: /* type_specifier_nonarray: IMAGE2D */ +#line 3083 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } -#line 9235 "MachineIndependent/glslang_tab.cpp" +#line 9917 "MachineIndependent/glslang_tab.cpp" break; - case 444: /* type_specifier_nonarray: F16IMAGE2D */ -#line 3015 "MachineIndependent/glslang.y" + case 453: /* type_specifier_nonarray: F16IMAGE2D */ +#line 3088 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D); } -#line 9246 "MachineIndependent/glslang_tab.cpp" +#line 9928 "MachineIndependent/glslang_tab.cpp" break; - case 445: /* type_specifier_nonarray: IIMAGE2D */ -#line 3021 "MachineIndependent/glslang.y" + case 454: /* type_specifier_nonarray: IIMAGE2D */ +#line 3094 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } -#line 9256 "MachineIndependent/glslang_tab.cpp" +#line 9938 "MachineIndependent/glslang_tab.cpp" break; - case 446: /* type_specifier_nonarray: UIMAGE2D */ -#line 3026 "MachineIndependent/glslang.y" + case 455: /* type_specifier_nonarray: UIMAGE2D */ +#line 3099 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } -#line 9266 "MachineIndependent/glslang_tab.cpp" +#line 9948 "MachineIndependent/glslang_tab.cpp" break; - case 447: /* type_specifier_nonarray: IMAGE3D */ -#line 3031 "MachineIndependent/glslang.y" + case 456: /* type_specifier_nonarray: IMAGE3D */ +#line 3104 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } -#line 9276 "MachineIndependent/glslang_tab.cpp" +#line 9958 "MachineIndependent/glslang_tab.cpp" break; - case 448: /* type_specifier_nonarray: F16IMAGE3D */ -#line 3036 "MachineIndependent/glslang.y" + case 457: /* type_specifier_nonarray: F16IMAGE3D */ +#line 3109 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd3D); } -#line 9287 "MachineIndependent/glslang_tab.cpp" +#line 9969 "MachineIndependent/glslang_tab.cpp" break; - case 449: /* type_specifier_nonarray: IIMAGE3D */ -#line 3042 "MachineIndependent/glslang.y" + case 458: /* type_specifier_nonarray: IIMAGE3D */ +#line 3115 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } -#line 9297 "MachineIndependent/glslang_tab.cpp" +#line 9979 "MachineIndependent/glslang_tab.cpp" break; - case 450: /* type_specifier_nonarray: UIMAGE3D */ -#line 3047 "MachineIndependent/glslang.y" + case 459: /* type_specifier_nonarray: UIMAGE3D */ +#line 3120 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } -#line 9307 "MachineIndependent/glslang_tab.cpp" +#line 9989 "MachineIndependent/glslang_tab.cpp" break; - case 451: /* type_specifier_nonarray: IMAGE2DRECT */ -#line 3052 "MachineIndependent/glslang.y" + case 460: /* type_specifier_nonarray: IMAGE2DRECT */ +#line 3125 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } -#line 9317 "MachineIndependent/glslang_tab.cpp" +#line 9999 "MachineIndependent/glslang_tab.cpp" break; - case 452: /* type_specifier_nonarray: F16IMAGE2DRECT */ -#line 3057 "MachineIndependent/glslang.y" + case 461: /* type_specifier_nonarray: F16IMAGE2DRECT */ +#line 3130 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdRect); } -#line 9328 "MachineIndependent/glslang_tab.cpp" +#line 10010 "MachineIndependent/glslang_tab.cpp" break; - case 453: /* type_specifier_nonarray: IIMAGE2DRECT */ -#line 3063 "MachineIndependent/glslang.y" + case 462: /* type_specifier_nonarray: IIMAGE2DRECT */ +#line 3136 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } -#line 9338 "MachineIndependent/glslang_tab.cpp" +#line 10020 "MachineIndependent/glslang_tab.cpp" break; - case 454: /* type_specifier_nonarray: UIMAGE2DRECT */ -#line 3068 "MachineIndependent/glslang.y" + case 463: /* type_specifier_nonarray: UIMAGE2DRECT */ +#line 3141 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } -#line 9348 "MachineIndependent/glslang_tab.cpp" +#line 10030 "MachineIndependent/glslang_tab.cpp" break; - case 455: /* type_specifier_nonarray: IMAGECUBE */ -#line 3073 "MachineIndependent/glslang.y" + case 464: /* type_specifier_nonarray: IMAGECUBE */ +#line 3146 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } -#line 9358 "MachineIndependent/glslang_tab.cpp" +#line 10040 "MachineIndependent/glslang_tab.cpp" break; - case 456: /* type_specifier_nonarray: F16IMAGECUBE */ -#line 3078 "MachineIndependent/glslang.y" + case 465: /* type_specifier_nonarray: F16IMAGECUBE */ +#line 3151 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube); } -#line 9369 "MachineIndependent/glslang_tab.cpp" +#line 10051 "MachineIndependent/glslang_tab.cpp" break; - case 457: /* type_specifier_nonarray: IIMAGECUBE */ -#line 3084 "MachineIndependent/glslang.y" + case 466: /* type_specifier_nonarray: IIMAGECUBE */ +#line 3157 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } -#line 9379 "MachineIndependent/glslang_tab.cpp" +#line 10061 "MachineIndependent/glslang_tab.cpp" break; - case 458: /* type_specifier_nonarray: UIMAGECUBE */ -#line 3089 "MachineIndependent/glslang.y" + case 467: /* type_specifier_nonarray: UIMAGECUBE */ +#line 3162 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } -#line 9389 "MachineIndependent/glslang_tab.cpp" +#line 10071 "MachineIndependent/glslang_tab.cpp" break; - case 459: /* type_specifier_nonarray: IMAGEBUFFER */ -#line 3094 "MachineIndependent/glslang.y" + case 468: /* type_specifier_nonarray: IMAGEBUFFER */ +#line 3167 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } -#line 9399 "MachineIndependent/glslang_tab.cpp" +#line 10081 "MachineIndependent/glslang_tab.cpp" break; - case 460: /* type_specifier_nonarray: F16IMAGEBUFFER */ -#line 3099 "MachineIndependent/glslang.y" + case 469: /* type_specifier_nonarray: F16IMAGEBUFFER */ +#line 3172 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdBuffer); } -#line 9410 "MachineIndependent/glslang_tab.cpp" +#line 10092 "MachineIndependent/glslang_tab.cpp" break; - case 461: /* type_specifier_nonarray: IIMAGEBUFFER */ -#line 3105 "MachineIndependent/glslang.y" + case 470: /* type_specifier_nonarray: IIMAGEBUFFER */ +#line 3178 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } -#line 9420 "MachineIndependent/glslang_tab.cpp" +#line 10102 "MachineIndependent/glslang_tab.cpp" break; - case 462: /* type_specifier_nonarray: UIMAGEBUFFER */ -#line 3110 "MachineIndependent/glslang.y" + case 471: /* type_specifier_nonarray: UIMAGEBUFFER */ +#line 3183 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } -#line 9430 "MachineIndependent/glslang_tab.cpp" +#line 10112 "MachineIndependent/glslang_tab.cpp" break; - case 463: /* type_specifier_nonarray: IMAGE1DARRAY */ -#line 3115 "MachineIndependent/glslang.y" + case 472: /* type_specifier_nonarray: IMAGE1DARRAY */ +#line 3188 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); } -#line 9440 "MachineIndependent/glslang_tab.cpp" +#line 10122 "MachineIndependent/glslang_tab.cpp" break; - case 464: /* type_specifier_nonarray: F16IMAGE1DARRAY */ -#line 3120 "MachineIndependent/glslang.y" + case 473: /* type_specifier_nonarray: F16IMAGE1DARRAY */ +#line 3193 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D, true); } -#line 9451 "MachineIndependent/glslang_tab.cpp" +#line 10133 "MachineIndependent/glslang_tab.cpp" break; - case 465: /* type_specifier_nonarray: IIMAGE1DARRAY */ -#line 3126 "MachineIndependent/glslang.y" + case 474: /* type_specifier_nonarray: IIMAGE1DARRAY */ +#line 3199 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } -#line 9461 "MachineIndependent/glslang_tab.cpp" +#line 10143 "MachineIndependent/glslang_tab.cpp" break; - case 466: /* type_specifier_nonarray: UIMAGE1DARRAY */ -#line 3131 "MachineIndependent/glslang.y" + case 475: /* type_specifier_nonarray: UIMAGE1DARRAY */ +#line 3204 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } -#line 9471 "MachineIndependent/glslang_tab.cpp" +#line 10153 "MachineIndependent/glslang_tab.cpp" break; - case 467: /* type_specifier_nonarray: IMAGE2DARRAY */ -#line 3136 "MachineIndependent/glslang.y" + case 476: /* type_specifier_nonarray: IMAGE2DARRAY */ +#line 3209 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); } -#line 9481 "MachineIndependent/glslang_tab.cpp" +#line 10163 "MachineIndependent/glslang_tab.cpp" break; - case 468: /* type_specifier_nonarray: F16IMAGE2DARRAY */ -#line 3141 "MachineIndependent/glslang.y" + case 477: /* type_specifier_nonarray: F16IMAGE2DARRAY */ +#line 3214 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true); } -#line 9492 "MachineIndependent/glslang_tab.cpp" +#line 10174 "MachineIndependent/glslang_tab.cpp" break; - case 469: /* type_specifier_nonarray: IIMAGE2DARRAY */ -#line 3147 "MachineIndependent/glslang.y" + case 478: /* type_specifier_nonarray: IIMAGE2DARRAY */ +#line 3220 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } -#line 9502 "MachineIndependent/glslang_tab.cpp" +#line 10184 "MachineIndependent/glslang_tab.cpp" break; - case 470: /* type_specifier_nonarray: UIMAGE2DARRAY */ -#line 3152 "MachineIndependent/glslang.y" + case 479: /* type_specifier_nonarray: UIMAGE2DARRAY */ +#line 3225 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); } -#line 9512 "MachineIndependent/glslang_tab.cpp" +#line 10194 "MachineIndependent/glslang_tab.cpp" break; - case 471: /* type_specifier_nonarray: IMAGECUBEARRAY */ -#line 3157 "MachineIndependent/glslang.y" + case 480: /* type_specifier_nonarray: IMAGECUBEARRAY */ +#line 3230 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); } -#line 9522 "MachineIndependent/glslang_tab.cpp" +#line 10204 "MachineIndependent/glslang_tab.cpp" break; - case 472: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ -#line 3162 "MachineIndependent/glslang.y" + case 481: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ +#line 3235 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube, true); } -#line 9533 "MachineIndependent/glslang_tab.cpp" +#line 10215 "MachineIndependent/glslang_tab.cpp" break; - case 473: /* type_specifier_nonarray: IIMAGECUBEARRAY */ -#line 3168 "MachineIndependent/glslang.y" + case 482: /* type_specifier_nonarray: IIMAGECUBEARRAY */ +#line 3241 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); } -#line 9543 "MachineIndependent/glslang_tab.cpp" +#line 10225 "MachineIndependent/glslang_tab.cpp" break; - case 474: /* type_specifier_nonarray: UIMAGECUBEARRAY */ -#line 3173 "MachineIndependent/glslang.y" + case 483: /* type_specifier_nonarray: UIMAGECUBEARRAY */ +#line 3246 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); } -#line 9553 "MachineIndependent/glslang_tab.cpp" +#line 10235 "MachineIndependent/glslang_tab.cpp" break; - case 475: /* type_specifier_nonarray: IMAGE2DMS */ -#line 3178 "MachineIndependent/glslang.y" + case 484: /* type_specifier_nonarray: IMAGE2DMS */ +#line 3251 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); } -#line 9563 "MachineIndependent/glslang_tab.cpp" +#line 10245 "MachineIndependent/glslang_tab.cpp" break; - case 476: /* type_specifier_nonarray: F16IMAGE2DMS */ -#line 3183 "MachineIndependent/glslang.y" + case 485: /* type_specifier_nonarray: F16IMAGE2DMS */ +#line 3256 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, false, false, true); } -#line 9574 "MachineIndependent/glslang_tab.cpp" +#line 10256 "MachineIndependent/glslang_tab.cpp" break; - case 477: /* type_specifier_nonarray: IIMAGE2DMS */ -#line 3189 "MachineIndependent/glslang.y" + case 486: /* type_specifier_nonarray: IIMAGE2DMS */ +#line 3262 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); } -#line 9584 "MachineIndependent/glslang_tab.cpp" +#line 10266 "MachineIndependent/glslang_tab.cpp" break; - case 478: /* type_specifier_nonarray: UIMAGE2DMS */ -#line 3194 "MachineIndependent/glslang.y" + case 487: /* type_specifier_nonarray: UIMAGE2DMS */ +#line 3267 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); } -#line 9594 "MachineIndependent/glslang_tab.cpp" +#line 10276 "MachineIndependent/glslang_tab.cpp" break; - case 479: /* type_specifier_nonarray: IMAGE2DMSARRAY */ -#line 3199 "MachineIndependent/glslang.y" + case 488: /* type_specifier_nonarray: IMAGE2DMSARRAY */ +#line 3272 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); } -#line 9604 "MachineIndependent/glslang_tab.cpp" +#line 10286 "MachineIndependent/glslang_tab.cpp" break; - case 480: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ -#line 3204 "MachineIndependent/glslang.y" + case 489: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ +#line 3277 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true, false, true); } -#line 9615 "MachineIndependent/glslang_tab.cpp" +#line 10297 "MachineIndependent/glslang_tab.cpp" break; - case 481: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ -#line 3210 "MachineIndependent/glslang.y" + case 490: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ +#line 3283 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); } -#line 9625 "MachineIndependent/glslang_tab.cpp" +#line 10307 "MachineIndependent/glslang_tab.cpp" break; - case 482: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ -#line 3215 "MachineIndependent/glslang.y" + case 491: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ +#line 3288 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); } -#line 9635 "MachineIndependent/glslang_tab.cpp" +#line 10317 "MachineIndependent/glslang_tab.cpp" break; - case 483: /* type_specifier_nonarray: I64IMAGE1D */ -#line 3220 "MachineIndependent/glslang.y" + case 492: /* type_specifier_nonarray: I64IMAGE1D */ +#line 3293 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D); } -#line 9645 "MachineIndependent/glslang_tab.cpp" +#line 10327 "MachineIndependent/glslang_tab.cpp" break; - case 484: /* type_specifier_nonarray: U64IMAGE1D */ -#line 3225 "MachineIndependent/glslang.y" + case 493: /* type_specifier_nonarray: U64IMAGE1D */ +#line 3298 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D); } -#line 9655 "MachineIndependent/glslang_tab.cpp" +#line 10337 "MachineIndependent/glslang_tab.cpp" break; - case 485: /* type_specifier_nonarray: I64IMAGE2D */ -#line 3230 "MachineIndependent/glslang.y" + case 494: /* type_specifier_nonarray: I64IMAGE2D */ +#line 3303 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D); } -#line 9665 "MachineIndependent/glslang_tab.cpp" +#line 10347 "MachineIndependent/glslang_tab.cpp" break; - case 486: /* type_specifier_nonarray: U64IMAGE2D */ -#line 3235 "MachineIndependent/glslang.y" + case 495: /* type_specifier_nonarray: U64IMAGE2D */ +#line 3308 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D); } -#line 9675 "MachineIndependent/glslang_tab.cpp" +#line 10357 "MachineIndependent/glslang_tab.cpp" break; - case 487: /* type_specifier_nonarray: I64IMAGE3D */ -#line 3240 "MachineIndependent/glslang.y" + case 496: /* type_specifier_nonarray: I64IMAGE3D */ +#line 3313 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd3D); } -#line 9685 "MachineIndependent/glslang_tab.cpp" +#line 10367 "MachineIndependent/glslang_tab.cpp" break; - case 488: /* type_specifier_nonarray: U64IMAGE3D */ -#line 3245 "MachineIndependent/glslang.y" + case 497: /* type_specifier_nonarray: U64IMAGE3D */ +#line 3318 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd3D); } -#line 9695 "MachineIndependent/glslang_tab.cpp" +#line 10377 "MachineIndependent/glslang_tab.cpp" break; - case 489: /* type_specifier_nonarray: I64IMAGE2DRECT */ -#line 3250 "MachineIndependent/glslang.y" + case 498: /* type_specifier_nonarray: I64IMAGE2DRECT */ +#line 3323 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdRect); } -#line 9705 "MachineIndependent/glslang_tab.cpp" +#line 10387 "MachineIndependent/glslang_tab.cpp" break; - case 490: /* type_specifier_nonarray: U64IMAGE2DRECT */ -#line 3255 "MachineIndependent/glslang.y" + case 499: /* type_specifier_nonarray: U64IMAGE2DRECT */ +#line 3328 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdRect); } -#line 9715 "MachineIndependent/glslang_tab.cpp" +#line 10397 "MachineIndependent/glslang_tab.cpp" break; - case 491: /* type_specifier_nonarray: I64IMAGECUBE */ -#line 3260 "MachineIndependent/glslang.y" + case 500: /* type_specifier_nonarray: I64IMAGECUBE */ +#line 3333 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube); } -#line 9725 "MachineIndependent/glslang_tab.cpp" +#line 10407 "MachineIndependent/glslang_tab.cpp" break; - case 492: /* type_specifier_nonarray: U64IMAGECUBE */ -#line 3265 "MachineIndependent/glslang.y" + case 501: /* type_specifier_nonarray: U64IMAGECUBE */ +#line 3338 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube); } -#line 9735 "MachineIndependent/glslang_tab.cpp" +#line 10417 "MachineIndependent/glslang_tab.cpp" break; - case 493: /* type_specifier_nonarray: I64IMAGEBUFFER */ -#line 3270 "MachineIndependent/glslang.y" + case 502: /* type_specifier_nonarray: I64IMAGEBUFFER */ +#line 3343 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdBuffer); } -#line 9745 "MachineIndependent/glslang_tab.cpp" +#line 10427 "MachineIndependent/glslang_tab.cpp" break; - case 494: /* type_specifier_nonarray: U64IMAGEBUFFER */ -#line 3275 "MachineIndependent/glslang.y" + case 503: /* type_specifier_nonarray: U64IMAGEBUFFER */ +#line 3348 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdBuffer); } -#line 9755 "MachineIndependent/glslang_tab.cpp" +#line 10437 "MachineIndependent/glslang_tab.cpp" break; - case 495: /* type_specifier_nonarray: I64IMAGE1DARRAY */ -#line 3280 "MachineIndependent/glslang.y" + case 504: /* type_specifier_nonarray: I64IMAGE1DARRAY */ +#line 3353 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D, true); } -#line 9765 "MachineIndependent/glslang_tab.cpp" +#line 10447 "MachineIndependent/glslang_tab.cpp" break; - case 496: /* type_specifier_nonarray: U64IMAGE1DARRAY */ -#line 3285 "MachineIndependent/glslang.y" + case 505: /* type_specifier_nonarray: U64IMAGE1DARRAY */ +#line 3358 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D, true); } -#line 9775 "MachineIndependent/glslang_tab.cpp" +#line 10457 "MachineIndependent/glslang_tab.cpp" break; - case 497: /* type_specifier_nonarray: I64IMAGE2DARRAY */ -#line 3290 "MachineIndependent/glslang.y" + case 506: /* type_specifier_nonarray: I64IMAGE2DARRAY */ +#line 3363 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true); } -#line 9785 "MachineIndependent/glslang_tab.cpp" +#line 10467 "MachineIndependent/glslang_tab.cpp" break; - case 498: /* type_specifier_nonarray: U64IMAGE2DARRAY */ -#line 3295 "MachineIndependent/glslang.y" + case 507: /* type_specifier_nonarray: U64IMAGE2DARRAY */ +#line 3368 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true); } -#line 9795 "MachineIndependent/glslang_tab.cpp" +#line 10477 "MachineIndependent/glslang_tab.cpp" break; - case 499: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ -#line 3300 "MachineIndependent/glslang.y" + case 508: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ +#line 3373 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube, true); } -#line 9805 "MachineIndependent/glslang_tab.cpp" +#line 10487 "MachineIndependent/glslang_tab.cpp" break; - case 500: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ -#line 3305 "MachineIndependent/glslang.y" + case 509: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ +#line 3378 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube, true); } -#line 9815 "MachineIndependent/glslang_tab.cpp" +#line 10497 "MachineIndependent/glslang_tab.cpp" break; - case 501: /* type_specifier_nonarray: I64IMAGE2DMS */ -#line 3310 "MachineIndependent/glslang.y" + case 510: /* type_specifier_nonarray: I64IMAGE2DMS */ +#line 3383 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, false, false, true); } -#line 9825 "MachineIndependent/glslang_tab.cpp" +#line 10507 "MachineIndependent/glslang_tab.cpp" break; - case 502: /* type_specifier_nonarray: U64IMAGE2DMS */ -#line 3315 "MachineIndependent/glslang.y" + case 511: /* type_specifier_nonarray: U64IMAGE2DMS */ +#line 3388 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, false, false, true); } -#line 9835 "MachineIndependent/glslang_tab.cpp" +#line 10517 "MachineIndependent/glslang_tab.cpp" break; - case 503: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ -#line 3320 "MachineIndependent/glslang.y" + case 512: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ +#line 3393 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true, false, true); } -#line 9845 "MachineIndependent/glslang_tab.cpp" +#line 10527 "MachineIndependent/glslang_tab.cpp" break; - case 504: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ -#line 3325 "MachineIndependent/glslang.y" + case 513: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ +#line 3398 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true, false, true); } -#line 9855 "MachineIndependent/glslang_tab.cpp" +#line 10537 "MachineIndependent/glslang_tab.cpp" break; - case 505: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ -#line 3330 "MachineIndependent/glslang.y" + case 514: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ +#line 3403 "MachineIndependent/glslang.y" { // GL_OES_EGL_image_external (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.external = true; } -#line 9866 "MachineIndependent/glslang_tab.cpp" +#line 10548 "MachineIndependent/glslang_tab.cpp" break; - case 506: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ -#line 3336 "MachineIndependent/glslang.y" + case 515: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ +#line 3409 "MachineIndependent/glslang.y" { // GL_EXT_YUV_target (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.yuv = true; } -#line 9877 "MachineIndependent/glslang_tab.cpp" +#line 10559 "MachineIndependent/glslang_tab.cpp" break; - case 507: /* type_specifier_nonarray: SUBPASSINPUT */ -#line 3342 "MachineIndependent/glslang.y" + case 516: /* type_specifier_nonarray: SUBPASSINPUT */ +#line 3415 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat); } -#line 9888 "MachineIndependent/glslang_tab.cpp" +#line 10570 "MachineIndependent/glslang_tab.cpp" break; - case 508: /* type_specifier_nonarray: SUBPASSINPUTMS */ -#line 3348 "MachineIndependent/glslang.y" + case 517: /* type_specifier_nonarray: SUBPASSINPUTMS */ +#line 3421 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat, true); } -#line 9899 "MachineIndependent/glslang_tab.cpp" +#line 10581 "MachineIndependent/glslang_tab.cpp" break; - case 509: /* type_specifier_nonarray: F16SUBPASSINPUT */ -#line 3354 "MachineIndependent/glslang.y" + case 518: /* type_specifier_nonarray: F16SUBPASSINPUT */ +#line 3427 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); @@ -9907,11 +10589,11 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16); } -#line 9911 "MachineIndependent/glslang_tab.cpp" +#line 10593 "MachineIndependent/glslang_tab.cpp" break; - case 510: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ -#line 3361 "MachineIndependent/glslang.y" + case 519: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ +#line 3434 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); @@ -9919,98 +10601,107 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); } -#line 9923 "MachineIndependent/glslang_tab.cpp" +#line 10605 "MachineIndependent/glslang_tab.cpp" break; - case 511: /* type_specifier_nonarray: ISUBPASSINPUT */ -#line 3368 "MachineIndependent/glslang.y" + case 520: /* type_specifier_nonarray: ISUBPASSINPUT */ +#line 3441 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt); } -#line 9934 "MachineIndependent/glslang_tab.cpp" +#line 10616 "MachineIndependent/glslang_tab.cpp" break; - case 512: /* type_specifier_nonarray: ISUBPASSINPUTMS */ -#line 3374 "MachineIndependent/glslang.y" + case 521: /* type_specifier_nonarray: ISUBPASSINPUTMS */ +#line 3447 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt, true); } -#line 9945 "MachineIndependent/glslang_tab.cpp" +#line 10627 "MachineIndependent/glslang_tab.cpp" break; - case 513: /* type_specifier_nonarray: USUBPASSINPUT */ -#line 3380 "MachineIndependent/glslang.y" + case 522: /* type_specifier_nonarray: USUBPASSINPUT */ +#line 3453 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint); } -#line 9956 "MachineIndependent/glslang_tab.cpp" +#line 10638 "MachineIndependent/glslang_tab.cpp" break; - case 514: /* type_specifier_nonarray: USUBPASSINPUTMS */ -#line 3386 "MachineIndependent/glslang.y" + case 523: /* type_specifier_nonarray: USUBPASSINPUTMS */ +#line 3459 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint, true); } -#line 9967 "MachineIndependent/glslang_tab.cpp" +#line 10649 "MachineIndependent/glslang_tab.cpp" break; - case 515: /* type_specifier_nonarray: FCOOPMATNV */ -#line 3392 "MachineIndependent/glslang.y" + case 524: /* type_specifier_nonarray: FCOOPMATNV */ +#line 3465 "MachineIndependent/glslang.y" { parseContext.fcoopmatCheck((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).coopmat = true; } -#line 9978 "MachineIndependent/glslang_tab.cpp" +#line 10660 "MachineIndependent/glslang_tab.cpp" break; - case 516: /* type_specifier_nonarray: ICOOPMATNV */ -#line 3398 "MachineIndependent/glslang.y" + case 525: /* type_specifier_nonarray: ICOOPMATNV */ +#line 3471 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).coopmat = true; } -#line 9989 "MachineIndependent/glslang_tab.cpp" +#line 10671 "MachineIndependent/glslang_tab.cpp" break; - case 517: /* type_specifier_nonarray: UCOOPMATNV */ -#line 3404 "MachineIndependent/glslang.y" + case 526: /* type_specifier_nonarray: UCOOPMATNV */ +#line 3477 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).coopmat = true; } -#line 10000 "MachineIndependent/glslang_tab.cpp" +#line 10682 "MachineIndependent/glslang_tab.cpp" break; - case 518: /* type_specifier_nonarray: struct_specifier */ -#line 3411 "MachineIndependent/glslang.y" + case 527: /* type_specifier_nonarray: spirv_type_specifier */ +#line 3483 "MachineIndependent/glslang.y" + { + parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); + (yyval.interm.type) = (yyvsp[0].interm.type); + } +#line 10691 "MachineIndependent/glslang_tab.cpp" + break; + + case 528: /* type_specifier_nonarray: struct_specifier */ +#line 3488 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); } -#line 10010 "MachineIndependent/glslang_tab.cpp" +#line 10701 "MachineIndependent/glslang_tab.cpp" break; - case 519: /* type_specifier_nonarray: TYPE_NAME */ -#line 3416 "MachineIndependent/glslang.y" + case 529: /* type_specifier_nonarray: TYPE_NAME */ +#line 3493 "MachineIndependent/glslang.y" { // // This is for user defined type names. The lexical phase looked up the @@ -10024,47 +10715,47 @@ yyreduce: } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } -#line 10028 "MachineIndependent/glslang_tab.cpp" +#line 10719 "MachineIndependent/glslang_tab.cpp" break; - case 520: /* precision_qualifier: HIGH_PRECISION */ -#line 3432 "MachineIndependent/glslang.y" + case 530: /* precision_qualifier: HIGH_PRECISION */ +#line 3509 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh); } -#line 10038 "MachineIndependent/glslang_tab.cpp" +#line 10729 "MachineIndependent/glslang_tab.cpp" break; - case 521: /* precision_qualifier: MEDIUM_PRECISION */ -#line 3437 "MachineIndependent/glslang.y" + case 531: /* precision_qualifier: MEDIUM_PRECISION */ +#line 3514 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium); } -#line 10048 "MachineIndependent/glslang_tab.cpp" +#line 10739 "MachineIndependent/glslang_tab.cpp" break; - case 522: /* precision_qualifier: LOW_PRECISION */ -#line 3442 "MachineIndependent/glslang.y" + case 532: /* precision_qualifier: LOW_PRECISION */ +#line 3519 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow); } -#line 10058 "MachineIndependent/glslang_tab.cpp" +#line 10749 "MachineIndependent/glslang_tab.cpp" break; - case 523: /* $@3: %empty */ -#line 3450 "MachineIndependent/glslang.y" + case 533: /* $@3: %empty */ +#line 3527 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 10064 "MachineIndependent/glslang_tab.cpp" +#line 10755 "MachineIndependent/glslang_tab.cpp" break; - case 524: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ -#line 3450 "MachineIndependent/glslang.y" + case 534: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ +#line 3527 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); @@ -10076,17 +10767,17 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10080 "MachineIndependent/glslang_tab.cpp" +#line 10771 "MachineIndependent/glslang_tab.cpp" break; - case 525: /* $@4: %empty */ -#line 3461 "MachineIndependent/glslang.y" + case 535: /* $@4: %empty */ +#line 3538 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 10086 "MachineIndependent/glslang_tab.cpp" +#line 10777 "MachineIndependent/glslang_tab.cpp" break; - case 526: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ -#line 3461 "MachineIndependent/glslang.y" + case 536: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ +#line 3538 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); @@ -10094,19 +10785,19 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10098 "MachineIndependent/glslang_tab.cpp" +#line 10789 "MachineIndependent/glslang_tab.cpp" break; - case 527: /* struct_declaration_list: struct_declaration */ -#line 3471 "MachineIndependent/glslang.y" + case 537: /* struct_declaration_list: struct_declaration */ +#line 3548 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } -#line 10106 "MachineIndependent/glslang_tab.cpp" +#line 10797 "MachineIndependent/glslang_tab.cpp" break; - case 528: /* struct_declaration_list: struct_declaration_list struct_declaration */ -#line 3474 "MachineIndependent/glslang.y" + case 538: /* struct_declaration_list: struct_declaration_list struct_declaration */ +#line 3551 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { @@ -10117,11 +10808,11 @@ yyreduce: (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } -#line 10121 "MachineIndependent/glslang_tab.cpp" +#line 10812 "MachineIndependent/glslang_tab.cpp" break; - case 529: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ -#line 3487 "MachineIndependent/glslang.y" + case 539: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ +#line 3564 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -10144,11 +10835,11 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10148 "MachineIndependent/glslang_tab.cpp" +#line 10839 "MachineIndependent/glslang_tab.cpp" break; - case 530: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ -#line 3509 "MachineIndependent/glslang.y" + case 540: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ +#line 3586 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -10173,38 +10864,38 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10177 "MachineIndependent/glslang_tab.cpp" +#line 10868 "MachineIndependent/glslang_tab.cpp" break; - case 531: /* struct_declarator_list: struct_declarator */ -#line 3536 "MachineIndependent/glslang.y" + case 541: /* struct_declarator_list: struct_declarator */ +#line 3613 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10186 "MachineIndependent/glslang_tab.cpp" +#line 10877 "MachineIndependent/glslang_tab.cpp" break; - case 532: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ -#line 3540 "MachineIndependent/glslang.y" + case 542: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ +#line 3617 "MachineIndependent/glslang.y" { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10194 "MachineIndependent/glslang_tab.cpp" +#line 10885 "MachineIndependent/glslang_tab.cpp" break; - case 533: /* struct_declarator: IDENTIFIER */ -#line 3546 "MachineIndependent/glslang.y" + case 543: /* struct_declarator: IDENTIFIER */ +#line 3623 "MachineIndependent/glslang.y" { (yyval.interm.typeLine).type = new TType(EbtVoid); (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc; (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string); } -#line 10204 "MachineIndependent/glslang_tab.cpp" +#line 10895 "MachineIndependent/glslang_tab.cpp" break; - case 534: /* struct_declarator: IDENTIFIER array_specifier */ -#line 3551 "MachineIndependent/glslang.y" + case 544: /* struct_declarator: IDENTIFIER array_specifier */ +#line 3628 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); @@ -10213,235 +10904,246 @@ yyreduce: (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } -#line 10217 "MachineIndependent/glslang_tab.cpp" +#line 10908 "MachineIndependent/glslang_tab.cpp" break; - case 535: /* initializer: assignment_expression */ -#line 3562 "MachineIndependent/glslang.y" + case 545: /* initializer: assignment_expression */ +#line 3639 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 10225 "MachineIndependent/glslang_tab.cpp" +#line 10916 "MachineIndependent/glslang_tab.cpp" break; - case 536: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ -#line 3566 "MachineIndependent/glslang.y" + case 546: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ +#line 3643 "MachineIndependent/glslang.y" { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); } -#line 10236 "MachineIndependent/glslang_tab.cpp" +#line 10927 "MachineIndependent/glslang_tab.cpp" break; - case 537: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ -#line 3572 "MachineIndependent/glslang.y" + case 547: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ +#line 3649 "MachineIndependent/glslang.y" { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 10247 "MachineIndependent/glslang_tab.cpp" +#line 10938 "MachineIndependent/glslang_tab.cpp" break; - case 538: /* initializer_list: initializer */ -#line 3583 "MachineIndependent/glslang.y" + case 548: /* initializer: LEFT_BRACE RIGHT_BRACE */ +#line 3655 "MachineIndependent/glslang.y" + { + const char* initFeature = "empty { } initializer"; + parseContext.profileRequires((yyvsp[-1].lex).loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); + parseContext.profileRequires((yyvsp[-1].lex).loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); + (yyval.interm.intermTypedNode) = parseContext.intermediate.makeAggregate((yyvsp[-1].lex).loc); + } +#line 10949 "MachineIndependent/glslang_tab.cpp" + break; + + case 549: /* initializer_list: initializer */ +#line 3666 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } -#line 10255 "MachineIndependent/glslang_tab.cpp" +#line 10957 "MachineIndependent/glslang_tab.cpp" break; - case 539: /* initializer_list: initializer_list COMMA initializer */ -#line 3586 "MachineIndependent/glslang.y" + case 550: /* initializer_list: initializer_list COMMA initializer */ +#line 3669 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } -#line 10263 "MachineIndependent/glslang_tab.cpp" +#line 10965 "MachineIndependent/glslang_tab.cpp" break; - case 540: /* declaration_statement: declaration */ -#line 3593 "MachineIndependent/glslang.y" + case 551: /* declaration_statement: declaration */ +#line 3676 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10269 "MachineIndependent/glslang_tab.cpp" +#line 10971 "MachineIndependent/glslang_tab.cpp" break; - case 541: /* statement: compound_statement */ -#line 3597 "MachineIndependent/glslang.y" + case 552: /* statement: compound_statement */ +#line 3680 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10275 "MachineIndependent/glslang_tab.cpp" +#line 10977 "MachineIndependent/glslang_tab.cpp" break; - case 542: /* statement: simple_statement */ -#line 3598 "MachineIndependent/glslang.y" + case 553: /* statement: simple_statement */ +#line 3681 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10281 "MachineIndependent/glslang_tab.cpp" +#line 10983 "MachineIndependent/glslang_tab.cpp" break; - case 543: /* simple_statement: declaration_statement */ -#line 3604 "MachineIndependent/glslang.y" + case 554: /* simple_statement: declaration_statement */ +#line 3687 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10287 "MachineIndependent/glslang_tab.cpp" +#line 10989 "MachineIndependent/glslang_tab.cpp" break; - case 544: /* simple_statement: expression_statement */ -#line 3605 "MachineIndependent/glslang.y" + case 555: /* simple_statement: expression_statement */ +#line 3688 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10293 "MachineIndependent/glslang_tab.cpp" +#line 10995 "MachineIndependent/glslang_tab.cpp" break; - case 545: /* simple_statement: selection_statement */ -#line 3606 "MachineIndependent/glslang.y" + case 556: /* simple_statement: selection_statement */ +#line 3689 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10299 "MachineIndependent/glslang_tab.cpp" +#line 11001 "MachineIndependent/glslang_tab.cpp" break; - case 546: /* simple_statement: switch_statement */ -#line 3607 "MachineIndependent/glslang.y" + case 557: /* simple_statement: switch_statement */ +#line 3690 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10305 "MachineIndependent/glslang_tab.cpp" +#line 11007 "MachineIndependent/glslang_tab.cpp" break; - case 547: /* simple_statement: case_label */ -#line 3608 "MachineIndependent/glslang.y" + case 558: /* simple_statement: case_label */ +#line 3691 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10311 "MachineIndependent/glslang_tab.cpp" +#line 11013 "MachineIndependent/glslang_tab.cpp" break; - case 548: /* simple_statement: iteration_statement */ -#line 3609 "MachineIndependent/glslang.y" + case 559: /* simple_statement: iteration_statement */ +#line 3692 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10317 "MachineIndependent/glslang_tab.cpp" +#line 11019 "MachineIndependent/glslang_tab.cpp" break; - case 549: /* simple_statement: jump_statement */ -#line 3610 "MachineIndependent/glslang.y" + case 560: /* simple_statement: jump_statement */ +#line 3693 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10323 "MachineIndependent/glslang_tab.cpp" +#line 11025 "MachineIndependent/glslang_tab.cpp" break; - case 550: /* simple_statement: demote_statement */ -#line 3612 "MachineIndependent/glslang.y" + case 561: /* simple_statement: demote_statement */ +#line 3695 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10329 "MachineIndependent/glslang_tab.cpp" +#line 11031 "MachineIndependent/glslang_tab.cpp" break; - case 551: /* demote_statement: DEMOTE SEMICOLON */ -#line 3618 "MachineIndependent/glslang.y" + case 562: /* demote_statement: DEMOTE SEMICOLON */ +#line 3701 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "demote"); parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDemote, (yyvsp[-1].lex).loc); } -#line 10339 "MachineIndependent/glslang_tab.cpp" +#line 11041 "MachineIndependent/glslang_tab.cpp" break; - case 552: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ -#line 3627 "MachineIndependent/glslang.y" + case 563: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ +#line 3710 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 10345 "MachineIndependent/glslang_tab.cpp" +#line 11047 "MachineIndependent/glslang_tab.cpp" break; - case 553: /* $@5: %empty */ -#line 3628 "MachineIndependent/glslang.y" + case 564: /* $@5: %empty */ +#line 3711 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 10354 "MachineIndependent/glslang_tab.cpp" +#line 11056 "MachineIndependent/glslang_tab.cpp" break; - case 554: /* $@6: %empty */ -#line 3632 "MachineIndependent/glslang.y" + case 565: /* $@6: %empty */ +#line 3715 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 10363 "MachineIndependent/glslang_tab.cpp" +#line 11065 "MachineIndependent/glslang_tab.cpp" break; - case 555: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ -#line 3636 "MachineIndependent/glslang.y" + case 566: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ +#line 3719 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } -#line 10373 "MachineIndependent/glslang_tab.cpp" +#line 11075 "MachineIndependent/glslang_tab.cpp" break; - case 556: /* statement_no_new_scope: compound_statement_no_new_scope */ -#line 3644 "MachineIndependent/glslang.y" + case 567: /* statement_no_new_scope: compound_statement_no_new_scope */ +#line 3727 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10379 "MachineIndependent/glslang_tab.cpp" +#line 11081 "MachineIndependent/glslang_tab.cpp" break; - case 557: /* statement_no_new_scope: simple_statement */ -#line 3645 "MachineIndependent/glslang.y" + case 568: /* statement_no_new_scope: simple_statement */ +#line 3728 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10385 "MachineIndependent/glslang_tab.cpp" +#line 11087 "MachineIndependent/glslang_tab.cpp" break; - case 558: /* $@7: %empty */ -#line 3649 "MachineIndependent/glslang.y" + case 569: /* $@7: %empty */ +#line 3732 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 10393 "MachineIndependent/glslang_tab.cpp" +#line 11095 "MachineIndependent/glslang_tab.cpp" break; - case 559: /* statement_scoped: $@7 compound_statement */ -#line 3652 "MachineIndependent/glslang.y" + case 570: /* statement_scoped: $@7 compound_statement */ +#line 3735 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10402 "MachineIndependent/glslang_tab.cpp" +#line 11104 "MachineIndependent/glslang_tab.cpp" break; - case 560: /* $@8: %empty */ -#line 3656 "MachineIndependent/glslang.y" + case 571: /* $@8: %empty */ +#line 3739 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 10412 "MachineIndependent/glslang_tab.cpp" +#line 11114 "MachineIndependent/glslang_tab.cpp" break; - case 561: /* statement_scoped: $@8 simple_statement */ -#line 3661 "MachineIndependent/glslang.y" + case 572: /* statement_scoped: $@8 simple_statement */ +#line 3744 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10423 "MachineIndependent/glslang_tab.cpp" +#line 11125 "MachineIndependent/glslang_tab.cpp" break; - case 562: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ -#line 3670 "MachineIndependent/glslang.y" + case 573: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ +#line 3753 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 10431 "MachineIndependent/glslang_tab.cpp" +#line 11133 "MachineIndependent/glslang_tab.cpp" break; - case 563: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ -#line 3673 "MachineIndependent/glslang.y" + case 574: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ +#line 3756 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); } -#line 10441 "MachineIndependent/glslang_tab.cpp" +#line 11143 "MachineIndependent/glslang_tab.cpp" break; - case 564: /* statement_list: statement */ -#line 3681 "MachineIndependent/glslang.y" + case 575: /* statement_list: statement */ +#line 3764 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || @@ -10450,11 +11152,11 @@ yyreduce: (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 10454 "MachineIndependent/glslang_tab.cpp" +#line 11156 "MachineIndependent/glslang_tab.cpp" break; - case 565: /* statement_list: statement_list statement */ -#line 3689 "MachineIndependent/glslang.y" + case 576: /* statement_list: statement_list statement */ +#line 3772 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { @@ -10463,76 +11165,77 @@ yyreduce: } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 10467 "MachineIndependent/glslang_tab.cpp" +#line 11169 "MachineIndependent/glslang_tab.cpp" break; - case 566: /* expression_statement: SEMICOLON */ -#line 3700 "MachineIndependent/glslang.y" + case 577: /* expression_statement: SEMICOLON */ +#line 3783 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 10473 "MachineIndependent/glslang_tab.cpp" +#line 11175 "MachineIndependent/glslang_tab.cpp" break; - case 567: /* expression_statement: expression SEMICOLON */ -#line 3701 "MachineIndependent/glslang.y" + case 578: /* expression_statement: expression SEMICOLON */ +#line 3784 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); } -#line 10479 "MachineIndependent/glslang_tab.cpp" +#line 11181 "MachineIndependent/glslang_tab.cpp" break; - case 568: /* selection_statement: selection_statement_nonattributed */ -#line 3705 "MachineIndependent/glslang.y" + case 579: /* selection_statement: selection_statement_nonattributed */ +#line 3788 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10487 "MachineIndependent/glslang_tab.cpp" +#line 11189 "MachineIndependent/glslang_tab.cpp" break; - case 569: /* selection_statement: attribute selection_statement_nonattributed */ -#line 3709 "MachineIndependent/glslang.y" + case 580: /* selection_statement: attribute selection_statement_nonattributed */ +#line 3792 "MachineIndependent/glslang.y" { + parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10496 "MachineIndependent/glslang_tab.cpp" +#line 11199 "MachineIndependent/glslang_tab.cpp" break; - case 570: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ -#line 3716 "MachineIndependent/glslang.y" + case 581: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ +#line 3800 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode)); (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc); } -#line 10505 "MachineIndependent/glslang_tab.cpp" +#line 11208 "MachineIndependent/glslang_tab.cpp" break; - case 571: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ -#line 3723 "MachineIndependent/glslang.y" + case 582: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ +#line 3807 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } -#line 10514 "MachineIndependent/glslang_tab.cpp" +#line 11217 "MachineIndependent/glslang_tab.cpp" break; - case 572: /* selection_rest_statement: statement_scoped */ -#line 3727 "MachineIndependent/glslang.y" + case 583: /* selection_rest_statement: statement_scoped */ +#line 3811 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } -#line 10523 "MachineIndependent/glslang_tab.cpp" +#line 11226 "MachineIndependent/glslang_tab.cpp" break; - case 573: /* condition: expression */ -#line 3735 "MachineIndependent/glslang.y" + case 584: /* condition: expression */ +#line 3819 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } -#line 10532 "MachineIndependent/glslang_tab.cpp" +#line 11235 "MachineIndependent/glslang_tab.cpp" break; - case 574: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 3739 "MachineIndependent/glslang.y" + case 585: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ +#line 3823 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); @@ -10543,28 +11246,29 @@ yyreduce: else (yyval.interm.intermTypedNode) = 0; } -#line 10547 "MachineIndependent/glslang_tab.cpp" +#line 11250 "MachineIndependent/glslang_tab.cpp" break; - case 575: /* switch_statement: switch_statement_nonattributed */ -#line 3752 "MachineIndependent/glslang.y" + case 586: /* switch_statement: switch_statement_nonattributed */ +#line 3836 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10555 "MachineIndependent/glslang_tab.cpp" +#line 11258 "MachineIndependent/glslang_tab.cpp" break; - case 576: /* switch_statement: attribute switch_statement_nonattributed */ -#line 3756 "MachineIndependent/glslang.y" + case 587: /* switch_statement: attribute switch_statement_nonattributed */ +#line 3840 "MachineIndependent/glslang.y" { + parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10564 "MachineIndependent/glslang_tab.cpp" +#line 11268 "MachineIndependent/glslang_tab.cpp" break; - case 577: /* $@9: %empty */ -#line 3763 "MachineIndependent/glslang.y" + case 588: /* $@9: %empty */ +#line 3848 "MachineIndependent/glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -10573,11 +11277,11 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 10577 "MachineIndependent/glslang_tab.cpp" +#line 11281 "MachineIndependent/glslang_tab.cpp" break; - case 578: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ -#line 3771 "MachineIndependent/glslang.y" + case 589: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ +#line 3856 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0); delete parseContext.switchSequenceStack.back(); @@ -10587,27 +11291,27 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 10591 "MachineIndependent/glslang_tab.cpp" +#line 11295 "MachineIndependent/glslang_tab.cpp" break; - case 579: /* switch_statement_list: %empty */ -#line 3783 "MachineIndependent/glslang.y" + case 590: /* switch_statement_list: %empty */ +#line 3868 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 10599 "MachineIndependent/glslang_tab.cpp" +#line 11303 "MachineIndependent/glslang_tab.cpp" break; - case 580: /* switch_statement_list: statement_list */ -#line 3786 "MachineIndependent/glslang.y" + case 591: /* switch_statement_list: statement_list */ +#line 3871 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10607 "MachineIndependent/glslang_tab.cpp" +#line 11311 "MachineIndependent/glslang_tab.cpp" break; - case 581: /* case_label: CASE expression COLON */ -#line 3792 "MachineIndependent/glslang.y" + case 592: /* case_label: CASE expression COLON */ +#line 3877 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -10620,11 +11324,11 @@ yyreduce: (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } -#line 10624 "MachineIndependent/glslang_tab.cpp" +#line 11328 "MachineIndependent/glslang_tab.cpp" break; - case 582: /* case_label: DEFAULT COLON */ -#line 3804 "MachineIndependent/glslang.y" + case 593: /* case_label: DEFAULT COLON */ +#line 3889 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -10634,28 +11338,29 @@ yyreduce: else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } -#line 10638 "MachineIndependent/glslang_tab.cpp" +#line 11342 "MachineIndependent/glslang_tab.cpp" break; - case 583: /* iteration_statement: iteration_statement_nonattributed */ -#line 3816 "MachineIndependent/glslang.y" + case 594: /* iteration_statement: iteration_statement_nonattributed */ +#line 3901 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10646 "MachineIndependent/glslang_tab.cpp" +#line 11350 "MachineIndependent/glslang_tab.cpp" break; - case 584: /* iteration_statement: attribute iteration_statement_nonattributed */ -#line 3820 "MachineIndependent/glslang.y" + case 595: /* iteration_statement: attribute iteration_statement_nonattributed */ +#line 3905 "MachineIndependent/glslang.y" { + parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10655 "MachineIndependent/glslang_tab.cpp" +#line 11360 "MachineIndependent/glslang_tab.cpp" break; - case 585: /* $@10: %empty */ -#line 3827 "MachineIndependent/glslang.y" + case 596: /* $@10: %empty */ +#line 3913 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); @@ -10664,11 +11369,11 @@ yyreduce: ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 10668 "MachineIndependent/glslang_tab.cpp" +#line 11373 "MachineIndependent/glslang_tab.cpp" break; - case 586: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ -#line 3835 "MachineIndependent/glslang.y" + case 597: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ +#line 3921 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); @@ -10676,21 +11381,21 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 10680 "MachineIndependent/glslang_tab.cpp" +#line 11385 "MachineIndependent/glslang_tab.cpp" break; - case 587: /* $@11: %empty */ -#line 3842 "MachineIndependent/glslang.y" + case 598: /* $@11: %empty */ +#line 3928 "MachineIndependent/glslang.y" { ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 10690 "MachineIndependent/glslang_tab.cpp" +#line 11395 "MachineIndependent/glslang_tab.cpp" break; - case 588: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ -#line 3847 "MachineIndependent/glslang.y" + case 599: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ +#line 3933 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); @@ -10702,22 +11407,22 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 10706 "MachineIndependent/glslang_tab.cpp" +#line 11411 "MachineIndependent/glslang_tab.cpp" break; - case 589: /* $@12: %empty */ -#line 3858 "MachineIndependent/glslang.y" + case 600: /* $@12: %empty */ +#line 3944 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 10717 "MachineIndependent/glslang_tab.cpp" +#line 11422 "MachineIndependent/glslang_tab.cpp" break; - case 590: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ -#line 3864 "MachineIndependent/glslang.y" + case 601: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ +#line 3950 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); @@ -10730,81 +11435,81 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 10734 "MachineIndependent/glslang_tab.cpp" +#line 11439 "MachineIndependent/glslang_tab.cpp" break; - case 591: /* for_init_statement: expression_statement */ -#line 3879 "MachineIndependent/glslang.y" + case 602: /* for_init_statement: expression_statement */ +#line 3965 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10742 "MachineIndependent/glslang_tab.cpp" +#line 11447 "MachineIndependent/glslang_tab.cpp" break; - case 592: /* for_init_statement: declaration_statement */ -#line 3882 "MachineIndependent/glslang.y" + case 603: /* for_init_statement: declaration_statement */ +#line 3968 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10750 "MachineIndependent/glslang_tab.cpp" +#line 11455 "MachineIndependent/glslang_tab.cpp" break; - case 593: /* conditionopt: condition */ -#line 3888 "MachineIndependent/glslang.y" + case 604: /* conditionopt: condition */ +#line 3974 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 10758 "MachineIndependent/glslang_tab.cpp" +#line 11463 "MachineIndependent/glslang_tab.cpp" break; - case 594: /* conditionopt: %empty */ -#line 3891 "MachineIndependent/glslang.y" + case 605: /* conditionopt: %empty */ +#line 3977 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = 0; } -#line 10766 "MachineIndependent/glslang_tab.cpp" +#line 11471 "MachineIndependent/glslang_tab.cpp" break; - case 595: /* for_rest_statement: conditionopt SEMICOLON */ -#line 3897 "MachineIndependent/glslang.y" + case 606: /* for_rest_statement: conditionopt SEMICOLON */ +#line 3983 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } -#line 10775 "MachineIndependent/glslang_tab.cpp" +#line 11480 "MachineIndependent/glslang_tab.cpp" break; - case 596: /* for_rest_statement: conditionopt SEMICOLON expression */ -#line 3901 "MachineIndependent/glslang.y" + case 607: /* for_rest_statement: conditionopt SEMICOLON expression */ +#line 3987 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } -#line 10784 "MachineIndependent/glslang_tab.cpp" +#line 11489 "MachineIndependent/glslang_tab.cpp" break; - case 597: /* jump_statement: CONTINUE SEMICOLON */ -#line 3908 "MachineIndependent/glslang.y" + case 608: /* jump_statement: CONTINUE SEMICOLON */ +#line 3994 "MachineIndependent/glslang.y" { if (parseContext.loopNestingLevel <= 0) parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc); } -#line 10794 "MachineIndependent/glslang_tab.cpp" +#line 11499 "MachineIndependent/glslang_tab.cpp" break; - case 598: /* jump_statement: BREAK SEMICOLON */ -#line 3913 "MachineIndependent/glslang.y" + case 609: /* jump_statement: BREAK SEMICOLON */ +#line 3999 "MachineIndependent/glslang.y" { if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc); } -#line 10804 "MachineIndependent/glslang_tab.cpp" +#line 11509 "MachineIndependent/glslang_tab.cpp" break; - case 599: /* jump_statement: RETURN SEMICOLON */ -#line 3918 "MachineIndependent/glslang.y" + case 610: /* jump_statement: RETURN SEMICOLON */ +#line 4004 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) @@ -10812,101 +11517,101 @@ yyreduce: if (parseContext.inMain) parseContext.postEntryPointReturn = true; } -#line 10816 "MachineIndependent/glslang_tab.cpp" +#line 11521 "MachineIndependent/glslang_tab.cpp" break; - case 600: /* jump_statement: RETURN expression SEMICOLON */ -#line 3925 "MachineIndependent/glslang.y" + case 611: /* jump_statement: RETURN expression SEMICOLON */ +#line 4011 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } -#line 10824 "MachineIndependent/glslang_tab.cpp" +#line 11529 "MachineIndependent/glslang_tab.cpp" break; - case 601: /* jump_statement: DISCARD SEMICOLON */ -#line 3928 "MachineIndependent/glslang.y" + case 612: /* jump_statement: DISCARD SEMICOLON */ +#line 4014 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } -#line 10833 "MachineIndependent/glslang_tab.cpp" +#line 11538 "MachineIndependent/glslang_tab.cpp" break; - case 602: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ -#line 3932 "MachineIndependent/glslang.y" + case 613: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ +#line 4018 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc); } -#line 10842 "MachineIndependent/glslang_tab.cpp" +#line 11547 "MachineIndependent/glslang_tab.cpp" break; - case 603: /* jump_statement: TERMINATE_RAY SEMICOLON */ -#line 3937 "MachineIndependent/glslang.y" + case 614: /* jump_statement: TERMINATE_RAY SEMICOLON */ +#line 4023 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc); } -#line 10851 "MachineIndependent/glslang_tab.cpp" +#line 11556 "MachineIndependent/glslang_tab.cpp" break; - case 604: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ -#line 3941 "MachineIndependent/glslang.y" + case 615: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ +#line 4027 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc); } -#line 10860 "MachineIndependent/glslang_tab.cpp" +#line 11565 "MachineIndependent/glslang_tab.cpp" break; - case 605: /* translation_unit: external_declaration */ -#line 3951 "MachineIndependent/glslang.y" + case 616: /* translation_unit: external_declaration */ +#line 4037 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 10869 "MachineIndependent/glslang_tab.cpp" +#line 11574 "MachineIndependent/glslang_tab.cpp" break; - case 606: /* translation_unit: translation_unit external_declaration */ -#line 3955 "MachineIndependent/glslang.y" + case 617: /* translation_unit: translation_unit external_declaration */ +#line 4041 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) != nullptr) { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } } -#line 10880 "MachineIndependent/glslang_tab.cpp" +#line 11585 "MachineIndependent/glslang_tab.cpp" break; - case 607: /* external_declaration: function_definition */ -#line 3964 "MachineIndependent/glslang.y" + case 618: /* external_declaration: function_definition */ +#line 4050 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10888 "MachineIndependent/glslang_tab.cpp" +#line 11593 "MachineIndependent/glslang_tab.cpp" break; - case 608: /* external_declaration: declaration */ -#line 3967 "MachineIndependent/glslang.y" + case 619: /* external_declaration: declaration */ +#line 4053 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10896 "MachineIndependent/glslang_tab.cpp" +#line 11601 "MachineIndependent/glslang_tab.cpp" break; - case 609: /* external_declaration: SEMICOLON */ -#line 3971 "MachineIndependent/glslang.y" + case 620: /* external_declaration: SEMICOLON */ +#line 4057 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon"); parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); (yyval.interm.intermNode) = nullptr; } -#line 10906 "MachineIndependent/glslang_tab.cpp" +#line 11611 "MachineIndependent/glslang_tab.cpp" break; - case 610: /* $@13: %empty */ -#line 3980 "MachineIndependent/glslang.y" + case 621: /* $@13: %empty */ +#line 4066 "MachineIndependent/glslang.y" { (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */); (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function); @@ -10919,11 +11624,11 @@ yyreduce: ++parseContext.statementNestingLevel; } } -#line 10923 "MachineIndependent/glslang_tab.cpp" +#line 11628 "MachineIndependent/glslang_tab.cpp" break; - case 611: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ -#line 3992 "MachineIndependent/glslang.y" + case 622: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ +#line 4078 "MachineIndependent/glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) @@ -10950,52 +11655,563 @@ yyreduce: --parseContext.statementNestingLevel; } } -#line 10954 "MachineIndependent/glslang_tab.cpp" +#line 11659 "MachineIndependent/glslang_tab.cpp" break; - case 612: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ -#line 4022 "MachineIndependent/glslang.y" + case 623: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ +#line 4108 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); - parseContext.requireExtensions((yyvsp[-4].lex).loc, 1, &E_GL_EXT_control_flow_attributes, "attribute"); } -#line 10963 "MachineIndependent/glslang_tab.cpp" +#line 11667 "MachineIndependent/glslang_tab.cpp" break; - case 613: /* attribute_list: single_attribute */ -#line 4028 "MachineIndependent/glslang.y" + case 624: /* attribute_list: single_attribute */ +#line 4113 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[0].interm.attributes); } -#line 10971 "MachineIndependent/glslang_tab.cpp" +#line 11675 "MachineIndependent/glslang_tab.cpp" break; - case 614: /* attribute_list: attribute_list COMMA single_attribute */ -#line 4031 "MachineIndependent/glslang.y" + case 625: /* attribute_list: attribute_list COMMA single_attribute */ +#line 4116 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); } -#line 10979 "MachineIndependent/glslang_tab.cpp" +#line 11683 "MachineIndependent/glslang_tab.cpp" break; - case 615: /* single_attribute: IDENTIFIER */ -#line 4036 "MachineIndependent/glslang.y" + case 626: /* single_attribute: IDENTIFIER */ +#line 4121 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); } -#line 10987 "MachineIndependent/glslang_tab.cpp" +#line 11691 "MachineIndependent/glslang_tab.cpp" break; - case 616: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ -#line 4039 "MachineIndependent/glslang.y" + case 627: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ +#line 4124 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); } -#line 10995 "MachineIndependent/glslang_tab.cpp" +#line 11699 "MachineIndependent/glslang_tab.cpp" + break; + + case 628: /* spirv_requirements_list: spirv_requirements_parameter */ +#line 4131 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); + } +#line 11707 "MachineIndependent/glslang_tab.cpp" + break; + + case 629: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ +#line 4134 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); + } +#line 11715 "MachineIndependent/glslang_tab.cpp" + break; + + case 630: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ +#line 4139 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); + } +#line 11723 "MachineIndependent/glslang_tab.cpp" + break; + + case 631: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ +#line 4142 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11731 "MachineIndependent/glslang_tab.cpp" + break; + + case 632: /* spirv_extension_list: STRING_LITERAL */ +#line 4147 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); + } +#line 11739 "MachineIndependent/glslang_tab.cpp" + break; + + case 633: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ +#line 4150 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); + } +#line 11747 "MachineIndependent/glslang_tab.cpp" + break; + + case 634: /* spirv_capability_list: INTCONSTANT */ +#line 4155 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); + } +#line 11755 "MachineIndependent/glslang_tab.cpp" + break; + + case 635: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ +#line 4158 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); + } +#line 11763 "MachineIndependent/glslang_tab.cpp" + break; + + case 636: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4163 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); + (yyval.interm.intermNode) = 0; + } +#line 11772 "MachineIndependent/glslang_tab.cpp" + break; + + case 637: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4167 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); + (yyval.interm.intermNode) = 0; + } +#line 11782 "MachineIndependent/glslang_tab.cpp" + break; + + case 638: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4172 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + (yyval.interm.intermNode) = 0; + } +#line 11791 "MachineIndependent/glslang_tab.cpp" + break; + + case 639: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4176 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + (yyval.interm.intermNode) = 0; + } +#line 11801 "MachineIndependent/glslang_tab.cpp" + break; + + case 640: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4181 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + (yyval.interm.intermNode) = 0; + } +#line 11810 "MachineIndependent/glslang_tab.cpp" + break; + + case 641: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4185 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); + parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + (yyval.interm.intermNode) = 0; + } +#line 11820 "MachineIndependent/glslang_tab.cpp" + break; + + case 642: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ +#line 4192 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); + } +#line 11828 "MachineIndependent/glslang_tab.cpp" + break; + + case 643: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ +#line 4195 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); + } +#line 11836 "MachineIndependent/glslang_tab.cpp" + break; + + case 644: /* spirv_execution_mode_parameter: FLOATCONSTANT */ +#line 4200 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); + } +#line 11844 "MachineIndependent/glslang_tab.cpp" + break; + + case 645: /* spirv_execution_mode_parameter: INTCONSTANT */ +#line 4203 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 11852 "MachineIndependent/glslang_tab.cpp" + break; + + case 646: /* spirv_execution_mode_parameter: UINTCONSTANT */ +#line 4206 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 11860 "MachineIndependent/glslang_tab.cpp" + break; + + case 647: /* spirv_execution_mode_parameter: BOOLCONSTANT */ +#line 4209 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); + } +#line 11868 "MachineIndependent/glslang_tab.cpp" + break; + + case 648: /* spirv_execution_mode_parameter: STRING_LITERAL */ +#line 4212 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); + } +#line 11876 "MachineIndependent/glslang_tab.cpp" + break; + + case 649: /* spirv_execution_mode_id_parameter_list: constant_expression */ +#line 4217 "MachineIndependent/glslang.y" + { + if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtString) + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode)); + } +#line 11890 "MachineIndependent/glslang_tab.cpp" + break; + + case 650: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ +#line 4226 "MachineIndependent/glslang.y" + { + if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtString) + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); + } +#line 11904 "MachineIndependent/glslang_tab.cpp" + break; + + case 651: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4237 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-3].lex).loc); + (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; + (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; + } +#line 11914 "MachineIndependent/glslang_tab.cpp" + break; + + case 652: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4242 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); + (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; + (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; + } +#line 11925 "MachineIndependent/glslang_tab.cpp" + break; + + case 653: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4250 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-3].lex).loc); + (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); + } +#line 11934 "MachineIndependent/glslang_tab.cpp" + break; + + case 654: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4254 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); + (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); + } +#line 11944 "MachineIndependent/glslang_tab.cpp" + break; + + case 655: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4259 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc); + (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11953 "MachineIndependent/glslang_tab.cpp" + break; + + case 656: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4263 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-7].lex).loc); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); + (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11963 "MachineIndependent/glslang_tab.cpp" + break; + + case 657: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4268 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc); + (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11972 "MachineIndependent/glslang_tab.cpp" + break; + + case 658: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4272 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-7].lex).loc); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); + (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11982 "MachineIndependent/glslang_tab.cpp" + break; + + case 659: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4277 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc); + (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11991 "MachineIndependent/glslang_tab.cpp" + break; + + case 660: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4281 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-7].lex).loc); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); + (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 12001 "MachineIndependent/glslang_tab.cpp" + break; + + case 661: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ +#line 4288 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); + } +#line 12009 "MachineIndependent/glslang_tab.cpp" + break; + + case 662: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ +#line 4291 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); + } +#line 12017 "MachineIndependent/glslang_tab.cpp" + break; + + case 663: /* spirv_decorate_parameter: FLOATCONSTANT */ +#line 4296 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); + } +#line 12025 "MachineIndependent/glslang_tab.cpp" + break; + + case 664: /* spirv_decorate_parameter: INTCONSTANT */ +#line 4299 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 12033 "MachineIndependent/glslang_tab.cpp" + break; + + case 665: /* spirv_decorate_parameter: UINTCONSTANT */ +#line 4302 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 12041 "MachineIndependent/glslang_tab.cpp" + break; + + case 666: /* spirv_decorate_parameter: BOOLCONSTANT */ +#line 4305 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); + } +#line 12049 "MachineIndependent/glslang_tab.cpp" + break; + + case 667: /* spirv_decorate_id_parameter_list: constant_expression */ +#line 4310 "MachineIndependent/glslang.y" + { + if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool) + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode)); + } +#line 12062 "MachineIndependent/glslang_tab.cpp" + break; + + case 668: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA constant_expression */ +#line 4318 "MachineIndependent/glslang.y" + { + if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && + (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool) + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); + } +#line 12075 "MachineIndependent/glslang_tab.cpp" + break; + + case 669: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ +#line 4328 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate( + parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); + } +#line 12084 "MachineIndependent/glslang_tab.cpp" + break; + + case 670: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ +#line 4332 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); + } +#line 12092 "MachineIndependent/glslang_tab.cpp" + break; + + case 671: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4337 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); + } +#line 12101 "MachineIndependent/glslang_tab.cpp" + break; + + case 672: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4341 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-7].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); + (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); + } +#line 12111 "MachineIndependent/glslang_tab.cpp" + break; + + case 673: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4346 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); + } +#line 12120 "MachineIndependent/glslang_tab.cpp" + break; + + case 674: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4350 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); + (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); + } +#line 12130 "MachineIndependent/glslang_tab.cpp" + break; + + case 675: /* spirv_type_parameter_list: spirv_type_parameter */ +#line 4357 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams); + } +#line 12138 "MachineIndependent/glslang_tab.cpp" + break; + + case 676: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ +#line 4360 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams)); + } +#line 12146 "MachineIndependent/glslang_tab.cpp" + break; + + case 677: /* spirv_type_parameter: constant_expression */ +#line 4365 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion()); + } +#line 12154 "MachineIndependent/glslang_tab.cpp" + break; + + case 678: /* spirv_type_parameter: type_specifier */ +#line 4368 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type)); + } +#line 12162 "MachineIndependent/glslang_tab.cpp" + break; + + case 679: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4373 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); + } +#line 12170 "MachineIndependent/glslang_tab.cpp" + break; + + case 680: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4376 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); + (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); + } +#line 12179 "MachineIndependent/glslang_tab.cpp" + break; + + case 681: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ +#line 4382 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst); + } +#line 12187 "MachineIndependent/glslang_tab.cpp" + break; + + case 682: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ +#line 4385 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst)); + } +#line 12195 "MachineIndependent/glslang_tab.cpp" + break; + + case 683: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ +#line 4390 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string); + } +#line 12203 "MachineIndependent/glslang_tab.cpp" + break; + + case 684: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ +#line 4393 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i); + } +#line 12211 "MachineIndependent/glslang_tab.cpp" break; -#line 10999 "MachineIndependent/glslang_tab.cpp" +#line 12215 "MachineIndependent/glslang_tab.cpp" default: break; } @@ -11220,5 +12436,5 @@ yyreturn: return yyresult; } -#line 4044 "MachineIndependent/glslang.y" +#line 4398 "MachineIndependent/glslang.y" diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h index d6bc00d9e8..596a10e6d9 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h @@ -368,134 +368,144 @@ extern int yydebug; USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */ F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */ F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */ - LEFT_OP = 572, /* LEFT_OP */ - RIGHT_OP = 573, /* RIGHT_OP */ - INC_OP = 574, /* INC_OP */ - DEC_OP = 575, /* DEC_OP */ - LE_OP = 576, /* LE_OP */ - GE_OP = 577, /* GE_OP */ - EQ_OP = 578, /* EQ_OP */ - NE_OP = 579, /* NE_OP */ - AND_OP = 580, /* AND_OP */ - OR_OP = 581, /* OR_OP */ - XOR_OP = 582, /* XOR_OP */ - MUL_ASSIGN = 583, /* MUL_ASSIGN */ - DIV_ASSIGN = 584, /* DIV_ASSIGN */ - ADD_ASSIGN = 585, /* ADD_ASSIGN */ - MOD_ASSIGN = 586, /* MOD_ASSIGN */ - LEFT_ASSIGN = 587, /* LEFT_ASSIGN */ - RIGHT_ASSIGN = 588, /* RIGHT_ASSIGN */ - AND_ASSIGN = 589, /* AND_ASSIGN */ - XOR_ASSIGN = 590, /* XOR_ASSIGN */ - OR_ASSIGN = 591, /* OR_ASSIGN */ - SUB_ASSIGN = 592, /* SUB_ASSIGN */ - STRING_LITERAL = 593, /* STRING_LITERAL */ - LEFT_PAREN = 594, /* LEFT_PAREN */ - RIGHT_PAREN = 595, /* RIGHT_PAREN */ - LEFT_BRACKET = 596, /* LEFT_BRACKET */ - RIGHT_BRACKET = 597, /* RIGHT_BRACKET */ - LEFT_BRACE = 598, /* LEFT_BRACE */ - RIGHT_BRACE = 599, /* RIGHT_BRACE */ - DOT = 600, /* DOT */ - COMMA = 601, /* COMMA */ - COLON = 602, /* COLON */ - EQUAL = 603, /* EQUAL */ - SEMICOLON = 604, /* SEMICOLON */ - BANG = 605, /* BANG */ - DASH = 606, /* DASH */ - TILDE = 607, /* TILDE */ - PLUS = 608, /* PLUS */ - STAR = 609, /* STAR */ - SLASH = 610, /* SLASH */ - PERCENT = 611, /* PERCENT */ - LEFT_ANGLE = 612, /* LEFT_ANGLE */ - RIGHT_ANGLE = 613, /* RIGHT_ANGLE */ - VERTICAL_BAR = 614, /* VERTICAL_BAR */ - CARET = 615, /* CARET */ - AMPERSAND = 616, /* AMPERSAND */ - QUESTION = 617, /* QUESTION */ - INVARIANT = 618, /* INVARIANT */ - HIGH_PRECISION = 619, /* HIGH_PRECISION */ - MEDIUM_PRECISION = 620, /* MEDIUM_PRECISION */ - LOW_PRECISION = 621, /* LOW_PRECISION */ - PRECISION = 622, /* PRECISION */ - PACKED = 623, /* PACKED */ - RESOURCE = 624, /* RESOURCE */ - SUPERP = 625, /* SUPERP */ - FLOATCONSTANT = 626, /* FLOATCONSTANT */ - INTCONSTANT = 627, /* INTCONSTANT */ - UINTCONSTANT = 628, /* UINTCONSTANT */ - BOOLCONSTANT = 629, /* BOOLCONSTANT */ - IDENTIFIER = 630, /* IDENTIFIER */ - TYPE_NAME = 631, /* TYPE_NAME */ - CENTROID = 632, /* CENTROID */ - IN = 633, /* IN */ - OUT = 634, /* OUT */ - INOUT = 635, /* INOUT */ - STRUCT = 636, /* STRUCT */ - VOID = 637, /* VOID */ - WHILE = 638, /* WHILE */ - BREAK = 639, /* BREAK */ - CONTINUE = 640, /* CONTINUE */ - DO = 641, /* DO */ - ELSE = 642, /* ELSE */ - FOR = 643, /* FOR */ - IF = 644, /* IF */ - DISCARD = 645, /* DISCARD */ - RETURN = 646, /* RETURN */ - SWITCH = 647, /* SWITCH */ - CASE = 648, /* CASE */ - DEFAULT = 649, /* DEFAULT */ - TERMINATE_INVOCATION = 650, /* TERMINATE_INVOCATION */ - TERMINATE_RAY = 651, /* TERMINATE_RAY */ - IGNORE_INTERSECTION = 652, /* IGNORE_INTERSECTION */ - UNIFORM = 653, /* UNIFORM */ - SHARED = 654, /* SHARED */ - BUFFER = 655, /* BUFFER */ - FLAT = 656, /* FLAT */ - SMOOTH = 657, /* SMOOTH */ - LAYOUT = 658, /* LAYOUT */ - DOUBLECONSTANT = 659, /* DOUBLECONSTANT */ - INT16CONSTANT = 660, /* INT16CONSTANT */ - UINT16CONSTANT = 661, /* UINT16CONSTANT */ - FLOAT16CONSTANT = 662, /* FLOAT16CONSTANT */ - INT32CONSTANT = 663, /* INT32CONSTANT */ - UINT32CONSTANT = 664, /* UINT32CONSTANT */ - INT64CONSTANT = 665, /* INT64CONSTANT */ - UINT64CONSTANT = 666, /* UINT64CONSTANT */ - SUBROUTINE = 667, /* SUBROUTINE */ - DEMOTE = 668, /* DEMOTE */ - PAYLOADNV = 669, /* PAYLOADNV */ - PAYLOADINNV = 670, /* PAYLOADINNV */ - HITATTRNV = 671, /* HITATTRNV */ - CALLDATANV = 672, /* CALLDATANV */ - CALLDATAINNV = 673, /* CALLDATAINNV */ - PAYLOADEXT = 674, /* PAYLOADEXT */ - PAYLOADINEXT = 675, /* PAYLOADINEXT */ - HITATTREXT = 676, /* HITATTREXT */ - CALLDATAEXT = 677, /* CALLDATAEXT */ - CALLDATAINEXT = 678, /* CALLDATAINEXT */ - PATCH = 679, /* PATCH */ - SAMPLE = 680, /* SAMPLE */ - NONUNIFORM = 681, /* NONUNIFORM */ - COHERENT = 682, /* COHERENT */ - VOLATILE = 683, /* VOLATILE */ - RESTRICT = 684, /* RESTRICT */ - READONLY = 685, /* READONLY */ - WRITEONLY = 686, /* WRITEONLY */ - DEVICECOHERENT = 687, /* DEVICECOHERENT */ - QUEUEFAMILYCOHERENT = 688, /* QUEUEFAMILYCOHERENT */ - WORKGROUPCOHERENT = 689, /* WORKGROUPCOHERENT */ - SUBGROUPCOHERENT = 690, /* SUBGROUPCOHERENT */ - NONPRIVATE = 691, /* NONPRIVATE */ - SHADERCALLCOHERENT = 692, /* SHADERCALLCOHERENT */ - NOPERSPECTIVE = 693, /* NOPERSPECTIVE */ - EXPLICITINTERPAMD = 694, /* EXPLICITINTERPAMD */ - PERVERTEXNV = 695, /* PERVERTEXNV */ - PERPRIMITIVENV = 696, /* PERPRIMITIVENV */ - PERVIEWNV = 697, /* PERVIEWNV */ - PERTASKNV = 698, /* PERTASKNV */ - PRECISE = 699 /* PRECISE */ + SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */ + SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */ + SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */ + SPIRV_DECORATE = 575, /* SPIRV_DECORATE */ + SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */ + SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */ + SPIRV_TYPE = 578, /* SPIRV_TYPE */ + SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */ + SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */ + SPIRV_LITERAL = 581, /* SPIRV_LITERAL */ + LEFT_OP = 582, /* LEFT_OP */ + RIGHT_OP = 583, /* RIGHT_OP */ + INC_OP = 584, /* INC_OP */ + DEC_OP = 585, /* DEC_OP */ + LE_OP = 586, /* LE_OP */ + GE_OP = 587, /* GE_OP */ + EQ_OP = 588, /* EQ_OP */ + NE_OP = 589, /* NE_OP */ + AND_OP = 590, /* AND_OP */ + OR_OP = 591, /* OR_OP */ + XOR_OP = 592, /* XOR_OP */ + MUL_ASSIGN = 593, /* MUL_ASSIGN */ + DIV_ASSIGN = 594, /* DIV_ASSIGN */ + ADD_ASSIGN = 595, /* ADD_ASSIGN */ + MOD_ASSIGN = 596, /* MOD_ASSIGN */ + LEFT_ASSIGN = 597, /* LEFT_ASSIGN */ + RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */ + AND_ASSIGN = 599, /* AND_ASSIGN */ + XOR_ASSIGN = 600, /* XOR_ASSIGN */ + OR_ASSIGN = 601, /* OR_ASSIGN */ + SUB_ASSIGN = 602, /* SUB_ASSIGN */ + STRING_LITERAL = 603, /* STRING_LITERAL */ + LEFT_PAREN = 604, /* LEFT_PAREN */ + RIGHT_PAREN = 605, /* RIGHT_PAREN */ + LEFT_BRACKET = 606, /* LEFT_BRACKET */ + RIGHT_BRACKET = 607, /* RIGHT_BRACKET */ + LEFT_BRACE = 608, /* LEFT_BRACE */ + RIGHT_BRACE = 609, /* RIGHT_BRACE */ + DOT = 610, /* DOT */ + COMMA = 611, /* COMMA */ + COLON = 612, /* COLON */ + EQUAL = 613, /* EQUAL */ + SEMICOLON = 614, /* SEMICOLON */ + BANG = 615, /* BANG */ + DASH = 616, /* DASH */ + TILDE = 617, /* TILDE */ + PLUS = 618, /* PLUS */ + STAR = 619, /* STAR */ + SLASH = 620, /* SLASH */ + PERCENT = 621, /* PERCENT */ + LEFT_ANGLE = 622, /* LEFT_ANGLE */ + RIGHT_ANGLE = 623, /* RIGHT_ANGLE */ + VERTICAL_BAR = 624, /* VERTICAL_BAR */ + CARET = 625, /* CARET */ + AMPERSAND = 626, /* AMPERSAND */ + QUESTION = 627, /* QUESTION */ + INVARIANT = 628, /* INVARIANT */ + HIGH_PRECISION = 629, /* HIGH_PRECISION */ + MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */ + LOW_PRECISION = 631, /* LOW_PRECISION */ + PRECISION = 632, /* PRECISION */ + PACKED = 633, /* PACKED */ + RESOURCE = 634, /* RESOURCE */ + SUPERP = 635, /* SUPERP */ + FLOATCONSTANT = 636, /* FLOATCONSTANT */ + INTCONSTANT = 637, /* INTCONSTANT */ + UINTCONSTANT = 638, /* UINTCONSTANT */ + BOOLCONSTANT = 639, /* BOOLCONSTANT */ + IDENTIFIER = 640, /* IDENTIFIER */ + TYPE_NAME = 641, /* TYPE_NAME */ + CENTROID = 642, /* CENTROID */ + IN = 643, /* IN */ + OUT = 644, /* OUT */ + INOUT = 645, /* INOUT */ + STRUCT = 646, /* STRUCT */ + VOID = 647, /* VOID */ + WHILE = 648, /* WHILE */ + BREAK = 649, /* BREAK */ + CONTINUE = 650, /* CONTINUE */ + DO = 651, /* DO */ + ELSE = 652, /* ELSE */ + FOR = 653, /* FOR */ + IF = 654, /* IF */ + DISCARD = 655, /* DISCARD */ + RETURN = 656, /* RETURN */ + SWITCH = 657, /* SWITCH */ + CASE = 658, /* CASE */ + DEFAULT = 659, /* DEFAULT */ + TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */ + TERMINATE_RAY = 661, /* TERMINATE_RAY */ + IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */ + UNIFORM = 663, /* UNIFORM */ + SHARED = 664, /* SHARED */ + BUFFER = 665, /* BUFFER */ + FLAT = 666, /* FLAT */ + SMOOTH = 667, /* SMOOTH */ + LAYOUT = 668, /* LAYOUT */ + DOUBLECONSTANT = 669, /* DOUBLECONSTANT */ + INT16CONSTANT = 670, /* INT16CONSTANT */ + UINT16CONSTANT = 671, /* UINT16CONSTANT */ + FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */ + INT32CONSTANT = 673, /* INT32CONSTANT */ + UINT32CONSTANT = 674, /* UINT32CONSTANT */ + INT64CONSTANT = 675, /* INT64CONSTANT */ + UINT64CONSTANT = 676, /* UINT64CONSTANT */ + SUBROUTINE = 677, /* SUBROUTINE */ + DEMOTE = 678, /* DEMOTE */ + PAYLOADNV = 679, /* PAYLOADNV */ + PAYLOADINNV = 680, /* PAYLOADINNV */ + HITATTRNV = 681, /* HITATTRNV */ + CALLDATANV = 682, /* CALLDATANV */ + CALLDATAINNV = 683, /* CALLDATAINNV */ + PAYLOADEXT = 684, /* PAYLOADEXT */ + PAYLOADINEXT = 685, /* PAYLOADINEXT */ + HITATTREXT = 686, /* HITATTREXT */ + CALLDATAEXT = 687, /* CALLDATAEXT */ + CALLDATAINEXT = 688, /* CALLDATAINEXT */ + PATCH = 689, /* PATCH */ + SAMPLE = 690, /* SAMPLE */ + NONUNIFORM = 691, /* NONUNIFORM */ + COHERENT = 692, /* COHERENT */ + VOLATILE = 693, /* VOLATILE */ + RESTRICT = 694, /* RESTRICT */ + READONLY = 695, /* READONLY */ + WRITEONLY = 696, /* WRITEONLY */ + DEVICECOHERENT = 697, /* DEVICECOHERENT */ + QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */ + WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */ + SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */ + NONPRIVATE = 701, /* NONPRIVATE */ + SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */ + NOPERSPECTIVE = 703, /* NOPERSPECTIVE */ + EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */ + PERVERTEXNV = 705, /* PERVERTEXNV */ + PERPRIMITIVENV = 706, /* PERPRIMITIVENV */ + PERVIEWNV = 707, /* PERVIEWNV */ + PERTASKNV = 708, /* PERTASKNV */ + PRECISE = 709 /* PRECISE */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -527,6 +537,9 @@ union YYSTYPE glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; glslang::TAttributes* attributes; + glslang::TSpirvRequirement* spirvReq; + glslang::TSpirvInstruction* spirvInst; + glslang::TSpirvTypeParameters* spirvTypeParams; }; union { glslang::TPublicType type; @@ -540,7 +553,7 @@ union YYSTYPE glslang::TArraySizes* typeParameters; } interm; -#line 544 "MachineIndependent/glslang_tab.cpp.h" +#line 557 "MachineIndependent/glslang_tab.cpp.h" }; typedef union YYSTYPE YYSTYPE; diff --git a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp index 5ce3e47280..a0fade16c0 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp @@ -696,6 +696,10 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpConstructReference: out.debug << "Construct reference type"; break; +#ifndef GLSLANG_WEB + case EOpSpirvInst: out.debug << "spirv_instruction"; break; +#endif + default: out.debug.message(EPrefixError, "Bad unary op"); } @@ -886,6 +890,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpTime: out.debug << "time"; break; case EOpAtomicAdd: out.debug << "AtomicAdd"; break; + case EOpAtomicSubtract: out.debug << "AtomicSubtract"; break; case EOpAtomicMin: out.debug << "AtomicMin"; break; case EOpAtomicMax: out.debug << "AtomicMax"; break; case EOpAtomicAnd: out.debug << "AtomicAnd"; break; @@ -1084,6 +1089,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; case EOpTraceNV: out.debug << "traceNV"; break; + case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break; case EOpTraceKHR: out.debug << "traceRayKHR"; break; case EOpReportIntersection: out.debug << "reportIntersectionNV"; break; case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break; @@ -1125,6 +1131,10 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break; case EOpDebugPrintf: out.debug << "Debug printf"; break; +#ifndef GLSLANG_WEB + case EOpSpirvInst: out.debug << "spirv_instruction"; break; +#endif + default: out.debug.message(EPrefixError, "Bad aggregation op"); } @@ -1486,6 +1496,9 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) if (xfbMode) infoSink.debug << "in xfb mode\n"; + if (getSubgroupUniformControlFlow()) + infoSink.debug << "subgroup_uniform_control_flow\n"; + switch (language) { case EShLangVertex: break; diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp index c42e74fa5f..7e12864f36 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp @@ -210,8 +210,8 @@ struct TResolverUniformAdaptor { ent.newIndex = -1; const bool isValid = resolver.validateBinding(stage, ent); if (isValid) { - resolver.resolveBinding(ent.stage, ent); resolver.resolveSet(ent.stage, ent); + resolver.resolveBinding(ent.stage, ent); resolver.resolveUniformLocation(ent.stage, ent); if (ent.newBinding != -1) { @@ -317,15 +317,13 @@ private: }; // The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings +// xxTODO: maybe this logic should be moved into the resolver's "validateInOut" and "validateUniform" struct TSymbolValidater { TSymbolValidater(TIoMapResolver& r, TInfoSink& i, TVarLiveMap* in[EShLangCount], TVarLiveMap* out[EShLangCount], TVarLiveMap* uniform[EShLangCount], bool& hadError, EProfile profile, int version) - : preStage(EShLangCount) - , currentStage(EShLangCount) - , nextStage(EShLangCount) - , resolver(r) + : resolver(r) , infoSink(i) , hadError(hadError) , profile(profile) @@ -438,17 +436,23 @@ struct TSymbolValidater TIntermSymbol* base = ent1.symbol; const TType& type = ent1.symbol->getType(); const TString& name = entKey.first; - EShLanguage stage = ent1.stage; TString mangleName1, mangleName2; - if (currentStage != stage) { - preStage = currentStage; - currentStage = stage; - nextStage = EShLangCount; - for (int i = currentStage + 1; i < EShLangCount; i++) { - if (inVarMaps[i] != nullptr) { - nextStage = static_cast<EShLanguage>(i); - break; - } + EShLanguage stage = ent1.stage; + EShLanguage preStage, currentStage, nextStage; + + preStage = EShLangCount; + for (int i = stage - 1; i >= 0; i--) { + if (inVarMaps[i] != nullptr) { + preStage = static_cast<EShLanguage>(i); + break; + } + } + currentStage = stage; + nextStage = EShLangCount; + for (int i = stage + 1; i < EShLangCount; i++) { + if (inVarMaps[i] != nullptr) { + nextStage = static_cast<EShLanguage>(i); + break; } } @@ -459,6 +463,9 @@ struct TSymbolValidater type.appendMangledName(mangleName1); } + + // basic checking that symbols match + // more extensive checking in the link stage if (base->getQualifier().storage == EvqVaryingIn) { // validate stage in; if (preStage == EShLangCount) @@ -484,8 +491,7 @@ struct TSymbolValidater if (ent2->second.symbol->getType().getQualifier().isArrayedIo(preStage)) { TType subType(ent2->second.symbol->getType(), 0); subType.appendMangledName(mangleName2); - } - else { + } else { ent2->second.symbol->getType().appendMangledName(mangleName2); } @@ -536,8 +542,7 @@ struct TSymbolValidater if (ent2->second.symbol->getType().getQualifier().isArrayedIo(nextStage)) { TType subType(ent2->second.symbol->getType(), 0); subType.appendMangledName(mangleName2); - } - else { + } else { ent2->second.symbol->getType().appendMangledName(mangleName2); } if (mangleName1 == mangleName2) @@ -550,7 +555,7 @@ struct TSymbolValidater } return; } - } else if (base->getQualifier().isUniformOrBuffer() && ! base->getQualifier().isPushConstant()) { + } else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant()) { // validate uniform type; for (int i = 0; i < EShLangCount; i++) { if (i != currentStage && outVarMaps[i] != nullptr) { @@ -558,6 +563,7 @@ struct TSymbolValidater if (ent2 != uniformVarMap[i]->end()) { ent2->second.symbol->getType().appendMangledName(mangleName2); if (mangleName1 != mangleName2) { + ent2->second.symbol->getType().sameElementType(type); TString err = "Invalid Uniform variable type : " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; @@ -608,8 +614,7 @@ struct TSymbolValidater } TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount]; - // Use for mark pre stage, to get more interface symbol information. - EShLanguage preStage, currentStage, nextStage; + // Use for mark current shader stage for resolver TIoMapResolver& resolver; TInfoSink& infoSink; @@ -749,14 +754,18 @@ TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate , nextOutputLocation(0) { memset(stageMask, false, sizeof(bool) * (EShLangCount + 1)); + memset(stageIntermediates, 0, sizeof(TIntermediate*) * (EShLangCount)); + stageIntermediates[intermediate.getStage()] = &intermediate; } -int TDefaultIoResolverBase::getBaseBinding(TResourceType res, unsigned int set) const { - return selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set)); +int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const { + return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set)) + : selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set)); } -const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding() const { - return intermediate.getResourceSetBinding(); +const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const { + return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding() + : intermediate.getResourceSetBinding(); } bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); } @@ -797,14 +806,14 @@ int TDefaultIoResolverBase::getFreeSlot(int set, int base, int size) { return reserveSlot(set, base, size); } -int TDefaultIoResolverBase::resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) { +int TDefaultIoResolverBase::resolveSet(EShLanguage stage, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); if (type.getQualifier().hasSet()) { return ent.newSet = type.getQualifier().layoutSet; } // If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN) - if (getResourceSetBinding().size() == 1) { - return ent.newSet = atoi(getResourceSetBinding()[0].c_str()); + if (getResourceSetBinding(stage).size() == 1) { + return ent.newSet = atoi(getResourceSetBinding(stage)[0].c_str()); } return ent.newSet = 0; } @@ -925,7 +934,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf preStage = currentStage; currentStage = stage; } - // kick out of not doing this + // kick out if not doing this if (! doAutoLocationMapping()) { return ent.newLocation = -1; } @@ -1073,7 +1082,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn return ent.newLocation = location; } -int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) { +int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); // On OpenGL arrays of opaque types take a separate binding for each element @@ -1086,30 +1095,32 @@ int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& // There is no 'set' qualifier in OpenGL shading language, each resource has its own // binding name space, so remap the 'set' to resource type which make each resource // binding is valid from 0 to MAX_XXRESOURCE_BINDINGS - int set = resource; + int set = intermediate.getSpv().openGl != 0 ? resource : ent.newSet; + int resourceKey = set; if (resource < EResCount) { if (type.getQualifier().hasBinding()) { - ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings); - return ent.newBinding; - } else if (ent.live && doAutoBindingMapping()) { + int newBinding = reserveSlot(resourceKey, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings); + return ent.newBinding = newBinding; + + } else { // The resource in current stage is not declared with binding, but it is possible declared // with explicit binding in other stages, find the resourceSlotMap firstly to check whether // the resource has binding, don't need to allocate if it already has a binding bool hasBinding = false; - if (! resourceSlotMap[resource].empty()) { - TVarSlotMap::iterator iter = resourceSlotMap[resource].find(name); - if (iter != resourceSlotMap[resource].end()) { + ent.newBinding = -1; // leave as -1 if it isn't set below + + if (! resourceSlotMap[resourceKey].empty()) { + TVarSlotMap::iterator iter = resourceSlotMap[resourceKey].find(name); + if (iter != resourceSlotMap[resourceKey].end()) { hasBinding = true; ent.newBinding = iter->second; } } - if (! hasBinding) { - TVarSlotMap varSlotMap; + if (!hasBinding && (ent.live && doAutoBindingMapping())) { // find free slot, the caller did make sure it passes all vars with binding // first and now all are passed that do not have a binding and needs one - int binding = getFreeSlot(resource, getBaseBinding(resource, set), numBindings); - varSlotMap[name] = binding; - resourceSlotMap[resource] = varSlotMap; + int binding = getFreeSlot(resourceKey, getBaseBinding(stage, resource, set), numBindings); + resourceSlotMap[resourceKey][name] = binding; ent.newBinding = binding; } return ent.newBinding; @@ -1211,16 +1222,20 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); - int resource = getResourceType(type); + TResourceType resource = getResourceType(type); + int set = intermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent); + int resourceKey = set; + if (type.getQualifier().hasBinding()) { - TVarSlotMap& varSlotMap = resourceSlotMap[resource]; + TVarSlotMap& varSlotMap = resourceSlotMap[resourceKey]; TVarSlotMap::iterator iter = varSlotMap.find(name); - int binding = type.getQualifier().layoutBinding; + int binding = type.getQualifier().layoutBinding + getBaseBinding(ent.stage, resource, set); + if (iter == varSlotMap.end()) { // Reserve the slots for the ubo, ssbo and opaques who has explicit binding - int numBindings = type.isSizedArray() ? type.getCumulativeArraySize() : 1; + int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; varSlotMap[name] = binding; - reserveSlot(resource, binding, numBindings); + reserveSlot(resourceKey, binding, numBindings); } else { // Allocate binding by name for OpenGL driver, so the resource in different // stages should be declared with the same binding @@ -1269,7 +1284,7 @@ struct TDefaultIoResolver : public TDefaultIoResolverBase { return EResCount; } - int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override { + int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override { const TType& type = ent.symbol->getType(); const int set = getLayoutSet(type); // On OpenGL arrays of opaque types take a seperate binding for each element @@ -1278,11 +1293,11 @@ struct TDefaultIoResolver : public TDefaultIoResolverBase { if (resource < EResCount) { if (type.getQualifier().hasBinding()) { return ent.newBinding = reserveSlot( - set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings); + set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings); } else if (ent.live && doAutoBindingMapping()) { // find free slot, the caller did make sure it passes all vars with binding // first and now all are passed that do not have a binding and needs one - return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set), numBindings); + return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set), numBindings); } } return ent.newBinding = -1; @@ -1354,17 +1369,17 @@ struct TDefaultHlslIoResolver : public TDefaultIoResolverBase { return EResCount; } - int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override { + int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override { const TType& type = ent.symbol->getType(); const int set = getLayoutSet(type); TResourceType resource = getResourceType(type); if (resource < EResCount) { if (type.getQualifier().hasBinding()) { - return ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding); + return ent.newBinding = reserveSlot(set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding); } else if (ent.live && doAutoBindingMapping()) { // find free slot, the caller did make sure it passes all vars with binding // first and now all are passed that do not have a binding and needs one - return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set)); + return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set)); } } return ent.newBinding = -1; @@ -1403,10 +1418,10 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSi else resolver = &defaultResolver; } - resolver->addStage(stage); #else resolver = &defaultResolver; #endif + resolver->addStage(stage, intermediate); TVarLiveMap inVarMap, outVarMap, uniformVarMap; TVarLiveVector inVector, outVector, uniformVector; @@ -1502,10 +1517,21 @@ bool TGlslIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TIn } // if no resolver is provided, use the default resolver with the given shifts and auto map settings TDefaultGlslIoResolver defaultResolver(intermediate); +#ifdef ENABLE_HLSL + TDefaultHlslIoResolver defaultHlslResolver(intermediate); + if (resolver == nullptr) { + // TODO: use a passed in IO mapper for this + if (intermediate.usingHlslIoMapping()) + resolver = &defaultHlslResolver; + else + resolver = &defaultResolver; + } +#else if (resolver == nullptr) { resolver = &defaultResolver; } - resolver->addStage(stage); +#endif + resolver->addStage(stage, intermediate); inVarMaps[stage] = new TVarLiveMap(); outVarMaps[stage] = new TVarLiveMap(); uniformVarMap[stage] = new TVarLiveMap(); TVarGatherTraverser iter_binding_all(intermediate, true, *inVarMaps[stage], *outVarMaps[stage], *uniformVarMap[stage]); @@ -1547,15 +1573,51 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { TResolverInOutAdaptor inOutResolve(EShLangCount, *resolver, infoSink, hadError); TSymbolValidater symbolValidater(*resolver, infoSink, inVarMaps, outVarMaps, uniformVarMap, hadError, profile, version); + + TVarLiveVector inVectors[EShLangCount]; + TVarLiveVector outVectors[EShLangCount]; TVarLiveVector uniformVector; + resolver->beginResolve(EShLangCount); for (int stage = EShLangVertex; stage < EShLangCount; stage++) { if (inVarMaps[stage] != nullptr) { inOutResolve.setStage(EShLanguage(stage)); - for (auto& var : *(inVarMaps[stage])) { symbolValidater(var); } - for (auto& var : *(inVarMaps[stage])) { inOutResolve(var); } - for (auto& var : *(outVarMaps[stage])) { symbolValidater(var); } - for (auto& var : *(outVarMaps[stage])) { inOutResolve(var); } + + // copy vars into a sorted list + std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(), + [&inVectors, stage](TVarLivePair p) { inVectors[stage].push_back(p); }); + std::sort(inVectors[stage].begin(), inVectors[stage].end(), + [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { + return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); + }); + + std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(), + [&outVectors, stage](TVarLivePair p) { outVectors[stage].push_back(p); }); + std::sort(outVectors[stage].begin(), outVectors[stage].end(), + [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { + return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); + }); + + for (auto& var : inVectors[stage]) { symbolValidater(var); } + for (auto& var : inVectors[stage]) { inOutResolve(var); } + for (auto& var : outVectors[stage]) { symbolValidater(var); } + for (auto& var : outVectors[stage]) { inOutResolve(var); } + + // copy results back into maps + std::for_each(inVectors[stage].begin(), inVectors[stage].end(), + [this, stage](TVarLivePair p) { + auto at = inVarMaps[stage]->find(p.first); + if (at != inVarMaps[stage]->end()) + at->second = p.second; + }); + + std::for_each(outVectors[stage].begin(), outVectors[stage].end(), + [this, stage](TVarLivePair p) { + auto at = outVarMaps[stage]->find(p.first); + if (at != outVarMaps[stage]->end()) + at->second = p.second; + }); + } if (uniformVarMap[stage] != nullptr) { uniformResolve.setStage(EShLanguage(stage)); @@ -1563,7 +1625,7 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { } } std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { - return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); + return TVarEntryInfo::TOrderByPriorityAndLive()(p1.second, p2.second); }); for (auto& var : uniformVector) { symbolValidater(var); } for (auto& var : uniformVector) { uniformResolve(var); } diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h index 7934c4a9d1..07357c2ef4 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h +++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h @@ -52,7 +52,7 @@ namespace glslang { class TIntermediate; struct TVarEntryInfo { - int id; + long long id; TIntermSymbol* symbol; bool live; int newBinding; @@ -87,6 +87,35 @@ struct TVarEntryInfo { return lPoints > rPoints; } }; + + struct TOrderByPriorityAndLive { + // ordering: + // 1) do live variables first + // 2) has both binding and set + // 3) has binding but no set + // 4) has no binding but set + // 5) has no binding and no set + inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { + + const TQualifier& lq = l.symbol->getQualifier(); + const TQualifier& rq = r.symbol->getQualifier(); + + // simple rules: + // has binding gives 2 points + // has set gives 1 point + // who has the most points is more important. + int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); + int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); + + if (l.live != r.live) + return l.live > r.live; + + if (lPoints != rPoints) + return lPoints > rPoints; + + return l.id < r.id; + } + }; }; // Base class for shared TIoMapResolver services, used by several derivations. @@ -107,8 +136,8 @@ public: void endCollect(EShLanguage) override {} void reserverResourceSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {} void reserverStorageSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {} - int getBaseBinding(TResourceType res, unsigned int set) const; - const std::vector<std::string>& getResourceSetBinding() const; + int getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const; + const std::vector<std::string>& getResourceSetBinding(EShLanguage stage) const; virtual TResourceType getResourceType(const glslang::TType& type) = 0; bool doAutoBindingMapping() const; bool doAutoLocationMapping() const; @@ -122,9 +151,11 @@ public: int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override; int resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveInOutIndex(EShLanguage /*stage*/, TVarEntryInfo& ent) override; - void addStage(EShLanguage stage) override { - if (stage < EShLangCount) + void addStage(EShLanguage stage, TIntermediate& stageIntermediate) override { + if (stage < EShLangCount) { stageMask[stage] = true; + stageIntermediates[stage] = &stageIntermediate; + } } uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage); @@ -139,6 +170,8 @@ protected: int nextInputLocation; int nextOutputLocation; bool stageMask[EShLangCount + 1]; + const TIntermediate* stageIntermediates[EShLangCount]; + // Return descriptor set specific base if there is one, and the generic base otherwise. int selectBaseBinding(int base, int descriptorSetBase) const { return descriptorSetBase != -1 ? descriptorSetBase : base; diff --git a/thirdparty/glslang/glslang/MachineIndependent/limits.cpp b/thirdparty/glslang/glslang/MachineIndependent/limits.cpp index 51d9300341..391570579d 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/limits.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/limits.cpp @@ -63,14 +63,14 @@ namespace glslang { class TInductiveTraverser : public TIntermTraverser { public: - TInductiveTraverser(int id, TSymbolTable& st) + TInductiveTraverser(long long id, TSymbolTable& st) : loopId(id), symbolTable(st), bad(false) { } virtual bool visitBinary(TVisit, TIntermBinary* node); virtual bool visitUnary(TVisit, TIntermUnary* node); virtual bool visitAggregate(TVisit, TIntermAggregate* node); - int loopId; // unique ID of the symbol that's the loop inductive variable + long long loopId; // unique ID of the symbol that's the loop inductive variable TSymbolTable& symbolTable; bool bad; TSourceLoc badLoc; @@ -129,7 +129,7 @@ bool TInductiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* n // // External function to call for loop check. // -void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, int loopId, TSymbolTable& symbolTable) +void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, long long loopId, TSymbolTable& symbolTable) { TInductiveTraverser it(loopId, symbolTable); diff --git a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp index 4e84adbf0a..9656e2e7e0 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp @@ -48,6 +48,7 @@ #include "localintermediate.h" #include "../Include/InfoSink.h" +#include "SymbolTable.h" namespace glslang { @@ -89,6 +90,56 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) #endif } +// +// check that link objects between stages +// +void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit) { + if (unit.treeRoot == nullptr || treeRoot == nullptr) + return; + + // Get the linker-object lists + TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); + TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence(); + + // filter unitLinkerObjects to only contain uniforms + auto end = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(), + [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqUniform && + node->getAsSymbolNode()->getQualifier().storage != EvqBuffer; }); + unitLinkerObjects.resize(end - unitLinkerObjects.begin()); + + // merge uniforms and do error checking + bool mergeExistingOnly = false; + mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly); + mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); +} + +// +// do error checking on the shader boundary in / out vars +// +void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) { + if (unit.treeRoot == nullptr || treeRoot == nullptr) + return; + + // Get copies of the linker-object lists + TIntermSequence linkerObjects = findLinkerObjects()->getSequence(); + TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence(); + + // filter linkerObjects to only contain out variables + auto end = std::remove_if(linkerObjects.begin(), linkerObjects.end(), + [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingOut; }); + linkerObjects.resize(end - linkerObjects.begin()); + + // filter unitLinkerObjects to only contain in variables + auto unitEnd = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(), + [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingIn; }); + unitLinkerObjects.resize(unitEnd - unitLinkerObjects.begin()); + + // do matching and error checking + mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); + + // TODO: final check; make sure that any statically used `in` have matching `out` written to +} + void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit) { if (unit.getNumEntryPoints() > 0) { @@ -136,6 +187,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) MERGE_MAX(spvVersion.vulkanGlsl); MERGE_MAX(spvVersion.vulkan); MERGE_MAX(spvVersion.openGl); + MERGE_TRUE(spvVersion.vulkanRelaxed); numErrors += unit.getNumErrors(); // Only one push_constant is allowed, mergeLinkerObjects() will ensure the push_constant @@ -264,6 +316,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) MERGE_TRUE(useUnknownFormat); MERGE_TRUE(hlslOffsets); MERGE_TRUE(useStorageBuffer); + MERGE_TRUE(invariantAll); MERGE_TRUE(hlslIoMapping); // TODO: sourceFile @@ -306,12 +359,14 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit) // Map by global name to unique ID to rationalize the same object having // differing IDs in different trees. TIdMaps idMaps; - int maxId; - seedIdMap(idMaps, maxId); - remapIds(idMaps, maxId + 1, unit); + long long idShift; + seedIdMap(idMaps, idShift); + remapIds(idMaps, idShift + 1, unit); mergeBodies(infoSink, globals, unitGlobals); - mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects); + bool mergeExistingOnly = false; + mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly); + mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end()); } @@ -329,14 +384,14 @@ static const TString& getNameForIdMap(TIntermSymbol* symbol) // Traverser that seeds an ID map with all built-ins, and tracks the -// maximum ID used. +// maximum ID used, currently using (maximum ID + 1) as new symbol id shift seed. +// Level id will keep same after shifting. // (It would be nice to put this in a function, but that causes warnings // on having no bodies for the copy-constructor/operator=.) class TBuiltInIdTraverser : public TIntermTraverser { public: - TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), maxId(0) { } + TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), idShift(0) { } // If it's a built in, add it to the map. - // Track the max ID. virtual void visitSymbol(TIntermSymbol* symbol) { const TQualifier& qualifier = symbol->getType().getQualifier(); @@ -344,14 +399,16 @@ public: TShaderInterface si = symbol->getType().getShaderInterface(); idMaps[si][getNameForIdMap(symbol)] = symbol->getId(); } - maxId = std::max(maxId, symbol->getId()); + idShift = (symbol->getId() & ~TSymbolTable::uniqueIdMask) | + std::max(idShift & TSymbolTable::uniqueIdMask, + symbol->getId() & TSymbolTable::uniqueIdMask); } - int getMaxId() const { return maxId; } + long long getIdShift() const { return idShift; } protected: TBuiltInIdTraverser(TBuiltInIdTraverser&); TBuiltInIdTraverser& operator=(TBuiltInIdTraverser&); TIdMaps& idMaps; - int maxId; + long long idShift; }; // Traverser that seeds an ID map with non-builtins. @@ -377,12 +434,12 @@ protected: }; // Initialize the the ID map with what we know of 'this' AST. -void TIntermediate::seedIdMap(TIdMaps& idMaps, int& maxId) +void TIntermediate::seedIdMap(TIdMaps& idMaps, long long& idShift) { // all built-ins everywhere need to align on IDs and contribute to the max ID TBuiltInIdTraverser builtInIdTraverser(idMaps); treeRoot->traverse(&builtInIdTraverser); - maxId = builtInIdTraverser.getMaxId(); + idShift = builtInIdTraverser.getIdShift() & TSymbolTable::uniqueIdMask; // user variables in the linker object list need to align on ids TUserIdTraverser userIdTraverser(idMaps); @@ -394,7 +451,7 @@ void TIntermediate::seedIdMap(TIdMaps& idMaps, int& maxId) // on having no bodies for the copy-constructor/operator=.) class TRemapIdTraverser : public TIntermTraverser { public: - TRemapIdTraverser(const TIdMaps& idMaps, int idShift) : idMaps(idMaps), idShift(idShift) { } + TRemapIdTraverser(const TIdMaps& idMaps, long long idShift) : idMaps(idMaps), idShift(idShift) { } // Do the mapping: // - if the same symbol, adopt the 'this' ID // - otherwise, ensure a unique ID by shifting to a new space @@ -406,7 +463,9 @@ public: TShaderInterface si = symbol->getType().getShaderInterface(); auto it = idMaps[si].find(getNameForIdMap(symbol)); if (it != idMaps[si].end()) { - symbol->changeId(it->second); + uint64_t id = (symbol->getId() & ~TSymbolTable::uniqueIdMask) | + (it->second & TSymbolTable::uniqueIdMask); + symbol->changeId(id); remapped = true; } } @@ -417,10 +476,10 @@ protected: TRemapIdTraverser(TRemapIdTraverser&); TRemapIdTraverser& operator=(TRemapIdTraverser&); const TIdMaps& idMaps; - int idShift; + long long idShift; }; -void TIntermediate::remapIds(const TIdMaps& idMaps, int idShift, TIntermediate& unit) +void TIntermediate::remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate& unit) { // Remap all IDs to either share or be unique, as dictated by the idMap and idShift. TRemapIdTraverser idTraverser(idMaps, idShift); @@ -451,11 +510,193 @@ void TIntermediate::mergeBodies(TInfoSink& infoSink, TIntermSequence& globals, c globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1); } +static inline bool isSameInterface(TIntermSymbol* symbol, EShLanguage stage, TIntermSymbol* unitSymbol, EShLanguage unitStage) { + return // 1) same stage and same shader interface + (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) || + // 2) accross stages and both are uniform or buffer + (symbol->getQualifier().storage == EvqUniform && unitSymbol->getQualifier().storage == EvqUniform) || + (symbol->getQualifier().storage == EvqBuffer && unitSymbol->getQualifier().storage == EvqBuffer) || + // 3) in/out matched across stage boundary + (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut && unitSymbol->getQualifier().storage == EvqVaryingIn) || + (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut); +} + +// +// Global Unfiform block stores any default uniforms (i.e. uniforms without a block) +// If two linked stages declare the same member, they are meant to be the same uniform +// and need to be in the same block +// merge the members of different stages to allow them to be linked properly +// as a single block +// +void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly) +{ + TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); + TIntermSequence& unitLinkerObjects = unit.findLinkerObjects()->getSequence(); + + // build lists of default blocks from the intermediates + TIntermSequence defaultBlocks; + TIntermSequence unitDefaultBlocks; + + auto filter = [](TIntermSequence& list, TIntermNode* node) { + if (node->getAsSymbolNode()->getQualifier().defaultBlock) { + list.push_back(node); + } + }; + + std::for_each(linkerObjects.begin(), linkerObjects.end(), + [&defaultBlocks, &filter](TIntermNode* node) { + filter(defaultBlocks, node); + }); + std::for_each(unitLinkerObjects.begin(), unitLinkerObjects.end(), + [&unitDefaultBlocks, &filter](TIntermNode* node) { + filter(unitDefaultBlocks, node); + }); + + auto itUnitBlock = unitDefaultBlocks.begin(); + for (; itUnitBlock != unitDefaultBlocks.end(); itUnitBlock++) { + + bool add = !mergeExistingOnly; + auto itBlock = defaultBlocks.begin(); + + for (; itBlock != defaultBlocks.end(); itBlock++) { + TIntermSymbol* block = (*itBlock)->getAsSymbolNode(); + TIntermSymbol* unitBlock = (*itUnitBlock)->getAsSymbolNode(); + + assert(block && unitBlock); + + // if the two default blocks match, then merge their definitions + if (block->getType().getTypeName() == unitBlock->getType().getTypeName() && + block->getQualifier().storage == unitBlock->getQualifier().storage) { + add = false; + mergeBlockDefinitions(infoSink, block, unitBlock, &unit); + } + } + if (add) { + // push back on original list; won't change the size of the list we're iterating over + linkerObjects.push_back(*itUnitBlock); + } + } +} + +void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) { + if (block->getType() == unitBlock->getType()) { + return; + } + + if (block->getType().getTypeName() != unitBlock->getType().getTypeName() || + block->getType().getBasicType() != unitBlock->getType().getBasicType() || + block->getQualifier().storage != unitBlock->getQualifier().storage || + block->getQualifier().layoutSet != unitBlock->getQualifier().layoutSet) { + // different block names likely means different blocks + return; + } + + // merge the struct + // order of declarations doesn't matter and they matched based on member name + TTypeList* memberList = block->getType().getWritableStruct(); + TTypeList* unitMemberList = unitBlock->getType().getWritableStruct(); + + // keep track of which members have changed position + // so we don't have to search the array again + std::map<unsigned int, unsigned int> memberIndexUpdates; + + size_t memberListStartSize = memberList->size(); + for (unsigned int i = 0; i < unitMemberList->size(); ++i) { + bool merge = true; + for (unsigned int j = 0; j < memberListStartSize; ++j) { + if ((*memberList)[j].type->getFieldName() == (*unitMemberList)[i].type->getFieldName()) { + merge = false; + const TType* memberType = (*memberList)[j].type; + const TType* unitMemberType = (*unitMemberList)[i].type; + + // compare types + // don't need as many checks as when merging symbols, since + // initializers and most qualifiers are stripped when the member is moved into the block + if ((*memberType) != (*unitMemberType)) { + error(infoSink, "Types must match:"); + infoSink.info << " " << memberType->getFieldName() << ": "; + infoSink.info << "\"" << memberType->getCompleteString() << "\" versus "; + infoSink.info << "\"" << unitMemberType->getCompleteString() << "\"\n"; + } + + memberIndexUpdates[i] = j; + } + } + if (merge) { + memberList->push_back((*unitMemberList)[i]); + memberIndexUpdates[i] = (unsigned int)memberList->size() - 1; + } + } + + TType unitType; + unitType.shallowCopy(unitBlock->getType()); + + // update symbol node in unit tree, + // and other nodes that may reference it + class TMergeBlockTraverser : public TIntermTraverser { + public: + TMergeBlockTraverser(const glslang::TType &type, const glslang::TType& unitType, + glslang::TIntermediate& unit, + const std::map<unsigned int, unsigned int>& memberIdxUpdates) : + newType(type), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates) + { } + virtual ~TMergeBlockTraverser() { } + + const glslang::TType& newType; // type with modifications + const glslang::TType& unitType; // copy of original type + glslang::TIntermediate& unit; // intermediate that is being updated + const std::map<unsigned int, unsigned int>& memberIndexUpdates; + + virtual void visitSymbol(TIntermSymbol* symbol) + { + glslang::TType& symType = symbol->getWritableType(); + + if (symType == unitType) { + // each symbol node has a local copy of the unitType + // if merging involves changing properties that aren't shared objects + // they should be updated in all instances + + // e.g. the struct list is a ptr to an object, so it can be updated + // once, outside the traverser + //*symType.getWritableStruct() = *newType.getStruct(); + } + + } + + virtual bool visitBinary(TVisit, glslang::TIntermBinary* node) + { + if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == unitType) { + // this is a dereference to a member of the block since the + // member list changed, need to update this to point to the + // right index + assert(node->getRight()->getAsConstantUnion()); + + glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion(); + unsigned int memberIdx = constNode->getConstArray()[0].getUConst(); + unsigned int newIdx = memberIndexUpdates.at(memberIdx); + TIntermTyped* newConstNode = unit.addConstantUnion(newIdx, node->getRight()->getLoc()); + + node->setRight(newConstNode); + delete constNode; + + return true; + } + return true; + } + } finalLinkTraverser(block->getType(), unitType, *unit, memberIndexUpdates); + + // update the tree to use the new type + unit->getTreeRoot()->traverse(&finalLinkTraverser); + + // update the member list + (*unitMemberList) = (*memberList); +} + // // Merge the linker objects from unitLinkerObjects into linkerObjects. // Duplication is expected and filtered out, but contradictions are an error. // -void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects) +void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage unitStage) { // Error check and merge the linker objects (duplicates should not be created) std::size_t initialNumLinkerObjects = linkerObjects.size(); @@ -470,7 +711,7 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin // If they are both blocks in the same shader interface, // match by the block-name, not the identifier name. if (symbol->getType().getBasicType() == EbtBlock && unitSymbol->getType().getBasicType() == EbtBlock) { - if (symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) { + if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) { isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName(); } } @@ -490,18 +731,54 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin if (! symbol->getQualifier().hasBinding() && unitSymbol->getQualifier().hasBinding()) symbol->getQualifier().layoutBinding = unitSymbol->getQualifier().layoutBinding; + // Similarly for location + if (!symbol->getQualifier().hasLocation() && unitSymbol->getQualifier().hasLocation()) { + symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation; + } + // Update implicit array sizes mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType()); // Check for consistent types/qualification/initializers etc. - mergeErrorCheck(infoSink, *symbol, *unitSymbol, false); + mergeErrorCheck(infoSink, *symbol, *unitSymbol, unitStage); } // If different symbols, verify they arn't push_constant since there can only be one per stage - else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant()) + else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage) error(infoSink, "Only one push_constant block is allowed per stage"); } - if (merge) + if (merge) { linkerObjects.push_back(unitLinkerObjects[unitLinkObj]); + + // for anonymous blocks, check that their members don't conflict with other names + if (unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getBasicType() == EbtBlock && + IsAnonymous(unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getName())) { + for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) { + TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode(); + TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); + assert(symbol && unitSymbol); + + auto checkName = [this, unitSymbol, &infoSink](const TString& name) { + for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) { + if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) { + error(infoSink, "Anonymous member name used for global variable or other anonymous member: "); + infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n"; + } + } + }; + + if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) { + checkName(symbol->getName()); + + // check members of other anonymous blocks + if (symbol->getBasicType() == EbtBlock && IsAnonymous(symbol->getName())) { + for (unsigned int i = 0; i < symbol->getType().getStruct()->size(); ++i) { + checkName((*symbol->getType().getStruct())[i].type->getFieldName()); + } + } + } + } + } + } } } @@ -533,26 +810,75 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType) // // This function only does one of intra- or cross-stage matching per call. // -void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage) +void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage) { #if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) + bool crossStage = getStage() != unitStage; bool writeTypeComparison = false; // Types have to match - if (symbol.getType() != unitSymbol.getType()) { + { // but, we make an exception if one is an implicit array and the other is sized - if (! (symbol.getType().isArray() && unitSymbol.getType().isArray() && - symbol.getType().sameElementType(unitSymbol.getType()) && - (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()))) { - error(infoSink, "Types must match:"); + // or if the array sizes differ because of the extra array dimension on some in/out boundaries + bool arraysMatch = false; + if (isIoResizeArray(symbol.getType(), getStage()) || isIoResizeArray(unitSymbol.getType(), unitStage)) { + // if the arrays have an extra dimension because of the stage. + // compare dimensions while ignoring the outer dimension + unsigned int firstDim = isIoResizeArray(symbol.getType(), getStage()) ? 1 : 0; + unsigned int numDim = symbol.getArraySizes() + ? symbol.getArraySizes()->getNumDims() : 0; + unsigned int unitFirstDim = isIoResizeArray(unitSymbol.getType(), unitStage) ? 1 : 0; + unsigned int unitNumDim = unitSymbol.getArraySizes() + ? unitSymbol.getArraySizes()->getNumDims() : 0; + arraysMatch = (numDim - firstDim) == (unitNumDim - unitFirstDim); + // check that array sizes match as well + for (unsigned int i = 0; i < (numDim - firstDim) && arraysMatch; i++) { + if (symbol.getArraySizes()->getDimSize(firstDim + i) != + unitSymbol.getArraySizes()->getDimSize(unitFirstDim + i)) { + arraysMatch = false; + break; + } + } + } + else { + arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) || + (symbol.getType().isArray() && unitSymbol.getType().isArray() && + (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); + } + + if (!symbol.getType().sameElementType(unitSymbol.getType()) || + !symbol.getType().sameTypeParameters(unitSymbol.getType()) || + !arraysMatch ) { writeTypeComparison = true; + error(infoSink, "Types must match:"); } } - // Qualifiers have to (almost) match + // Interface block member-wise layout qualifiers have to match + if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock && + symbol.getType().getStruct() && unitSymbol.getType().getStruct() && + symbol.getType().sameStructType(unitSymbol.getType())) { + for (unsigned int i = 0; i < symbol.getType().getStruct()->size(); ++i) { + const TQualifier& qualifier = (*symbol.getType().getStruct())[i].type->getQualifier(); + const TQualifier& unitQualifier = (*unitSymbol.getType().getStruct())[i].type->getQualifier(); + if (qualifier.layoutMatrix != unitQualifier.layoutMatrix || + qualifier.layoutOffset != unitQualifier.layoutOffset || + qualifier.layoutAlign != unitQualifier.layoutAlign || + qualifier.layoutLocation != unitQualifier.layoutLocation || + qualifier.layoutComponent != unitQualifier.layoutComponent) { + error(infoSink, "Interface block member layout qualifiers must match:"); + writeTypeComparison = true; + } + } + } + + bool isInOut = crossStage && + ((symbol.getQualifier().storage == EvqVaryingIn && unitSymbol.getQualifier().storage == EvqVaryingOut) || + (symbol.getQualifier().storage == EvqVaryingOut && unitSymbol.getQualifier().storage == EvqVaryingIn)); + // Qualifiers have to (almost) match // Storage... - if (symbol.getQualifier().storage != unitSymbol.getQualifier().storage) { + if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) { error(infoSink, "Storage qualifiers must match:"); writeTypeComparison = true; } @@ -574,7 +900,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy } // Precision... - if (symbol.getQualifier().precision != unitSymbol.getQualifier().precision) { + if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) { error(infoSink, "Precision qualifiers must match:"); writeTypeComparison = true; } @@ -592,12 +918,16 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy } // Auxiliary and interpolation... - if (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid || + // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ. + // These mismatches are allowed between any pair of stages ... + // those provided in the fragment shader supersede those provided in previous stages." + if (!crossStage && + (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid || symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth || symbol.getQualifier().flat != unitSymbol.getQualifier().flat || symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() || symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() || - symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective()) { + symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) { error(infoSink, "Interpolation and auxiliary storage qualifiers must match:"); writeTypeComparison = true; } @@ -653,6 +983,25 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy #endif } +void TIntermediate::sharedBlockCheck(TInfoSink& infoSink) +{ + bool has_shared_block = false; + bool has_shared_non_block = false; + TIntermSequence& linkObjects = findLinkerObjects()->getSequence(); + for (size_t i = 0; i < linkObjects.size(); ++i) { + const TType& type = linkObjects[i]->getAsTyped()->getType(); + const TQualifier& qualifier = type.getQualifier(); + if (qualifier.storage == glslang::EvqShared) { + if (type.getBasicType() == glslang::EbtBlock) + has_shared_block = true; + else + has_shared_non_block = true; + } + } + if (has_shared_block && has_shared_non_block) + error(infoSink, "cannot mix use of shared variables inside and outside blocks"); +} + // // Do final link-time error checking of a complete (merged) intermediate representation. // (Much error checking was done during merging). @@ -778,6 +1127,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) error(infoSink, "post_depth_coverage requires early_fragment_tests"); break; case EShLangCompute: + sharedBlockCheck(infoSink); break; case EShLangRayGen: case EShLangIntersect: @@ -810,6 +1160,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) case EShLangTaskNV: if (numTaskNVBlocks > 1) error(infoSink, "Only one taskNV interface block is allowed per shader"); + sharedBlockCheck(infoSink); break; default: error(infoSink, "Unknown Stage."); @@ -1804,4 +2155,17 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type) return size; } +#ifndef GLSLANG_WEB +bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { + return type.isArray() && + ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) || + (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && + ! type.getQualifier().patch) || + (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && + type.getQualifier().pervertexNV) || + (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && + !type.getQualifier().perTaskNV)); +} +#endif // not GLSLANG_WEB + } // end namespace glslang diff --git a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h index f8d8e80199..6aa9399dcc 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h +++ b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h @@ -227,10 +227,10 @@ enum ComputeDerivativeMode { class TIdMaps { public: - TMap<TString, int>& operator[](int i) { return maps[i]; } - const TMap<TString, int>& operator[](int i) const { return maps[i]; } + TMap<TString, long long>& operator[](long long i) { return maps[i]; } + const TMap<TString, long long>& operator[](long long i) const { return maps[i]; } private: - TMap<TString, int> maps[EsiCount]; + TMap<TString, long long> maps[EsiCount]; }; class TNumericFeatures { @@ -291,8 +291,15 @@ public: numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false), invertY(false), useStorageBuffer(false), + invariantAll(false), nanMinMaxClamp(false), - depthReplacing(false) + depthReplacing(false), + uniqueId(0), + globalUniformBlockName(""), + atomicCounterBlockName(""), + globalUniformBlockSet(TQualifier::layoutSetEnd), + globalUniformBlockBinding(TQualifier::layoutBindingEnd), + atomicCounterBlockSet(TQualifier::layoutSetEnd) #ifndef GLSLANG_WEB , implicitThisName("@this"), implicitCounterName("@count"), @@ -322,7 +329,10 @@ public: textureSamplerTransformMode(EShTexSampTransKeep), needToLegalize(false), binaryDoubleOutput(false), + subgroupUniformControlFlow(false), usePhysicalStorageBuffer(false), + spirvRequirement(nullptr), + spirvExecutionMode(nullptr), uniformLocationBase(0) #endif { @@ -529,15 +539,30 @@ public: TIntermTyped* foldSwizzle(TIntermTyped* node, TSwizzleSelectors<TVectorSelector>& fields, const TSourceLoc&); // Tree ops - static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay); + static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay , bool BufferReferenceOk = false); // Linkage related void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&); void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&); TIntermAggregate* findLinkerObjects() const; + void setGlobalUniformBlockName(const char* name) { globalUniformBlockName = std::string(name); } + const char* getGlobalUniformBlockName() const { return globalUniformBlockName.c_str(); } + void setGlobalUniformSet(unsigned int set) { globalUniformBlockSet = set; } + unsigned int getGlobalUniformSet() const { return globalUniformBlockSet; } + void setGlobalUniformBinding(unsigned int binding) { globalUniformBlockBinding = binding; } + unsigned int getGlobalUniformBinding() const { return globalUniformBlockBinding; } + + void setAtomicCounterBlockName(const char* name) { atomicCounterBlockName = std::string(name); } + const char* getAtomicCounterBlockName() const { return atomicCounterBlockName.c_str(); } + void setAtomicCounterBlockSet(unsigned int set) { atomicCounterBlockSet = set; } + unsigned int getAtomicCounterBlockSet() const { return atomicCounterBlockSet; } + + void setUseStorageBuffer() { useStorageBuffer = true; } bool usingStorageBuffer() const { return useStorageBuffer; } + void setInvariantAll() { invariantAll = true; } + bool isInvariantAll() const { return invariantAll; } void setDepthReplacing() { depthReplacing = true; } bool isDepthReplacing() const { return depthReplacing; } bool setLocalSize(int dim, int size) @@ -549,6 +574,11 @@ public: return true; } unsigned int getLocalSize(int dim) const { return localSize[dim]; } + bool isLocalSizeSet() const + { + // Return true if any component has been set (i.e. any component is not default). + return localSizeNotDefault[0] || localSizeNotDefault[1] || localSizeNotDefault[2]; + } bool setLocalSizeSpecId(int dim, int id) { if (localSizeSpecId[dim] != TQualifier::layoutNotSet) @@ -557,6 +587,13 @@ public: return true; } int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; } + bool isLocalSizeSpecialized() const + { + // Return true if any component has been specialized. + return localSizeSpecId[0] != TQualifier::layoutNotSet || + localSizeSpecId[1] != TQualifier::layoutNotSet || + localSizeSpecId[2] != TQualifier::layoutNotSet; + } #ifdef GLSLANG_WEB void output(TInfoSink&, bool tree) { } @@ -833,8 +870,34 @@ public: void setBinaryDoubleOutput() { binaryDoubleOutput = true; } bool getBinaryDoubleOutput() { return binaryDoubleOutput; } + + void setSubgroupUniformControlFlow() { subgroupUniformControlFlow = true; } + bool getSubgroupUniformControlFlow() const { return subgroupUniformControlFlow; } + + // GL_EXT_spirv_intrinsics + void insertSpirvRequirement(const TSpirvRequirement* spirvReq); + bool hasSpirvRequirement() const { return spirvRequirement != nullptr; } + const TSpirvRequirement& getSpirvRequirement() const { return *spirvRequirement; } + void insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args = nullptr); + void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args); + bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; } + const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; } #endif // GLSLANG_WEB + void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) + { + std::string name(nameStr); + blockBackingOverrides[name] = backing; + } + TBlockStorageClass getBlockStorageOverride(const char* nameStr) const + { + std::string name = nameStr; + auto pos = blockBackingOverrides.find(name); + if (pos == blockBackingOverrides.end()) + return EbsNone; + else + return pos->second; + } #ifdef ENABLE_HLSL void setHlslFunctionality1() { hlslFunctionality1 = true; } bool getHlslFunctionality1() const { return hlslFunctionality1; } @@ -858,10 +921,27 @@ public: bool usingHlslIoMapping() { return false; } #endif + bool usingScalarBlockLayout() const { + for (auto extIt = requestedExtensions.begin(); extIt != requestedExtensions.end(); ++extIt) { + if (*extIt == E_GL_EXT_scalar_block_layout) + return true; + } + return false; + } + + bool IsRequestedExtension(const char* extension) const + { + return (requestedExtensions.find(extension) != requestedExtensions.end()); + } + void addToCallGraph(TInfoSink&, const TString& caller, const TString& callee); void merge(TInfoSink&, TIntermediate&); void finalCheck(TInfoSink&, bool keepUncalled); + void mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly); + void mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit); + void checkStageIO(TInfoSink&, TIntermediate&); + bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const; TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const; @@ -885,6 +965,8 @@ public: static int getOffset(const TType& type, int index); static int getBlockSize(const TType& blockType); static int computeBufferReferenceTypeSize(const TType&); + static bool isIoResizeArray(const TType& type, EShLanguage language); + bool promote(TIntermOperator*); void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; } bool getNanMinMaxClamp() const { return nanMinMaxClamp; } @@ -903,6 +985,8 @@ public: void addProcess(const std::string& process) { processes.addProcess(process); } void addProcessArgument(const std::string& arg) { processes.addArgument(arg); } const std::vector<std::string>& getProcesses() const { return processes.getProcesses(); } + unsigned long long getUniqueId() const { return uniqueId; } + void setUniqueId(unsigned long long id) { uniqueId = id; } // Certain explicit conversions are allowed conditionally #ifdef GLSLANG_WEB @@ -931,21 +1015,23 @@ public: #endif protected: - TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); + TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); void error(TInfoSink& infoSink, const char*); void warn(TInfoSink& infoSink, const char*); void mergeCallGraphs(TInfoSink&, TIntermediate&); void mergeModes(TInfoSink&, TIntermediate&); void mergeTrees(TInfoSink&, TIntermediate&); - void seedIdMap(TIdMaps& idMaps, int& maxId); - void remapIds(const TIdMaps& idMaps, int idShift, TIntermediate&); + void seedIdMap(TIdMaps& idMaps, long long& IdShift); + void remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate&); void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals); - void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects); + void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage); + void mergeBlockDefinitions(TInfoSink&, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unitRoot); void mergeImplicitArraySizes(TType&, const TType&); - void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage); + void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, EShLanguage); void checkCallGraphCycles(TInfoSink&); void checkCallGraphBodies(TInfoSink&, bool keepUncalled); void inOutLocationCheck(TInfoSink&); + void sharedBlockCheck(TInfoSink&); bool userOutputUsed() const; bool isSpecializationOperation(const TIntermOperator&) const; bool isNonuniformPropagating(TOperator) const; @@ -985,11 +1071,20 @@ protected: bool recursive; bool invertY; bool useStorageBuffer; + bool invariantAll; bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN bool depthReplacing; int localSize[3]; bool localSizeNotDefault[3]; int localSizeSpecId[3]; + unsigned long long uniqueId; + + std::string globalUniformBlockName; + std::string atomicCounterBlockName; + unsigned int globalUniformBlockSet; + unsigned int globalUniformBlockBinding; + unsigned int atomicCounterBlockSet; + #ifndef GLSLANG_WEB public: const char* const implicitThisName; @@ -1044,12 +1139,17 @@ protected: bool needToLegalize; bool binaryDoubleOutput; + bool subgroupUniformControlFlow; bool usePhysicalStorageBuffer; + TSpirvRequirement* spirvRequirement; + TSpirvExecutionMode* spirvExecutionMode; + std::unordered_map<std::string, int> uniformLocationOverrides; int uniformLocationBase; TNumericFeatures numericFeatures; #endif + std::unordered_map<std::string, TBlockStorageClass> blockBackingOverrides; std::unordered_set<int> usedConstantId; // specialization constant ids used std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters diff --git a/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp b/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp index 7c04743ba6..6c182991f5 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp @@ -166,31 +166,30 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) } } else { // matrix from vector or scalar - int count = 0; - const int startIndex = index; int nodeComps = node->getType().computeNumComponents(); - for (int i = startIndex; i < endIndex; i++) { - if (i >= instanceSize) - return; - if (nodeComps == 1) { - // If there is a single scalar parameter to a matrix - // constructor, it is used to initialize all the - // components on the matrix's diagonal, with the - // remaining components initialized to 0.0. - if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 ) - leftUnionArray[i] = rightUnionArray[count]; - else - leftUnionArray[i].setDConst(0.0); - } else { + if (nodeComps == 1) { + for (int c = 0; c < matrixCols; ++c) { + for (int r = 0; r < matrixRows; ++r) { + if (r == c) + leftUnionArray[index] = rightUnionArray[0]; + else + leftUnionArray[index].setDConst(0.0); + index++; + } + } + } else { + int count = 0; + for (int i = index; i < endIndex; i++) { + if (i >= instanceSize) + return; + // construct the matrix in column-major order, from // the components provided, in order leftUnionArray[i] = rightUnionArray[count]; - } - - index++; - if (nodeComps > 1) + index++; count++; + } } } } diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp index e0f44f8b4f..ad11792002 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -1191,9 +1191,11 @@ int TPpContext::tokenize(TPpToken& ppToken) // HLSL allows string literals. // GLSL allows string literals with GL_EXT_debug_printf. if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) { - parseContext.requireExtensions(ppToken.loc, 1, &E_GL_EXT_debug_printf, "string literal"); - if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf)) - continue; + const char* const string_literal_EXTs[] = { E_GL_EXT_debug_printf, E_GL_EXT_spirv_intrinsics }; + parseContext.requireExtensions(ppToken.loc, 2, string_literal_EXTs, "string literal"); + if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf) && + !parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) + continue; } break; case '\'': diff --git a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp index 729500295e..9ea48c452d 100644 --- a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp +++ b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp @@ -907,8 +907,8 @@ public: case EbtFloat16: return GL_FLOAT16_VEC2_NV + offset; case EbtInt: return GL_INT_VEC2 + offset; case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset; - case EbtInt64: return GL_INT64_ARB + offset; - case EbtUint64: return GL_UNSIGNED_INT64_ARB + offset; + case EbtInt64: return GL_INT64_VEC2_ARB + offset; + case EbtUint64: return GL_UNSIGNED_INT64_VEC2_ARB + offset; case EbtBool: return GL_BOOL_VEC2 + offset; case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER + offset; default: return 0; @@ -1138,6 +1138,8 @@ void TReflection::buildCounterIndices(const TIntermediate& intermediate) if (index >= 0) indexToUniformBlock[i].counterIndex = index; } +#else + (void)intermediate; #endif } diff --git a/thirdparty/glslang/glslang/Public/ShaderLang.h b/thirdparty/glslang/glslang/Public/ShaderLang.h index 273f1569a0..d2a4bf40a0 100644 --- a/thirdparty/glslang/glslang/Public/ShaderLang.h +++ b/thirdparty/glslang/glslang/Public/ShaderLang.h @@ -167,7 +167,7 @@ typedef enum { EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1 EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2 EShTargetOpenGL_450 = 450, // OpenGL - LAST_ELEMENT_MARKER(EShTargetClientVersionCount), + LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4), } EShTargetClientVersion; typedef EShTargetClientVersion EshTargetClientVersion; @@ -179,7 +179,7 @@ typedef enum { EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3 EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4 EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5 - LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount), + LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 6), } EShTargetLanguageVersion; struct TInputLanguage { @@ -187,6 +187,7 @@ struct TInputLanguage { EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone EShClient dialect; int dialectVersion; // version of client's language definition, not the client (when not EShClientNone) + bool vulkanRulesRelaxed; }; struct TClient { @@ -427,6 +428,14 @@ enum TResourceType { EResCount }; +enum TBlockStorageClass +{ + EbsUniform = 0, + EbsStorageBuffer, + EbsPushConstant, + EbsNone, // not a uniform or buffer variable + EbsCount, +}; // Make one TShader per shader that you will link into a program. Then // - provide the shader through setStrings() or setStringsWithLengths() @@ -458,6 +467,7 @@ public: GLSLANG_EXPORT void setEntryPoint(const char* entryPoint); GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName); GLSLANG_EXPORT void addProcesses(const std::vector<std::string>&); + GLSLANG_EXPORT void setUniqueId(unsigned long long id); // IO resolver binding data: see comments in ShaderLang.cpp GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base); @@ -482,6 +492,14 @@ public: GLSLANG_EXPORT void setNoStorageFormat(bool useUnknownFormat); GLSLANG_EXPORT void setNanMinMaxClamp(bool nanMinMaxClamp); GLSLANG_EXPORT void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode); + GLSLANG_EXPORT void addBlockStorageOverride(const char* nameStr, glslang::TBlockStorageClass backing); + + GLSLANG_EXPORT void setGlobalUniformBlockName(const char* name); + GLSLANG_EXPORT void setAtomicCounterBlockName(const char* name); + GLSLANG_EXPORT void setGlobalUniformSet(unsigned int set); + GLSLANG_EXPORT void setGlobalUniformBinding(unsigned int binding); + GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set); + GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding); // For setting up the environment (cleared to nothingness in the constructor). // These must be called so that parsing is done for the right source language and @@ -490,7 +508,7 @@ public: // // setEnvInput: The input source language and stage. If generating code for a // specific client, the input client semantics to use and the - // version of the that client's input semantics to use, otherwise + // version of that client's input semantics to use, otherwise // use EShClientNone and version of 0, e.g. for validation mode. // Note 'version' does not describe the target environment, // just the version of the source dialect to compile under. @@ -538,6 +556,9 @@ public: bool getEnvTargetHlslFunctionality1() const { return false; } #endif + void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; } + bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; } + // Interface to #include handlers. // // To support #include, a client of Glslang does the following: @@ -701,7 +722,7 @@ class TObjectReflection { public: GLSLANG_EXPORT TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex); - GLSLANG_EXPORT const TType* getType() const { return type; } + const TType* getType() const { return type; } GLSLANG_EXPORT int getBinding() const; GLSLANG_EXPORT void dump() const; static TObjectReflection badReflection() { return TObjectReflection(); } @@ -805,7 +826,7 @@ public: // Called by TSlotCollector to resolve resource locations or bindings virtual void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) = 0; // Called by mapIO.addStage to set shader stage mask to mark a stage be added to this pipeline - virtual void addStage(EShLanguage stage) = 0; + virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0; }; #endif // !GLSLANG_WEB && !GLSLANG_ANGLE @@ -927,6 +948,7 @@ public: protected: GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages); + GLSLANG_EXPORT bool crossStageCheck(EShMessages); TPoolAllocator* pool; std::list<TShader*> stages[EShLangCount]; diff --git a/thirdparty/glslang/glslang/build_info.h b/thirdparty/glslang/glslang/build_info.h index 319bfa5f73..661c4a3c1c 100644 --- a/thirdparty/glslang/glslang/build_info.h +++ b/thirdparty/glslang/glslang/build_info.h @@ -35,7 +35,7 @@ #define GLSLANG_BUILD_INFO #define GLSLANG_VERSION_MAJOR 11 -#define GLSLANG_VERSION_MINOR 0 +#define GLSLANG_VERSION_MINOR 6 #define GLSLANG_VERSION_PATCH 0 #define GLSLANG_VERSION_FLAVOR "" |