From 5de3e4457371c1d06d3f0ce1d8b65b2df9094f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sat, 22 Jun 2019 04:09:45 -0700 Subject: [PATCH] Updated glslang. --- 3rdparty/glslang/SPIRV/GlslangToSpv.cpp | 216 ++- 3rdparty/glslang/SPIRV/disassemble.cpp | 3 + 3rdparty/glslang/SPIRV/spirv.hpp | 4 +- 3rdparty/glslang/StandAlone/StandAlone.cpp | 8 +- .../baseResults/spv.400.frag.nanclamp.out | 1402 +++++++++++++++++ .../spv.functionParameterTypes.frag.out | 62 + .../spv.memoryScopeSemantics.comp.out | 378 ++--- .../spv.memoryScopeSemantics_Error.comp.out | 4 +- .../spv.privateVariableTypes.frag.out | 54 + .../baseResults/spv.shaderBallot.comp.out | 679 ++++---- 3rdparty/glslang/Test/runtests | 7 + .../Test/spv.functionParameterTypes.frag | 20 + .../Test/spv.memoryScopeSemantics.comp | 6 + .../Test/spv.memoryScopeSemantics_Error.comp | 2 + .../Test/spv.privateVariableTypes.frag | 17 + 3rdparty/glslang/glslang/Include/revision.h | 2 +- .../glslang/MachineIndependent/Initialize.cpp | 32 +- .../MachineIndependent/ParseHelper.cpp | 15 +- .../glslang/MachineIndependent/ShaderLang.cpp | 1 + .../MachineIndependent/localintermediate.h | 7 +- 3rdparty/glslang/glslang/Public/ShaderLang.h | 1 + 3rdparty/glslang/gtests/Spv.FromFile.cpp | 2 + 22 files changed, 2350 insertions(+), 572 deletions(-) create mode 100644 3rdparty/glslang/Test/baseResults/spv.400.frag.nanclamp.out create mode 100644 3rdparty/glslang/Test/baseResults/spv.functionParameterTypes.frag.out create mode 100644 3rdparty/glslang/Test/baseResults/spv.privateVariableTypes.frag.out create mode 100644 3rdparty/glslang/Test/spv.functionParameterTypes.frag create mode 100644 3rdparty/glslang/Test/spv.privateVariableTypes.frag diff --git a/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index 312e06ade..16d90b893 100644 --- a/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -138,7 +138,7 @@ protected: spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector& operands) const; spv::StorageClass TranslateStorageClass(const glslang::TType&); void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType); - spv::Id createSpvVariable(const glslang::TIntermSymbol*); + spv::Id createSpvVariable(const glslang::TIntermSymbol*, spv::Id forcedType); spv::Id getSampledType(const glslang::TSampler&); spv::Id getInvertedSwizzleType(const glslang::TIntermTyped&); spv::Id createInvertedSwizzle(spv::Decoration precision, const glslang::TIntermTyped&, spv::Id parentResult); @@ -169,7 +169,7 @@ protected: void makeGlobalInitializers(const glslang::TIntermSequence&); void visitFunctions(const glslang::TIntermSequence&); void handleFunctionEntry(const glslang::TIntermAggregate* node); - void translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments); + void translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags); void translateArguments(glslang::TIntermUnary& node, std::vector& arguments); spv::Id createImageTextureFunctionCall(glslang::TIntermOperator* node); spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*); @@ -178,14 +178,14 @@ protected: glslang::TBasicType typeProxy, bool reduceComparison = true); spv::Id createBinaryMatrixOperation(spv::Op, OpDecorations&, spv::Id typeId, spv::Id left, spv::Id right); spv::Id createUnaryOperation(glslang::TOperator op, OpDecorations&, spv::Id typeId, spv::Id operand, - glslang::TBasicType typeProxy); + glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags); spv::Id createUnaryMatrixOperation(spv::Op op, OpDecorations&, spv::Id typeId, spv::Id operand, glslang::TBasicType typeProxy); spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand, glslang::TBasicType typeProxy); spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); - spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); + spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags); spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector& operands); spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); @@ -208,6 +208,8 @@ protected: if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3) builder.addExtension(ext); } + std::pair getForcedType(spv::BuiltIn, const glslang::TType&); + spv::Id translateForcedType(spv::Id object); glslang::SpvOptions& options; spv::Function* shaderEntry; @@ -224,6 +226,7 @@ protected: bool linkageOnly; // true when visiting the set of objects in the AST present only for establishing interface, whether or not they were statically used std::set iOSet; // all input/output variables from either static use or declaration of interface const glslang::TIntermediate* glslangIntermediate; + bool nanMinMaxClamp; // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp spv::Id stdBuiltins; std::unordered_map extBuiltinMap; @@ -237,6 +240,10 @@ protected: std::unordered_map counterOriginator; // Map pointee types for EbtReference to their forward pointers std::map forwardPointers; + // Type forcing, for when SPIR-V wants a different type than the AST, + // requiring local translation to and from SPIR-V type on every access. + // Maps AST-required-type-id> + std::unordered_map forceType; }; // @@ -732,27 +739,27 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvSubGroupEqMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::CapabilitySubgroupBallotKHR); - return spv::BuiltInSubgroupEqMaskKHR; + return spv::BuiltInSubgroupEqMask; case glslang::EbvSubGroupGeMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::CapabilitySubgroupBallotKHR); - return spv::BuiltInSubgroupGeMaskKHR; + return spv::BuiltInSubgroupGeMask; case glslang::EbvSubGroupGtMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::CapabilitySubgroupBallotKHR); - return spv::BuiltInSubgroupGtMaskKHR; + return spv::BuiltInSubgroupGtMask; case glslang::EbvSubGroupLeMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::CapabilitySubgroupBallotKHR); - return spv::BuiltInSubgroupLeMaskKHR; + return spv::BuiltInSubgroupLeMask; case glslang::EbvSubGroupLtMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::CapabilitySubgroupBallotKHR); - return spv::BuiltInSubgroupLtMaskKHR; + return spv::BuiltInSubgroupLtMask; case glslang::EbvNumSubgroups: builder.addCapability(spv::CapabilityGroupNonUniform); @@ -794,6 +801,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilityGroupNonUniform); builder.addCapability(spv::CapabilityGroupNonUniformBallot); return spv::BuiltInSubgroupLtMask; + #ifdef AMD_EXTENSIONS case glslang::EbvBaryCoordNoPersp: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); @@ -1313,7 +1321,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl sequenceDepth(0), logger(buildLogger), builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger), inEntryPoint(false), entryPointTerminated(false), linkageOnly(false), - glslangIntermediate(glslangIntermediate) + glslangIntermediate(glslangIntermediate), + nanMinMaxClamp(glslangIntermediate->getNanMinMaxClamp()) { spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage()); @@ -1618,8 +1627,8 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) // Formal function parameters were mapped during makeFunctions(). spv::Id id = getSymbolId(symbol); - // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction if (builder.isPointer(id)) { + // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction // Consider adding to the OpEntryPoint interface list. // Only looking at structures if they have at least one member. if (!symbol->getType().isStruct() || symbol->getType().getStruct()->size() > 0) { @@ -1631,6 +1640,14 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) iOSet.insert(id); } } + + // If the SPIR-V type is required to be different than the AST type, + // translate now from the SPIR-V type to the AST type, for the consuming + // operation. + // Note this turns it from an l-value to an r-value. + // Currently, all symbols needing this are inputs; avoid the map lookup when non-input. + if (symbol->getType().getQualifier().storage == glslang::EvqVaryingIn) + id = translateForcedType(id); } // Only process non-linkage-only nodes for generating actual static uses @@ -1648,8 +1665,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) // See comments in handleUserFunctionCall(). // B) Specialization constants (normal constants don't even come in as a variable), // These are also pure R-values. + // C) R-Values from type translation, see above call to translateForcedType() glslang::TQualifier qualifier = symbol->getQualifier(); - if (qualifier.isSpecConstant() || rValueParameters.find(symbol->getId()) != rValueParameters.end()) + if (qualifier.isSpecConstant() || rValueParameters.find(symbol->getId()) != rValueParameters.end() || + !builder.isPointerType(builder.getTypeId(id))) builder.setAccessChainRValue(id); else builder.setAccessChainLValue(id); @@ -1906,6 +1925,71 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T } } +// Figure out what, if any, type changes are needed when accessing a specific built-in. +// Returns . +// Also see comment for 'forceType', regarding tracking SPIR-V-required types. +std::pair TGlslangToSpvTraverser::getForcedType(spv::BuiltIn builtIn, + const glslang::TType& glslangType) +{ + switch(builtIn) + { + case spv::BuiltInSubgroupEqMask: + case spv::BuiltInSubgroupGeMask: + case spv::BuiltInSubgroupGtMask: + case spv::BuiltInSubgroupLeMask: + case spv::BuiltInSubgroupLtMask: { + // these require changing a 64-bit scaler -> a vector of 32-bit components + if (glslangType.isVector()) + break; + std::pair ret(builder.makeVectorType(builder.makeUintType(32), 4), + builder.makeUintType(64)); + return ret; + } + default: + break; + } + + std::pair ret(spv::NoType, spv::NoType); + return ret; +} + +// For an object previously identified (see getForcedType() and forceType) +// as needing type translations, do the translation needed for a load, turning +// an L-value into in R-value. +spv::Id TGlslangToSpvTraverser::translateForcedType(spv::Id object) +{ + const auto forceIt = forceType.find(object); + if (forceIt == forceType.end()) + return object; + + spv::Id desiredTypeId = forceIt->second; + spv::Id objectTypeId = builder.getTypeId(object); + assert(builder.isPointerType(objectTypeId)); + objectTypeId = builder.getContainedTypeId(objectTypeId); + if (builder.isVectorType(objectTypeId) && + builder.getScalarTypeWidth(builder.getContainedTypeId(objectTypeId)) == 32) { + if (builder.getScalarTypeWidth(desiredTypeId) == 64) { + // handle 32-bit v.xy* -> 64-bit + builder.clearAccessChain(); + builder.setAccessChainLValue(object); + object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, objectTypeId); + std::vector components; + components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 0)); + components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 1)); + + spv::Id vecType = builder.makeVectorType(builder.getContainedTypeId(objectTypeId), 2); + return builder.createUnaryOp(spv::OpBitcast, desiredTypeId, + builder.createCompositeConstruct(vecType, components)); + } else { + logger->missingFunctionality("forcing 32-bit vector type to non 64-bit scalar"); + } + } else { + logger->missingFunctionality("forcing non 32-bit vector type"); + } + + return object; +} + bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) { builder.setLine(node->getLoc().line, node->getLoc().getFilename()); @@ -1981,19 +2065,26 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI invertedType = getInvertedSwizzleType(*node->getOperand()); builder.clearAccessChain(); + TIntermNode *operandNode; if (invertedType != spv::NoType) - node->getOperand()->getAsBinaryNode()->getLeft()->traverse(this); + operandNode = node->getOperand()->getAsBinaryNode()->getLeft(); else - node->getOperand()->traverse(this); + operandNode = node->getOperand(); + + operandNode->traverse(this); spv::Id operand = spv::NoResult; + spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; + if (node->getOp() == glslang::EOpAtomicCounterIncrement || node->getOp() == glslang::EOpAtomicCounterDecrement || node->getOp() == glslang::EOpAtomicCounter || - node->getOp() == glslang::EOpInterpolateAtCentroid) + node->getOp() == glslang::EOpInterpolateAtCentroid) { operand = builder.accessChainGetLValue(); // Special case l-value operands - else + lvalueCoherentFlags = builder.getAccessChain().coherentFlags; + lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType()); + } else operand = accessChainLoad(node->getOperand()->getType()); OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), @@ -2006,7 +2097,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI // if not, then possibly an operation if (! result) - result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType()); + result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags); if (result) { if (invertedType) { @@ -2113,6 +2204,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt bool noReturnValue = false; bool atomic = false; + spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; + assert(node->getOp()); spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision()); @@ -2310,7 +2403,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt { builder.setLine(node->getLoc().line, node->getLoc().getFilename()); std::vector arguments; - translateArguments(*node, arguments); + translateArguments(*node, arguments, lvalueCoherentFlags); spv::Id constructed; if (node->getOp() == glslang::EOpConstructTextureSampler) constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments); @@ -2602,9 +2695,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } } - if (lvalue) + if (lvalue) { operands.push_back(builder.accessChainGetLValue()); - else { + lvalueCoherentFlags = builder.getAccessChain().coherentFlags; + lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()); + } else { builder.setLine(node->getLoc().line, node->getLoc().getFilename()); operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } @@ -2639,7 +2734,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt result = 0; } else if (atomic) { // Handle all atomics - result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType()); + result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags); } else { // Pass through to generic operations. switch (glslangOperands.size()) { @@ -2654,7 +2749,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt result = createUnaryOperation( node->getOp(), decorations, resultType(), operands.front(), - glslangOperands[0]->getAsTyped()->getBasicType()); + glslangOperands[0]->getAsTyped()->getBasicType(), lvalueCoherentFlags); } break; default: @@ -3024,7 +3119,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T return false; } -spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* node) +spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* node, spv::Id forcedType) { // First, steer off constants, which are not SPIR-V variables, but // can still have a mapping to a SPIR-V Id. @@ -3037,7 +3132,8 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* // Now, handle actual variables spv::StorageClass storageClass = TranslateStorageClass(node->getType()); - spv::Id spvType = convertGlslangToSpvType(node->getType()); + spv::Id spvType = forcedType == spv::NoType ? convertGlslangToSpvType(node->getType()) + : forcedType; const bool contains16BitType = node->getType().containsBasicType(glslang::EbtFloat16) || node->getType().containsBasicType(glslang::EbtInt16) || @@ -3066,6 +3162,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* builder.addCapability(spv::CapabilityStorageUniformBufferBlock16); break; default: + if (node->getType().containsBasicType(glslang::EbtFloat16)) + builder.addCapability(spv::CapabilityFloat16); + if (node->getType().containsBasicType(glslang::EbtInt16) || + node->getType().containsBasicType(glslang::EbtUint16)) + builder.addCapability(spv::CapabilityInt16); break; } } @@ -3082,6 +3183,8 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* } else if (storageClass == spv::StorageClassStorageBuffer) { builder.addExtension(spv::E_SPV_KHR_8bit_storage); builder.addCapability(spv::CapabilityStorageBuffer8BitAccess); + } else { + builder.addCapability(spv::CapabilityInt8); } } @@ -4014,6 +4117,16 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF symbolValues[parameters[p]->getAsSymbolNode()->getId()] = function->getParamId(p); // give a name too builder.addName(function->getParamId(p), parameters[p]->getAsSymbolNode()->getName().c_str()); + + const glslang::TType& paramType = parameters[p]->getAsTyped()->getType(); + if (paramType.containsBasicType(glslang::EbtInt8) || + paramType.containsBasicType(glslang::EbtUint8)) + builder.addCapability(spv::CapabilityInt8); + if (paramType.containsBasicType(glslang::EbtInt16) || + paramType.containsBasicType(glslang::EbtUint16)) + builder.addCapability(spv::CapabilityInt16); + if (paramType.containsBasicType(glslang::EbtFloat16)) + builder.addCapability(spv::CapabilityFloat16); } } } @@ -4052,7 +4165,7 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate builder.setBuildPoint(functionBlock); } -void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments) +void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags) { const glslang::TIntermSequence& glslangArguments = node.getSequence(); @@ -4210,9 +4323,11 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& break; } - if (lvalue) + if (lvalue) { arguments.push_back(builder.accessChainGetLValue()); - else + lvalueCoherentFlags = builder.getAccessChain().coherentFlags; + lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType()); + } else arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType())); } } @@ -4253,9 +4368,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return spv::ImageOperandsMaskNone; }; + spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; + std::vector arguments; if (node->getAsAggregate()) - translateArguments(*node->getAsAggregate(), arguments); + translateArguments(*node->getAsAggregate(), arguments, lvalueCoherentFlags); else translateArguments(*node->getAsUnaryNode(), arguments); spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision()); @@ -4536,7 +4653,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO for (; opIt != arguments.end(); ++opIt) operands.push_back(*opIt); - return createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType()); + return createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags); } } @@ -5292,7 +5409,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora } spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId, - spv::Id operand, glslang::TBasicType typeProxy) + spv::Id operand, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags) { spv::Op unaryOp = spv::OpNop; int extBuiltins = -1; @@ -5563,7 +5680,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe // Handle all of the atomics in one place, in createAtomicOperation() std::vector operands; operands.push_back(operand); - return createAtomicOperation(op, decorations.precision, typeId, operands, typeProxy); + return createAtomicOperation(op, decorations.precision, typeId, operands, typeProxy, lvalueCoherentFlags); } case glslang::EOpBitFieldReverse: @@ -6171,7 +6288,7 @@ spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vector } // For glslang ops that map to SPV atomic opCodes -spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) +spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags) { spv::Op opCode = spv::OpNop; @@ -6257,7 +6374,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv scopeId = builder.makeUintConstant(spv::ScopeDevice); } // semantics default to relaxed - spv::Id semanticsId = builder.makeUintConstant(spv::MemorySemanticsMaskNone); + spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.volatil ? spv::MemorySemanticsVolatileMask : spv::MemorySemanticsMaskNone); spv::Id semanticsId2 = semanticsId; pointerId = operands[0]; @@ -6287,7 +6404,10 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv // Check for capabilities unsigned semanticsImmediate = builder.getConstantScalar(semanticsId) | builder.getConstantScalar(semanticsId2); - if (semanticsImmediate & (spv::MemorySemanticsMakeAvailableKHRMask | spv::MemorySemanticsMakeVisibleKHRMask | spv::MemorySemanticsOutputMemoryKHRMask)) { + if (semanticsImmediate & (spv::MemorySemanticsMakeAvailableKHRMask | + spv::MemorySemanticsMakeVisibleKHRMask | + spv::MemorySemanticsOutputMemoryKHRMask | + spv::MemorySemanticsVolatileMask)) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } @@ -6979,7 +7099,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: switch (op) { case glslang::EOpMin: if (isFloat) - libCall = spv::GLSLstd450FMin; + libCall = nanMinMaxClamp ? spv::GLSLstd450NMin : spv::GLSLstd450FMin; else if (isUnsigned) libCall = spv::GLSLstd450UMin; else @@ -6991,7 +7111,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: break; case glslang::EOpMax: if (isFloat) - libCall = spv::GLSLstd450FMax; + libCall = nanMinMaxClamp ? spv::GLSLstd450NMax : spv::GLSLstd450FMax; else if (isUnsigned) libCall = spv::GLSLstd450UMax; else @@ -7010,7 +7130,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: case glslang::EOpClamp: if (isFloat) - libCall = spv::GLSLstd450FClamp; + libCall = nanMinMaxClamp ? spv::GLSLstd450NClamp : spv::GLSLstd450FClamp; else if (isUnsigned) libCall = spv::GLSLstd450UClamp; else @@ -7229,7 +7349,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: unsigned int memoryScope = builder.getConstantScalar(operands[1]); unsigned int semantics = builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]); builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics); - if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask | spv::MemorySemanticsMakeVisibleKHRMask | spv::MemorySemanticsOutputMemoryKHRMask)) { + if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask | + spv::MemorySemanticsMakeVisibleKHRMask | + spv::MemorySemanticsOutputMemoryKHRMask | + spv::MemorySemanticsVolatileMask)) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice || memoryScope == spv::ScopeDevice)) { @@ -7246,7 +7369,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: unsigned int memoryScope = builder.getConstantScalar(operands[0]); unsigned int semantics = builder.getConstantScalar(operands[1]) | builder.getConstantScalar(operands[2]); builder.createMemoryBarrier((spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics); - if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask | spv::MemorySemanticsMakeVisibleKHRMask | spv::MemorySemanticsOutputMemoryKHRMask)) { + if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask | + spv::MemorySemanticsMakeVisibleKHRMask | + spv::MemorySemanticsOutputMemoryKHRMask | + spv::MemorySemanticsVolatileMask)) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } if (glslangIntermediate->usingVulkanMemoryModel() && memoryScope == spv::ScopeDevice) { @@ -7500,8 +7626,12 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } // it was not found, create it - id = createSpvVariable(symbol); + spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false); + auto forcedType = getForcedType(builtIn, symbol->getType()); + id = createSpvVariable(symbol, forcedType.first); symbolValues[symbol->getId()] = id; + if (forcedType.second != spv::NoType) + forceType[id] = forcedType.second; if (symbol->getBasicType() != glslang::EbtBlock) { builder.addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); @@ -7561,10 +7691,10 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, memory[i]); } - // built-in variable decorations - spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false); - if (builtIn != spv::BuiltInMax) + // add built-in variable decoration + if (builtIn != spv::BuiltInMax) { builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); + } // nonuniform builder.addDecoration(id, TranslateNonUniformDecoration(symbol->getType().getQualifier())); diff --git a/3rdparty/glslang/SPIRV/disassemble.cpp b/3rdparty/glslang/SPIRV/disassemble.cpp index 302f21243..3269f97eb 100644 --- a/3rdparty/glslang/SPIRV/disassemble.cpp +++ b/3rdparty/glslang/SPIRV/disassemble.cpp @@ -648,6 +648,9 @@ static void GLSLstd450GetDebugNames(const char** names) names[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid"; names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample"; names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset"; + names[GLSLstd450NMin] = "NMin"; + names[GLSLstd450NMax] = "NMax"; + names[GLSLstd450NClamp] = "NClamp"; } #ifdef AMD_EXTENSIONS diff --git a/3rdparty/glslang/SPIRV/spirv.hpp b/3rdparty/glslang/SPIRV/spirv.hpp index 03ba767ca..bbaf47c44 100644 --- a/3rdparty/glslang/SPIRV/spirv.hpp +++ b/3rdparty/glslang/SPIRV/spirv.hpp @@ -632,6 +632,7 @@ enum MemorySemanticsShift { MemorySemanticsOutputMemoryKHRShift = 12, MemorySemanticsMakeAvailableKHRShift = 13, MemorySemanticsMakeVisibleKHRShift = 14, + MemorySemanticsVolatileShift = 15, MemorySemanticsMax = 0x7fffffff, }; @@ -649,7 +650,8 @@ enum MemorySemanticsMask { MemorySemanticsImageMemoryMask = 0x00000800, MemorySemanticsOutputMemoryKHRMask = 0x00001000, MemorySemanticsMakeAvailableKHRMask = 0x00002000, - MemorySemanticsMakeVisibleKHRMask = 0x00004000, + MemorySemanticsMakeVisibleKHRMask = 0x00004000, + MemorySemanticsVolatileMask = 0x00008000, }; enum MemoryAccessShift { diff --git a/3rdparty/glslang/StandAlone/StandAlone.cpp b/3rdparty/glslang/StandAlone/StandAlone.cpp index b7c438771..9af2596c5 100644 --- a/3rdparty/glslang/StandAlone/StandAlone.cpp +++ b/3rdparty/glslang/StandAlone/StandAlone.cpp @@ -104,6 +104,7 @@ enum TOptions { bool targetHlslFunctionality1 = false; bool SpvToolsDisassembler = false; bool SpvToolsValidate = false; +bool NaNClamp = false; // // Return codes from main/exit(). @@ -522,6 +523,8 @@ void ProcessArguments(std::vector>& workItem } else if (lowerword == "keep-uncalled" || // synonyms lowerword == "ku") { Options |= EOptionKeepUncalled; + } else if (lowerword == "nan-clamp") { + NaNClamp = true; } else if (lowerword == "no-storage-format" || // synonyms lowerword == "nsf") { Options |= EOptionNoStorageFormat; @@ -981,6 +984,7 @@ void CompileAndLinkShaderUnits(std::vector compUnits) shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0); shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0); + shader->setNanMinMaxClamp(NaNClamp); shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]); if (Options & EOptionHlslIoMapping) @@ -1533,9 +1537,11 @@ void usage() " works independently of source language\n" " --hlsl-iomap perform IO mapping in HLSL register space\n" " --hlsl-enable-16bit-types allow 16-bit types in SPIR-V for HLSL\n" - " --hlsl-dx9-compatible interprets sampler declarations as a texture/sampler combo like DirectX9 would." + " --hlsl-dx9-compatible interprets sampler declarations as a\n" + " texture/sampler combo like DirectX9 would.\n" " --invert-y | --iy invert position.Y output in vertex shader\n" " --keep-uncalled | --ku don't eliminate uncalled functions\n" + " --nan-clamp favor non-NaN operand in min, max, and clamp\n" " --no-storage-format | --nsf use Unknown image format\n" " --reflect-strict-array-suffix use strict array suffix rules when\n" " reflecting\n" diff --git a/3rdparty/glslang/Test/baseResults/spv.400.frag.nanclamp.out b/3rdparty/glslang/Test/baseResults/spv.400.frag.nanclamp.out new file mode 100644 index 000000000..5305ee4c3 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/spv.400.frag.nanclamp.out @@ -0,0 +1,1402 @@ +spv.400.frag +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 1118 + + Capability Shader + Capability Geometry + Capability Float64 + Capability ImageGatherExtended + Capability ClipDistance + Capability SampledRect + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 1027 1033 1038 1050 1076 1097 1099 1105 1107 1116 + ExecutionMode 4 OriginUpperLeft + Source GLSL 400 + SourceExtension "GL_ARB_separate_shader_objects" + Name 4 "main" + Name 6 "foo23(" + Name 8 "doubles(" + Name 13 "outp" + Name 17 "u2drs" + Name 41 "doublev" + Name 45 "dvec2v" + Name 50 "dvec3v" + Name 55 "dvec4v" + Name 430 "boolv" + Name 439 "bvec2v" + Name 448 "bvec3v" + Name 457 "bvec4v" + Name 739 "dmat2v" + Name 745 "dmat3v" + Name 751 "dmat4v" + Name 757 "dmat2x3v" + Name 763 "dmat3x2v" + Name 769 "dmat2x4v" + Name 775 "dmat4x2v" + Name 781 "dmat3x4v" + Name 787 "dmat4x3v" + Name 1019 "v" + Name 1025 "arrayedSampler" + Name 1027 "i" + Name 1033 "c2D" + Name 1038 "gl_ClipDistance" + Name 1050 "uoutp" + Name 1054 "samp2dr" + Name 1076 "ioutp" + Name 1080 "isamp2DA" + Name 1097 "gl_FragCoord" + Name 1099 "vl2" + Name 1105 "uo" + Name 1107 "u" + Name 1115 "id" + Name 1116 "gl_PrimitiveID" + Decorate 13(outp) Location 1 + Decorate 17(u2drs) DescriptorSet 0 + Decorate 17(u2drs) Binding 3 + Decorate 1025(arrayedSampler) DescriptorSet 0 + Decorate 1025(arrayedSampler) Binding 0 + Decorate 1027(i) Flat + Decorate 1027(i) Location 1 + Decorate 1033(c2D) Location 0 + Decorate 1038(gl_ClipDistance) BuiltIn ClipDistance + Decorate 1050(uoutp) Location 3 + Decorate 1054(samp2dr) DescriptorSet 0 + Decorate 1054(samp2dr) Binding 1 + Decorate 1076(ioutp) Location 2 + Decorate 1080(isamp2DA) DescriptorSet 0 + Decorate 1080(isamp2DA) Binding 2 + Decorate 1097(gl_FragCoord) BuiltIn FragCoord + Decorate 1099(vl2) Location 6 + Decorate 1105(uo) Location 0 + Decorate 1107(u) Flat + Decorate 1107(u) Location 2 + Decorate 1116(gl_PrimitiveID) Flat + Decorate 1116(gl_PrimitiveID) BuiltIn PrimitiveId + 2: TypeVoid + 3: TypeFunction 2 + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Output 11(fvec4) + 13(outp): 12(ptr) Variable Output + 14: TypeImage 10(float) Rect depth sampled format:Unknown + 15: TypeSampledImage 14 + 16: TypePointer UniformConstant 15 + 17(u2drs): 16(ptr) Variable UniformConstant + 20: TypeVector 10(float) 2 + 21: 10(float) Constant 0 + 22: 20(fvec2) ConstantComposite 21 21 + 23: TypeInt 32 1 + 24: TypeVector 23(int) 2 + 25: 23(int) Constant 3 + 26: 23(int) Constant 4 + 27: 24(ivec2) ConstantComposite 25 26 + 32: TypeInt 32 0 + 33: 32(int) Constant 0 + 34: TypePointer Output 10(float) + 39: TypeFloat 64 + 40: TypePointer Function 39(float64_t) + 42:39(float64_t) Constant 2507418074 1073430332 + 43: TypeVector 39(float64_t) 2 + 44: TypePointer Function 43(f64vec2) + 46:39(float64_t) Constant 796182188 1073367658 + 47: 43(f64vec2) ConstantComposite 46 46 + 48: TypeVector 39(float64_t) 3 + 49: TypePointer Function 48(f64vec3) + 51:39(float64_t) Constant 1719614413 1073127582 + 52: 48(f64vec3) ConstantComposite 51 51 51 + 53: TypeVector 39(float64_t) 4 + 54: TypePointer Function 53(f64vec4) + 428: TypeBool + 429: TypePointer Function 428(bool) + 437: TypeVector 428(bool) 2 + 438: TypePointer Function 437(bvec2) + 446: TypeVector 428(bool) 3 + 447: TypePointer Function 446(bvec3) + 455: TypeVector 428(bool) 4 + 456: TypePointer Function 455(bvec4) + 563: 428(bool) ConstantFalse + 572: 437(bvec2) ConstantComposite 563 563 + 581: 446(bvec3) ConstantComposite 563 563 563 + 590: 455(bvec4) ConstantComposite 563 563 563 563 + 737: TypeMatrix 43(f64vec2) 2 + 738: TypePointer Function 737 + 743: TypeMatrix 48(f64vec3) 3 + 744: TypePointer Function 743 + 749: TypeMatrix 53(f64vec4) 4 + 750: TypePointer Function 749 + 755: TypeMatrix 48(f64vec3) 2 + 756: TypePointer Function 755 + 761: TypeMatrix 43(f64vec2) 3 + 762: TypePointer Function 761 + 767: TypeMatrix 53(f64vec4) 2 + 768: TypePointer Function 767 + 773: TypeMatrix 43(f64vec2) 4 + 774: TypePointer Function 773 + 779: TypeMatrix 53(f64vec4) 3 + 780: TypePointer Function 779 + 785: TypeMatrix 48(f64vec3) 4 + 786: TypePointer Function 785 + 954: 32(int) Constant 1 + 958: 32(int) Constant 2 + 962: 32(int) Constant 3 + 966: 23(int) Constant 1 + 970: 23(int) Constant 2 + 996: 10(float) Constant 1065353216 + 1018: TypePointer Function 11(fvec4) + 1020: TypeImage 10(float) 2D sampled format:Unknown + 1021: TypeSampledImage 1020 + 1022: 32(int) Constant 5 + 1023: TypeArray 1021 1022 + 1024: TypePointer UniformConstant 1023 +1025(arrayedSampler): 1024(ptr) Variable UniformConstant + 1026: TypePointer Input 23(int) + 1027(i): 1026(ptr) Variable Input + 1029: TypePointer UniformConstant 1021 + 1032: TypePointer Input 20(fvec2) + 1033(c2D): 1032(ptr) Variable Input + 1036: TypeArray 10(float) 958 + 1037: TypePointer Input 1036 +1038(gl_ClipDistance): 1037(ptr) Variable Input + 1039: TypePointer Input 10(float) + 1043: TypeVector 10(float) 3 + 1048: TypeVector 32(int) 4 + 1049: TypePointer Output 1048(ivec4) + 1050(uoutp): 1049(ptr) Variable Output + 1051: TypeImage 32(int) Rect sampled format:Unknown + 1052: TypeSampledImage 1051 + 1053: TypePointer UniformConstant 1052 + 1054(samp2dr): 1053(ptr) Variable UniformConstant + 1057: 32(int) Constant 4 + 1058: TypeArray 24(ivec2) 1057 + 1059: 24(ivec2) ConstantComposite 966 970 + 1060: 23(int) Constant 15 + 1061: 23(int) Constant 16 + 1062: 24(ivec2) ConstantComposite 1060 1061 + 1063: 23(int) Constant 4294967294 + 1064: 23(int) Constant 0 + 1065: 24(ivec2) ConstantComposite 1063 1064 + 1066: 1058 ConstantComposite 1059 27 1062 1065 + 1074: TypeVector 23(int) 4 + 1075: TypePointer Output 1074(ivec4) + 1076(ioutp): 1075(ptr) Variable Output + 1077: TypeImage 23(int) 2D array sampled format:Unknown + 1078: TypeSampledImage 1077 + 1079: TypePointer UniformConstant 1078 + 1080(isamp2DA): 1079(ptr) Variable UniformConstant + 1082: 10(float) Constant 1036831949 + 1083: 1043(fvec3) ConstantComposite 1082 1082 1082 + 1084: 24(ivec2) ConstantComposite 966 966 + 1096: TypePointer Input 11(fvec4) +1097(gl_FragCoord): 1096(ptr) Variable Input + 1099(vl2): 1096(ptr) Variable Input + 1104: TypePointer Output 32(int) + 1105(uo): 1104(ptr) Variable Output + 1106: TypePointer Input 32(int) + 1107(u): 1106(ptr) Variable Input + 1114: TypePointer Function 23(int) +1116(gl_PrimitiveID): 1026(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 1019(v): 1018(ptr) Variable Function + 1115(id): 1114(ptr) Variable Function + 1028: 23(int) Load 1027(i) + 1030: 1029(ptr) AccessChain 1025(arrayedSampler) 1028 + 1031: 1021 Load 1030 + 1034: 20(fvec2) Load 1033(c2D) + 1035: 11(fvec4) ImageSampleImplicitLod 1031 1034 + Store 1019(v) 1035 + 1040: 1039(ptr) AccessChain 1038(gl_ClipDistance) 966 + 1041: 10(float) Load 1040 + 1042: 34(ptr) AccessChain 13(outp) 33 + Store 1042 1041 + 1044: 11(fvec4) Load 1019(v) + 1045: 1043(fvec3) VectorShuffle 1044 1044 1 2 3 + 1046: 11(fvec4) Load 13(outp) + 1047: 11(fvec4) VectorShuffle 1046 1045 0 4 5 6 + Store 13(outp) 1047 + 1055: 1052 Load 1054(samp2dr) + 1056: 20(fvec2) Load 1033(c2D) + 1067: 1048(ivec4) ImageGather 1055 1056 970 ConstOffsets 1066 + Store 1050(uoutp) 1067 + 1068: 1029(ptr) AccessChain 1025(arrayedSampler) 1064 + 1069: 1021 Load 1068 + 1070: 20(fvec2) Load 1033(c2D) + 1071: 11(fvec4) ImageGather 1069 1070 1064 + 1072: 11(fvec4) Load 13(outp) + 1073: 11(fvec4) FAdd 1072 1071 + Store 13(outp) 1073 + 1081: 1078 Load 1080(isamp2DA) + 1085: 1074(ivec4) ImageGather 1081 1083 25 ConstOffset 1084 + Store 1076(ioutp) 1085 + 1086: 1078 Load 1080(isamp2DA) + 1087: 1074(ivec4) ImageGather 1086 1083 25 ConstOffset 1084 + 1088: 1074(ivec4) Load 1076(ioutp) + 1089: 1074(ivec4) IAdd 1088 1087 + Store 1076(ioutp) 1089 + 1090: 1078 Load 1080(isamp2DA) + 1091: 23(int) Load 1027(i) + 1092: 24(ivec2) CompositeConstruct 1091 1091 + 1093: 1074(ivec4) ImageGather 1090 1083 1064 Offset 1092 + 1094: 1074(ivec4) Load 1076(ioutp) + 1095: 1074(ivec4) IAdd 1094 1093 + Store 1076(ioutp) 1095 + 1098: 11(fvec4) Load 1097(gl_FragCoord) + 1100: 11(fvec4) Load 1099(vl2) + 1101: 11(fvec4) FAdd 1098 1100 + 1102: 11(fvec4) Load 13(outp) + 1103: 11(fvec4) FAdd 1102 1101 + Store 13(outp) 1103 + 1108: 32(int) Load 1107(u) + 1109: 23(int) Load 1027(i) + 1110: 32(int) Bitcast 1109 + 1111: 32(int) UMod 1108 1110 + Store 1105(uo) 1111 + 1112: 2 FunctionCall 6(foo23() + 1113: 2 FunctionCall 8(doubles() + 1117: 23(int) Load 1116(gl_PrimitiveID) + Store 1115(id) 1117 + Return + FunctionEnd + 6(foo23(): 2 Function None 3 + 7: Label + 18: 15 Load 17(u2drs) + 19: 11(fvec4) Load 13(outp) + 28: 10(float) CompositeExtract 19 2 + 29: 10(float) CompositeExtract 19 3 + 30: 11(fvec4) CompositeInsert 29 19 2 + 31: 10(float) ImageSampleProjDrefExplicitLod 18 30 28 Grad ConstOffset 22 22 27 + 35: 34(ptr) AccessChain 13(outp) 33 + 36: 10(float) Load 35 + 37: 10(float) FAdd 36 31 + 38: 34(ptr) AccessChain 13(outp) 33 + Store 38 37 + Return + FunctionEnd + 8(doubles(): 2 Function None 3 + 9: Label + 41(doublev): 40(ptr) Variable Function + 45(dvec2v): 44(ptr) Variable Function + 50(dvec3v): 49(ptr) Variable Function + 55(dvec4v): 54(ptr) Variable Function + 430(boolv): 429(ptr) Variable Function + 439(bvec2v): 438(ptr) Variable Function + 448(bvec3v): 447(ptr) Variable Function + 457(bvec4v): 456(ptr) Variable Function + 557: 429(ptr) Variable Function + 566: 438(ptr) Variable Function + 575: 447(ptr) Variable Function + 584: 456(ptr) Variable Function + 739(dmat2v): 738(ptr) Variable Function + 745(dmat3v): 744(ptr) Variable Function + 751(dmat4v): 750(ptr) Variable Function + 757(dmat2x3v): 756(ptr) Variable Function + 763(dmat3x2v): 762(ptr) Variable Function + 769(dmat2x4v): 768(ptr) Variable Function + 775(dmat4x2v): 774(ptr) Variable Function + 781(dmat3x4v): 780(ptr) Variable Function + 787(dmat4x3v): 786(ptr) Variable Function + Store 41(doublev) 42 + Store 45(dvec2v) 47 + Store 50(dvec3v) 52 + 56:39(float64_t) Load 41(doublev) + 57: 53(f64vec4) CompositeConstruct 56 56 56 56 + 58: 53(f64vec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 57 + Store 55(dvec4v) 58 + 59:39(float64_t) Load 41(doublev) + 60:39(float64_t) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 59 + 61:39(float64_t) Load 41(doublev) + 62:39(float64_t) FAdd 61 60 + Store 41(doublev) 62 + 63: 43(f64vec2) Load 45(dvec2v) + 64: 43(f64vec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 63 + 65: 43(f64vec2) Load 45(dvec2v) + 66: 43(f64vec2) FAdd 65 64 + Store 45(dvec2v) 66 + 67: 48(f64vec3) Load 50(dvec3v) + 68: 48(f64vec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 67 + 69: 48(f64vec3) Load 50(dvec3v) + 70: 48(f64vec3) FAdd 69 68 + Store 50(dvec3v) 70 + 71: 53(f64vec4) Load 55(dvec4v) + 72: 53(f64vec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 71 + 73: 53(f64vec4) Load 55(dvec4v) + 74: 53(f64vec4) FAdd 73 72 + Store 55(dvec4v) 74 + 75:39(float64_t) Load 41(doublev) + 76:39(float64_t) ExtInst 1(GLSL.std.450) 4(FAbs) 75 + 77:39(float64_t) Load 41(doublev) + 78:39(float64_t) FAdd 77 76 + Store 41(doublev) 78 + 79: 43(f64vec2) Load 45(dvec2v) + 80: 43(f64vec2) ExtInst 1(GLSL.std.450) 4(FAbs) 79 + 81: 43(f64vec2) Load 45(dvec2v) + 82: 43(f64vec2) FAdd 81 80 + Store 45(dvec2v) 82 + 83: 48(f64vec3) Load 50(dvec3v) + 84: 48(f64vec3) ExtInst 1(GLSL.std.450) 4(FAbs) 83 + 85: 48(f64vec3) Load 50(dvec3v) + 86: 48(f64vec3) FAdd 85 84 + Store 50(dvec3v) 86 + 87: 53(f64vec4) Load 55(dvec4v) + 88: 53(f64vec4) ExtInst 1(GLSL.std.450) 4(FAbs) 87 + 89: 53(f64vec4) Load 55(dvec4v) + 90: 53(f64vec4) FAdd 89 88 + Store 55(dvec4v) 90 + 91:39(float64_t) Load 41(doublev) + 92:39(float64_t) ExtInst 1(GLSL.std.450) 6(FSign) 91 + 93:39(float64_t) Load 41(doublev) + 94:39(float64_t) FAdd 93 92 + Store 41(doublev) 94 + 95: 43(f64vec2) Load 45(dvec2v) + 96: 43(f64vec2) ExtInst 1(GLSL.std.450) 6(FSign) 95 + 97: 43(f64vec2) Load 45(dvec2v) + 98: 43(f64vec2) FAdd 97 96 + Store 45(dvec2v) 98 + 99: 48(f64vec3) Load 50(dvec3v) + 100: 48(f64vec3) ExtInst 1(GLSL.std.450) 6(FSign) 99 + 101: 48(f64vec3) Load 50(dvec3v) + 102: 48(f64vec3) FAdd 101 100 + Store 50(dvec3v) 102 + 103: 53(f64vec4) Load 55(dvec4v) + 104: 53(f64vec4) ExtInst 1(GLSL.std.450) 6(FSign) 103 + 105: 53(f64vec4) Load 55(dvec4v) + 106: 53(f64vec4) FAdd 105 104 + Store 55(dvec4v) 106 + 107:39(float64_t) Load 41(doublev) + 108:39(float64_t) ExtInst 1(GLSL.std.450) 8(Floor) 107 + 109:39(float64_t) Load 41(doublev) + 110:39(float64_t) FAdd 109 108 + Store 41(doublev) 110 + 111: 43(f64vec2) Load 45(dvec2v) + 112: 43(f64vec2) ExtInst 1(GLSL.std.450) 8(Floor) 111 + 113: 43(f64vec2) Load 45(dvec2v) + 114: 43(f64vec2) FAdd 113 112 + Store 45(dvec2v) 114 + 115: 48(f64vec3) Load 50(dvec3v) + 116: 48(f64vec3) ExtInst 1(GLSL.std.450) 8(Floor) 115 + 117: 48(f64vec3) Load 50(dvec3v) + 118: 48(f64vec3) FAdd 117 116 + Store 50(dvec3v) 118 + 119: 53(f64vec4) Load 55(dvec4v) + 120: 53(f64vec4) ExtInst 1(GLSL.std.450) 8(Floor) 119 + 121: 53(f64vec4) Load 55(dvec4v) + 122: 53(f64vec4) FAdd 121 120 + Store 55(dvec4v) 122 + 123:39(float64_t) Load 41(doublev) + 124:39(float64_t) ExtInst 1(GLSL.std.450) 3(Trunc) 123 + 125:39(float64_t) Load 41(doublev) + 126:39(float64_t) FAdd 125 124 + Store 41(doublev) 126 + 127: 43(f64vec2) Load 45(dvec2v) + 128: 43(f64vec2) ExtInst 1(GLSL.std.450) 3(Trunc) 127 + 129: 43(f64vec2) Load 45(dvec2v) + 130: 43(f64vec2) FAdd 129 128 + Store 45(dvec2v) 130 + 131: 48(f64vec3) Load 50(dvec3v) + 132: 48(f64vec3) ExtInst 1(GLSL.std.450) 3(Trunc) 131 + 133: 48(f64vec3) Load 50(dvec3v) + 134: 48(f64vec3) FAdd 133 132 + Store 50(dvec3v) 134 + 135: 53(f64vec4) Load 55(dvec4v) + 136: 53(f64vec4) ExtInst 1(GLSL.std.450) 3(Trunc) 135 + 137: 53(f64vec4) Load 55(dvec4v) + 138: 53(f64vec4) FAdd 137 136 + Store 55(dvec4v) 138 + 139:39(float64_t) Load 41(doublev) + 140:39(float64_t) ExtInst 1(GLSL.std.450) 1(Round) 139 + 141:39(float64_t) Load 41(doublev) + 142:39(float64_t) FAdd 141 140 + Store 41(doublev) 142 + 143: 43(f64vec2) Load 45(dvec2v) + 144: 43(f64vec2) ExtInst 1(GLSL.std.450) 1(Round) 143 + 145: 43(f64vec2) Load 45(dvec2v) + 146: 43(f64vec2) FAdd 145 144 + Store 45(dvec2v) 146 + 147: 48(f64vec3) Load 50(dvec3v) + 148: 48(f64vec3) ExtInst 1(GLSL.std.450) 1(Round) 147 + 149: 48(f64vec3) Load 50(dvec3v) + 150: 48(f64vec3) FAdd 149 148 + Store 50(dvec3v) 150 + 151: 53(f64vec4) Load 55(dvec4v) + 152: 53(f64vec4) ExtInst 1(GLSL.std.450) 1(Round) 151 + 153: 53(f64vec4) Load 55(dvec4v) + 154: 53(f64vec4) FAdd 153 152 + Store 55(dvec4v) 154 + 155:39(float64_t) Load 41(doublev) + 156:39(float64_t) ExtInst 1(GLSL.std.450) 2(RoundEven) 155 + 157:39(float64_t) Load 41(doublev) + 158:39(float64_t) FAdd 157 156 + Store 41(doublev) 158 + 159: 43(f64vec2) Load 45(dvec2v) + 160: 43(f64vec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 159 + 161: 43(f64vec2) Load 45(dvec2v) + 162: 43(f64vec2) FAdd 161 160 + Store 45(dvec2v) 162 + 163: 48(f64vec3) Load 50(dvec3v) + 164: 48(f64vec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 163 + 165: 48(f64vec3) Load 50(dvec3v) + 166: 48(f64vec3) FAdd 165 164 + Store 50(dvec3v) 166 + 167: 53(f64vec4) Load 55(dvec4v) + 168: 53(f64vec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 167 + 169: 53(f64vec4) Load 55(dvec4v) + 170: 53(f64vec4) FAdd 169 168 + Store 55(dvec4v) 170 + 171:39(float64_t) Load 41(doublev) + 172:39(float64_t) ExtInst 1(GLSL.std.450) 9(Ceil) 171 + 173:39(float64_t) Load 41(doublev) + 174:39(float64_t) FAdd 173 172 + Store 41(doublev) 174 + 175: 43(f64vec2) Load 45(dvec2v) + 176: 43(f64vec2) ExtInst 1(GLSL.std.450) 9(Ceil) 175 + 177: 43(f64vec2) Load 45(dvec2v) + 178: 43(f64vec2) FAdd 177 176 + Store 45(dvec2v) 178 + 179: 48(f64vec3) Load 50(dvec3v) + 180: 48(f64vec3) ExtInst 1(GLSL.std.450) 9(Ceil) 179 + 181: 48(f64vec3) Load 50(dvec3v) + 182: 48(f64vec3) FAdd 181 180 + Store 50(dvec3v) 182 + 183: 53(f64vec4) Load 55(dvec4v) + 184: 53(f64vec4) ExtInst 1(GLSL.std.450) 9(Ceil) 183 + 185: 53(f64vec4) Load 55(dvec4v) + 186: 53(f64vec4) FAdd 185 184 + Store 55(dvec4v) 186 + 187:39(float64_t) Load 41(doublev) + 188:39(float64_t) ExtInst 1(GLSL.std.450) 10(Fract) 187 + 189:39(float64_t) Load 41(doublev) + 190:39(float64_t) FAdd 189 188 + Store 41(doublev) 190 + 191: 43(f64vec2) Load 45(dvec2v) + 192: 43(f64vec2) ExtInst 1(GLSL.std.450) 10(Fract) 191 + 193: 43(f64vec2) Load 45(dvec2v) + 194: 43(f64vec2) FAdd 193 192 + Store 45(dvec2v) 194 + 195: 48(f64vec3) Load 50(dvec3v) + 196: 48(f64vec3) ExtInst 1(GLSL.std.450) 10(Fract) 195 + 197: 48(f64vec3) Load 50(dvec3v) + 198: 48(f64vec3) FAdd 197 196 + Store 50(dvec3v) 198 + 199: 53(f64vec4) Load 55(dvec4v) + 200: 53(f64vec4) ExtInst 1(GLSL.std.450) 10(Fract) 199 + 201: 53(f64vec4) Load 55(dvec4v) + 202: 53(f64vec4) FAdd 201 200 + Store 55(dvec4v) 202 + 203:39(float64_t) Load 41(doublev) + 204:39(float64_t) Load 41(doublev) + 205:39(float64_t) FMod 203 204 + 206:39(float64_t) Load 41(doublev) + 207:39(float64_t) FAdd 206 205 + Store 41(doublev) 207 + 208: 43(f64vec2) Load 45(dvec2v) + 209:39(float64_t) Load 41(doublev) + 210: 43(f64vec2) CompositeConstruct 209 209 + 211: 43(f64vec2) FMod 208 210 + 212: 43(f64vec2) Load 45(dvec2v) + 213: 43(f64vec2) FAdd 212 211 + Store 45(dvec2v) 213 + 214: 48(f64vec3) Load 50(dvec3v) + 215:39(float64_t) Load 41(doublev) + 216: 48(f64vec3) CompositeConstruct 215 215 215 + 217: 48(f64vec3) FMod 214 216 + 218: 48(f64vec3) Load 50(dvec3v) + 219: 48(f64vec3) FAdd 218 217 + Store 50(dvec3v) 219 + 220: 53(f64vec4) Load 55(dvec4v) + 221:39(float64_t) Load 41(doublev) + 222: 53(f64vec4) CompositeConstruct 221 221 221 221 + 223: 53(f64vec4) FMod 220 222 + 224: 53(f64vec4) Load 55(dvec4v) + 225: 53(f64vec4) FAdd 224 223 + Store 55(dvec4v) 225 + 226: 43(f64vec2) Load 45(dvec2v) + 227: 43(f64vec2) Load 45(dvec2v) + 228: 43(f64vec2) FMod 226 227 + 229: 43(f64vec2) Load 45(dvec2v) + 230: 43(f64vec2) FAdd 229 228 + Store 45(dvec2v) 230 + 231: 48(f64vec3) Load 50(dvec3v) + 232: 48(f64vec3) Load 50(dvec3v) + 233: 48(f64vec3) FMod 231 232 + 234: 48(f64vec3) Load 50(dvec3v) + 235: 48(f64vec3) FAdd 234 233 + Store 50(dvec3v) 235 + 236: 53(f64vec4) Load 55(dvec4v) + 237: 53(f64vec4) Load 55(dvec4v) + 238: 53(f64vec4) FMod 236 237 + 239: 53(f64vec4) Load 55(dvec4v) + 240: 53(f64vec4) FAdd 239 238 + Store 55(dvec4v) 240 + 241:39(float64_t) Load 41(doublev) + 242:39(float64_t) ExtInst 1(GLSL.std.450) 35(Modf) 241 41(doublev) + 243:39(float64_t) Load 41(doublev) + 244:39(float64_t) FAdd 243 242 + Store 41(doublev) 244 + 245: 43(f64vec2) Load 45(dvec2v) + 246: 43(f64vec2) ExtInst 1(GLSL.std.450) 35(Modf) 245 45(dvec2v) + 247: 43(f64vec2) Load 45(dvec2v) + 248: 43(f64vec2) FAdd 247 246 + Store 45(dvec2v) 248 + 249: 48(f64vec3) Load 50(dvec3v) + 250: 48(f64vec3) ExtInst 1(GLSL.std.450) 35(Modf) 249 50(dvec3v) + 251: 48(f64vec3) Load 50(dvec3v) + 252: 48(f64vec3) FAdd 251 250 + Store 50(dvec3v) 252 + 253: 53(f64vec4) Load 55(dvec4v) + 254: 53(f64vec4) ExtInst 1(GLSL.std.450) 35(Modf) 253 55(dvec4v) + 255: 53(f64vec4) Load 55(dvec4v) + 256: 53(f64vec4) FAdd 255 254 + Store 55(dvec4v) 256 + 257:39(float64_t) Load 41(doublev) + 258:39(float64_t) Load 41(doublev) + 259:39(float64_t) ExtInst 1(GLSL.std.450) 79(NMin) 257 258 + 260:39(float64_t) Load 41(doublev) + 261:39(float64_t) FAdd 260 259 + Store 41(doublev) 261 + 262: 43(f64vec2) Load 45(dvec2v) + 263:39(float64_t) Load 41(doublev) + 264: 43(f64vec2) CompositeConstruct 263 263 + 265: 43(f64vec2) ExtInst 1(GLSL.std.450) 79(NMin) 262 264 + 266: 43(f64vec2) Load 45(dvec2v) + 267: 43(f64vec2) FAdd 266 265 + Store 45(dvec2v) 267 + 268: 48(f64vec3) Load 50(dvec3v) + 269:39(float64_t) Load 41(doublev) + 270: 48(f64vec3) CompositeConstruct 269 269 269 + 271: 48(f64vec3) ExtInst 1(GLSL.std.450) 79(NMin) 268 270 + 272: 48(f64vec3) Load 50(dvec3v) + 273: 48(f64vec3) FAdd 272 271 + Store 50(dvec3v) 273 + 274: 53(f64vec4) Load 55(dvec4v) + 275:39(float64_t) Load 41(doublev) + 276: 53(f64vec4) CompositeConstruct 275 275 275 275 + 277: 53(f64vec4) ExtInst 1(GLSL.std.450) 79(NMin) 274 276 + 278: 53(f64vec4) Load 55(dvec4v) + 279: 53(f64vec4) FAdd 278 277 + Store 55(dvec4v) 279 + 280: 43(f64vec2) Load 45(dvec2v) + 281: 43(f64vec2) Load 45(dvec2v) + 282: 43(f64vec2) ExtInst 1(GLSL.std.450) 79(NMin) 280 281 + 283: 43(f64vec2) Load 45(dvec2v) + 284: 43(f64vec2) FAdd 283 282 + Store 45(dvec2v) 284 + 285: 48(f64vec3) Load 50(dvec3v) + 286: 48(f64vec3) Load 50(dvec3v) + 287: 48(f64vec3) ExtInst 1(GLSL.std.450) 79(NMin) 285 286 + 288: 48(f64vec3) Load 50(dvec3v) + 289: 48(f64vec3) FAdd 288 287 + Store 50(dvec3v) 289 + 290: 53(f64vec4) Load 55(dvec4v) + 291: 53(f64vec4) Load 55(dvec4v) + 292: 53(f64vec4) ExtInst 1(GLSL.std.450) 79(NMin) 290 291 + 293: 53(f64vec4) Load 55(dvec4v) + 294: 53(f64vec4) FAdd 293 292 + Store 55(dvec4v) 294 + 295:39(float64_t) Load 41(doublev) + 296:39(float64_t) Load 41(doublev) + 297:39(float64_t) ExtInst 1(GLSL.std.450) 80(NMax) 295 296 + 298:39(float64_t) Load 41(doublev) + 299:39(float64_t) FAdd 298 297 + Store 41(doublev) 299 + 300: 43(f64vec2) Load 45(dvec2v) + 301:39(float64_t) Load 41(doublev) + 302: 43(f64vec2) CompositeConstruct 301 301 + 303: 43(f64vec2) ExtInst 1(GLSL.std.450) 80(NMax) 300 302 + 304: 43(f64vec2) Load 45(dvec2v) + 305: 43(f64vec2) FAdd 304 303 + Store 45(dvec2v) 305 + 306: 48(f64vec3) Load 50(dvec3v) + 307:39(float64_t) Load 41(doublev) + 308: 48(f64vec3) CompositeConstruct 307 307 307 + 309: 48(f64vec3) ExtInst 1(GLSL.std.450) 80(NMax) 306 308 + 310: 48(f64vec3) Load 50(dvec3v) + 311: 48(f64vec3) FAdd 310 309 + Store 50(dvec3v) 311 + 312: 53(f64vec4) Load 55(dvec4v) + 313:39(float64_t) Load 41(doublev) + 314: 53(f64vec4) CompositeConstruct 313 313 313 313 + 315: 53(f64vec4) ExtInst 1(GLSL.std.450) 80(NMax) 312 314 + 316: 53(f64vec4) Load 55(dvec4v) + 317: 53(f64vec4) FAdd 316 315 + Store 55(dvec4v) 317 + 318: 43(f64vec2) Load 45(dvec2v) + 319: 43(f64vec2) Load 45(dvec2v) + 320: 43(f64vec2) ExtInst 1(GLSL.std.450) 80(NMax) 318 319 + 321: 43(f64vec2) Load 45(dvec2v) + 322: 43(f64vec2) FAdd 321 320 + Store 45(dvec2v) 322 + 323: 48(f64vec3) Load 50(dvec3v) + 324: 48(f64vec3) Load 50(dvec3v) + 325: 48(f64vec3) ExtInst 1(GLSL.std.450) 80(NMax) 323 324 + 326: 48(f64vec3) Load 50(dvec3v) + 327: 48(f64vec3) FAdd 326 325 + Store 50(dvec3v) 327 + 328: 53(f64vec4) Load 55(dvec4v) + 329: 53(f64vec4) Load 55(dvec4v) + 330: 53(f64vec4) ExtInst 1(GLSL.std.450) 80(NMax) 328 329 + 331: 53(f64vec4) Load 55(dvec4v) + 332: 53(f64vec4) FAdd 331 330 + Store 55(dvec4v) 332 + 333:39(float64_t) Load 41(doublev) + 334:39(float64_t) Load 41(doublev) + 335:39(float64_t) Load 41(doublev) + 336:39(float64_t) ExtInst 1(GLSL.std.450) 81(NClamp) 333 334 335 + 337:39(float64_t) Load 41(doublev) + 338:39(float64_t) FAdd 337 336 + Store 41(doublev) 338 + 339: 43(f64vec2) Load 45(dvec2v) + 340:39(float64_t) Load 41(doublev) + 341:39(float64_t) Load 41(doublev) + 342: 43(f64vec2) CompositeConstruct 340 340 + 343: 43(f64vec2) CompositeConstruct 341 341 + 344: 43(f64vec2) ExtInst 1(GLSL.std.450) 81(NClamp) 339 342 343 + 345: 43(f64vec2) Load 45(dvec2v) + 346: 43(f64vec2) FAdd 345 344 + Store 45(dvec2v) 346 + 347: 48(f64vec3) Load 50(dvec3v) + 348:39(float64_t) Load 41(doublev) + 349:39(float64_t) Load 41(doublev) + 350: 48(f64vec3) CompositeConstruct 348 348 348 + 351: 48(f64vec3) CompositeConstruct 349 349 349 + 352: 48(f64vec3) ExtInst 1(GLSL.std.450) 81(NClamp) 347 350 351 + 353: 48(f64vec3) Load 50(dvec3v) + 354: 48(f64vec3) FAdd 353 352 + Store 50(dvec3v) 354 + 355: 53(f64vec4) Load 55(dvec4v) + 356:39(float64_t) Load 41(doublev) + 357:39(float64_t) Load 41(doublev) + 358: 53(f64vec4) CompositeConstruct 356 356 356 356 + 359: 53(f64vec4) CompositeConstruct 357 357 357 357 + 360: 53(f64vec4) ExtInst 1(GLSL.std.450) 81(NClamp) 355 358 359 + 361: 53(f64vec4) Load 55(dvec4v) + 362: 53(f64vec4) FAdd 361 360 + Store 55(dvec4v) 362 + 363: 43(f64vec2) Load 45(dvec2v) + 364: 43(f64vec2) Load 45(dvec2v) + 365: 43(f64vec2) Load 45(dvec2v) + 366: 43(f64vec2) ExtInst 1(GLSL.std.450) 81(NClamp) 363 364 365 + 367: 43(f64vec2) Load 45(dvec2v) + 368: 43(f64vec2) FAdd 367 366 + Store 45(dvec2v) 368 + 369: 48(f64vec3) Load 50(dvec3v) + 370: 48(f64vec3) Load 50(dvec3v) + 371: 48(f64vec3) Load 50(dvec3v) + 372: 48(f64vec3) ExtInst 1(GLSL.std.450) 81(NClamp) 369 370 371 + 373: 48(f64vec3) Load 50(dvec3v) + 374: 48(f64vec3) FAdd 373 372 + Store 50(dvec3v) 374 + 375: 53(f64vec4) Load 55(dvec4v) + 376: 53(f64vec4) Load 55(dvec4v) + 377: 53(f64vec4) Load 55(dvec4v) + 378: 53(f64vec4) ExtInst 1(GLSL.std.450) 81(NClamp) 375 376 377 + 379: 53(f64vec4) Load 55(dvec4v) + 380: 53(f64vec4) FAdd 379 378 + Store 55(dvec4v) 380 + 381:39(float64_t) Load 41(doublev) + 382:39(float64_t) Load 41(doublev) + 383:39(float64_t) Load 41(doublev) + 384:39(float64_t) ExtInst 1(GLSL.std.450) 46(FMix) 381 382 383 + 385:39(float64_t) Load 41(doublev) + 386:39(float64_t) FAdd 385 384 + Store 41(doublev) 386 + 387: 43(f64vec2) Load 45(dvec2v) + 388: 43(f64vec2) Load 45(dvec2v) + 389:39(float64_t) Load 41(doublev) + 390: 43(f64vec2) CompositeConstruct 389 389 + 391: 43(f64vec2) ExtInst 1(GLSL.std.450) 46(FMix) 387 388 390 + 392: 43(f64vec2) Load 45(dvec2v) + 393: 43(f64vec2) FAdd 392 391 + Store 45(dvec2v) 393 + 394: 48(f64vec3) Load 50(dvec3v) + 395: 48(f64vec3) Load 50(dvec3v) + 396:39(float64_t) Load 41(doublev) + 397: 48(f64vec3) CompositeConstruct 396 396 396 + 398: 48(f64vec3) ExtInst 1(GLSL.std.450) 46(FMix) 394 395 397 + 399: 48(f64vec3) Load 50(dvec3v) + 400: 48(f64vec3) FAdd 399 398 + Store 50(dvec3v) 400 + 401: 53(f64vec4) Load 55(dvec4v) + 402: 53(f64vec4) Load 55(dvec4v) + 403:39(float64_t) Load 41(doublev) + 404: 53(f64vec4) CompositeConstruct 403 403 403 403 + 405: 53(f64vec4) ExtInst 1(GLSL.std.450) 46(FMix) 401 402 404 + 406: 53(f64vec4) Load 55(dvec4v) + 407: 53(f64vec4) FAdd 406 405 + Store 55(dvec4v) 407 + 408: 43(f64vec2) Load 45(dvec2v) + 409: 43(f64vec2) Load 45(dvec2v) + 410: 43(f64vec2) Load 45(dvec2v) + 411: 43(f64vec2) ExtInst 1(GLSL.std.450) 46(FMix) 408 409 410 + 412: 43(f64vec2) Load 45(dvec2v) + 413: 43(f64vec2) FAdd 412 411 + Store 45(dvec2v) 413 + 414: 48(f64vec3) Load 50(dvec3v) + 415: 48(f64vec3) Load 50(dvec3v) + 416: 48(f64vec3) Load 50(dvec3v) + 417: 48(f64vec3) ExtInst 1(GLSL.std.450) 46(FMix) 414 415 416 + 418: 48(f64vec3) Load 50(dvec3v) + 419: 48(f64vec3) FAdd 418 417 + Store 50(dvec3v) 419 + 420: 53(f64vec4) Load 55(dvec4v) + 421: 53(f64vec4) Load 55(dvec4v) + 422: 53(f64vec4) Load 55(dvec4v) + 423: 53(f64vec4) ExtInst 1(GLSL.std.450) 46(FMix) 420 421 422 + 424: 53(f64vec4) Load 55(dvec4v) + 425: 53(f64vec4) FAdd 424 423 + Store 55(dvec4v) 425 + 426:39(float64_t) Load 41(doublev) + 427:39(float64_t) Load 41(doublev) + 431: 428(bool) Load 430(boolv) + 432:39(float64_t) Select 431 427 426 + 433:39(float64_t) Load 41(doublev) + 434:39(float64_t) FAdd 433 432 + Store 41(doublev) 434 + 435: 43(f64vec2) Load 45(dvec2v) + 436: 43(f64vec2) Load 45(dvec2v) + 440: 437(bvec2) Load 439(bvec2v) + 441: 43(f64vec2) Select 440 436 435 + 442: 43(f64vec2) Load 45(dvec2v) + 443: 43(f64vec2) FAdd 442 441 + Store 45(dvec2v) 443 + 444: 48(f64vec3) Load 50(dvec3v) + 445: 48(f64vec3) Load 50(dvec3v) + 449: 446(bvec3) Load 448(bvec3v) + 450: 48(f64vec3) Select 449 445 444 + 451: 48(f64vec3) Load 50(dvec3v) + 452: 48(f64vec3) FAdd 451 450 + Store 50(dvec3v) 452 + 453: 53(f64vec4) Load 55(dvec4v) + 454: 53(f64vec4) Load 55(dvec4v) + 458: 455(bvec4) Load 457(bvec4v) + 459: 53(f64vec4) Select 458 454 453 + 460: 53(f64vec4) Load 55(dvec4v) + 461: 53(f64vec4) FAdd 460 459 + Store 55(dvec4v) 461 + 462:39(float64_t) Load 41(doublev) + 463:39(float64_t) Load 41(doublev) + 464:39(float64_t) ExtInst 1(GLSL.std.450) 48(Step) 462 463 + 465:39(float64_t) Load 41(doublev) + 466:39(float64_t) FAdd 465 464 + Store 41(doublev) 466 + 467: 43(f64vec2) Load 45(dvec2v) + 468: 43(f64vec2) Load 45(dvec2v) + 469: 43(f64vec2) ExtInst 1(GLSL.std.450) 48(Step) 467 468 + 470: 43(f64vec2) Load 45(dvec2v) + 471: 43(f64vec2) FAdd 470 469 + Store 45(dvec2v) 471 + 472: 48(f64vec3) Load 50(dvec3v) + 473: 48(f64vec3) Load 50(dvec3v) + 474: 48(f64vec3) ExtInst 1(GLSL.std.450) 48(Step) 472 473 + 475: 48(f64vec3) Load 50(dvec3v) + 476: 48(f64vec3) FAdd 475 474 + Store 50(dvec3v) 476 + 477: 53(f64vec4) Load 55(dvec4v) + 478: 53(f64vec4) Load 55(dvec4v) + 479: 53(f64vec4) ExtInst 1(GLSL.std.450) 48(Step) 477 478 + 480: 53(f64vec4) Load 55(dvec4v) + 481: 53(f64vec4) FAdd 480 479 + Store 55(dvec4v) 481 + 482:39(float64_t) Load 41(doublev) + 483: 43(f64vec2) Load 45(dvec2v) + 484: 43(f64vec2) CompositeConstruct 482 482 + 485: 43(f64vec2) ExtInst 1(GLSL.std.450) 48(Step) 484 483 + 486: 43(f64vec2) Load 45(dvec2v) + 487: 43(f64vec2) FAdd 486 485 + Store 45(dvec2v) 487 + 488:39(float64_t) Load 41(doublev) + 489: 48(f64vec3) Load 50(dvec3v) + 490: 48(f64vec3) CompositeConstruct 488 488 488 + 491: 48(f64vec3) ExtInst 1(GLSL.std.450) 48(Step) 490 489 + 492: 48(f64vec3) Load 50(dvec3v) + 493: 48(f64vec3) FAdd 492 491 + Store 50(dvec3v) 493 + 494:39(float64_t) Load 41(doublev) + 495: 53(f64vec4) Load 55(dvec4v) + 496: 53(f64vec4) CompositeConstruct 494 494 494 494 + 497: 53(f64vec4) ExtInst 1(GLSL.std.450) 48(Step) 496 495 + 498: 53(f64vec4) Load 55(dvec4v) + 499: 53(f64vec4) FAdd 498 497 + Store 55(dvec4v) 499 + 500:39(float64_t) Load 41(doublev) + 501:39(float64_t) Load 41(doublev) + 502:39(float64_t) Load 41(doublev) + 503:39(float64_t) ExtInst 1(GLSL.std.450) 49(SmoothStep) 500 501 502 + 504:39(float64_t) Load 41(doublev) + 505:39(float64_t) FAdd 504 503 + Store 41(doublev) 505 + 506: 43(f64vec2) Load 45(dvec2v) + 507: 43(f64vec2) Load 45(dvec2v) + 508: 43(f64vec2) Load 45(dvec2v) + 509: 43(f64vec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 506 507 508 + 510: 43(f64vec2) Load 45(dvec2v) + 511: 43(f64vec2) FAdd 510 509 + Store 45(dvec2v) 511 + 512: 48(f64vec3) Load 50(dvec3v) + 513: 48(f64vec3) Load 50(dvec3v) + 514: 48(f64vec3) Load 50(dvec3v) + 515: 48(f64vec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 512 513 514 + 516: 48(f64vec3) Load 50(dvec3v) + 517: 48(f64vec3) FAdd 516 515 + Store 50(dvec3v) 517 + 518: 53(f64vec4) Load 55(dvec4v) + 519: 53(f64vec4) Load 55(dvec4v) + 520: 53(f64vec4) Load 55(dvec4v) + 521: 53(f64vec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 518 519 520 + 522: 53(f64vec4) Load 55(dvec4v) + 523: 53(f64vec4) FAdd 522 521 + Store 55(dvec4v) 523 + 524:39(float64_t) Load 41(doublev) + 525:39(float64_t) Load 41(doublev) + 526: 43(f64vec2) Load 45(dvec2v) + 527: 43(f64vec2) CompositeConstruct 524 524 + 528: 43(f64vec2) CompositeConstruct 525 525 + 529: 43(f64vec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 527 528 526 + 530: 43(f64vec2) Load 45(dvec2v) + 531: 43(f64vec2) FAdd 530 529 + Store 45(dvec2v) 531 + 532:39(float64_t) Load 41(doublev) + 533:39(float64_t) Load 41(doublev) + 534: 48(f64vec3) Load 50(dvec3v) + 535: 48(f64vec3) CompositeConstruct 532 532 532 + 536: 48(f64vec3) CompositeConstruct 533 533 533 + 537: 48(f64vec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 535 536 534 + 538: 48(f64vec3) Load 50(dvec3v) + 539: 48(f64vec3) FAdd 538 537 + Store 50(dvec3v) 539 + 540:39(float64_t) Load 41(doublev) + 541:39(float64_t) Load 41(doublev) + 542: 53(f64vec4) Load 55(dvec4v) + 543: 53(f64vec4) CompositeConstruct 540 540 540 540 + 544: 53(f64vec4) CompositeConstruct 541 541 541 541 + 545: 53(f64vec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 543 544 542 + 546: 53(f64vec4) Load 55(dvec4v) + 547: 53(f64vec4) FAdd 546 545 + Store 55(dvec4v) 547 + 548:39(float64_t) Load 41(doublev) + 549: 428(bool) IsNan 548 + Store 430(boolv) 549 + 550: 43(f64vec2) Load 45(dvec2v) + 551: 437(bvec2) IsNan 550 + Store 439(bvec2v) 551 + 552: 48(f64vec3) Load 50(dvec3v) + 553: 446(bvec3) IsNan 552 + Store 448(bvec3v) 553 + 554: 53(f64vec4) Load 55(dvec4v) + 555: 455(bvec4) IsNan 554 + Store 457(bvec4v) 555 + 556: 428(bool) Load 430(boolv) + SelectionMerge 559 None + BranchConditional 556 558 562 + 558: Label + 560:39(float64_t) Load 41(doublev) + 561: 428(bool) IsInf 560 + Store 557 561 + Branch 559 + 562: Label + Store 557 563 + Branch 559 + 559: Label + 564: 428(bool) Load 557 + Store 430(boolv) 564 + 565: 428(bool) Load 430(boolv) + SelectionMerge 568 None + BranchConditional 565 567 571 + 567: Label + 569: 43(f64vec2) Load 45(dvec2v) + 570: 437(bvec2) IsInf 569 + Store 566 570 + Branch 568 + 571: Label + Store 566 572 + Branch 568 + 568: Label + 573: 437(bvec2) Load 566 + Store 439(bvec2v) 573 + 574: 428(bool) Load 430(boolv) + SelectionMerge 577 None + BranchConditional 574 576 580 + 576: Label + 578: 48(f64vec3) Load 50(dvec3v) + 579: 446(bvec3) IsInf 578 + Store 575 579 + Branch 577 + 580: Label + Store 575 581 + Branch 577 + 577: Label + 582: 446(bvec3) Load 575 + Store 448(bvec3v) 582 + 583: 428(bool) Load 430(boolv) + SelectionMerge 586 None + BranchConditional 583 585 589 + 585: Label + 587: 53(f64vec4) Load 55(dvec4v) + 588: 455(bvec4) IsInf 587 + Store 584 588 + Branch 586 + 589: Label + Store 584 590 + Branch 586 + 586: Label + 591: 455(bvec4) Load 584 + Store 457(bvec4v) 591 + 592:39(float64_t) Load 41(doublev) + 593:39(float64_t) ExtInst 1(GLSL.std.450) 66(Length) 592 + 594:39(float64_t) Load 41(doublev) + 595:39(float64_t) FAdd 594 593 + Store 41(doublev) 595 + 596: 43(f64vec2) Load 45(dvec2v) + 597:39(float64_t) ExtInst 1(GLSL.std.450) 66(Length) 596 + 598:39(float64_t) Load 41(doublev) + 599:39(float64_t) FAdd 598 597 + Store 41(doublev) 599 + 600: 48(f64vec3) Load 50(dvec3v) + 601:39(float64_t) ExtInst 1(GLSL.std.450) 66(Length) 600 + 602:39(float64_t) Load 41(doublev) + 603:39(float64_t) FAdd 602 601 + Store 41(doublev) 603 + 604: 53(f64vec4) Load 55(dvec4v) + 605:39(float64_t) ExtInst 1(GLSL.std.450) 66(Length) 604 + 606:39(float64_t) Load 41(doublev) + 607:39(float64_t) FAdd 606 605 + Store 41(doublev) 607 + 608:39(float64_t) Load 41(doublev) + 609:39(float64_t) Load 41(doublev) + 610:39(float64_t) ExtInst 1(GLSL.std.450) 67(Distance) 608 609 + 611:39(float64_t) Load 41(doublev) + 612:39(float64_t) FAdd 611 610 + Store 41(doublev) 612 + 613: 43(f64vec2) Load 45(dvec2v) + 614: 43(f64vec2) Load 45(dvec2v) + 615:39(float64_t) ExtInst 1(GLSL.std.450) 67(Distance) 613 614 + 616:39(float64_t) Load 41(doublev) + 617:39(float64_t) FAdd 616 615 + Store 41(doublev) 617 + 618: 48(f64vec3) Load 50(dvec3v) + 619: 48(f64vec3) Load 50(dvec3v) + 620:39(float64_t) ExtInst 1(GLSL.std.450) 67(Distance) 618 619 + 621:39(float64_t) Load 41(doublev) + 622:39(float64_t) FAdd 621 620 + Store 41(doublev) 622 + 623: 53(f64vec4) Load 55(dvec4v) + 624: 53(f64vec4) Load 55(dvec4v) + 625:39(float64_t) ExtInst 1(GLSL.std.450) 67(Distance) 623 624 + 626:39(float64_t) Load 41(doublev) + 627:39(float64_t) FAdd 626 625 + Store 41(doublev) 627 + 628:39(float64_t) Load 41(doublev) + 629:39(float64_t) Load 41(doublev) + 630:39(float64_t) FMul 628 629 + 631:39(float64_t) Load 41(doublev) + 632:39(float64_t) FAdd 631 630 + Store 41(doublev) 632 + 633: 43(f64vec2) Load 45(dvec2v) + 634: 43(f64vec2) Load 45(dvec2v) + 635:39(float64_t) Dot 633 634 + 636:39(float64_t) Load 41(doublev) + 637:39(float64_t) FAdd 636 635 + Store 41(doublev) 637 + 638: 48(f64vec3) Load 50(dvec3v) + 639: 48(f64vec3) Load 50(dvec3v) + 640:39(float64_t) Dot 638 639 + 641:39(float64_t) Load 41(doublev) + 642:39(float64_t) FAdd 641 640 + Store 41(doublev) 642 + 643: 53(f64vec4) Load 55(dvec4v) + 644: 53(f64vec4) Load 55(dvec4v) + 645:39(float64_t) Dot 643 644 + 646:39(float64_t) Load 41(doublev) + 647:39(float64_t) FAdd 646 645 + Store 41(doublev) 647 + 648: 48(f64vec3) Load 50(dvec3v) + 649: 48(f64vec3) Load 50(dvec3v) + 650: 48(f64vec3) ExtInst 1(GLSL.std.450) 68(Cross) 648 649 + 651: 48(f64vec3) Load 50(dvec3v) + 652: 48(f64vec3) FAdd 651 650 + Store 50(dvec3v) 652 + 653:39(float64_t) Load 41(doublev) + 654:39(float64_t) ExtInst 1(GLSL.std.450) 69(Normalize) 653 + 655:39(float64_t) Load 41(doublev) + 656:39(float64_t) FAdd 655 654 + Store 41(doublev) 656 + 657: 43(f64vec2) Load 45(dvec2v) + 658: 43(f64vec2) ExtInst 1(GLSL.std.450) 69(Normalize) 657 + 659: 43(f64vec2) Load 45(dvec2v) + 660: 43(f64vec2) FAdd 659 658 + Store 45(dvec2v) 660 + 661: 48(f64vec3) Load 50(dvec3v) + 662: 48(f64vec3) ExtInst 1(GLSL.std.450) 69(Normalize) 661 + 663: 48(f64vec3) Load 50(dvec3v) + 664: 48(f64vec3) FAdd 663 662 + Store 50(dvec3v) 664 + 665: 53(f64vec4) Load 55(dvec4v) + 666: 53(f64vec4) ExtInst 1(GLSL.std.450) 69(Normalize) 665 + 667: 53(f64vec4) Load 55(dvec4v) + 668: 53(f64vec4) FAdd 667 666 + Store 55(dvec4v) 668 + 669:39(float64_t) Load 41(doublev) + 670:39(float64_t) Load 41(doublev) + 671:39(float64_t) Load 41(doublev) + 672:39(float64_t) ExtInst 1(GLSL.std.450) 70(FaceForward) 669 670 671 + 673:39(float64_t) Load 41(doublev) + 674:39(float64_t) FAdd 673 672 + Store 41(doublev) 674 + 675: 43(f64vec2) Load 45(dvec2v) + 676: 43(f64vec2) Load 45(dvec2v) + 677: 43(f64vec2) Load 45(dvec2v) + 678: 43(f64vec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 675 676 677 + 679: 43(f64vec2) Load 45(dvec2v) + 680: 43(f64vec2) FAdd 679 678 + Store 45(dvec2v) 680 + 681: 48(f64vec3) Load 50(dvec3v) + 682: 48(f64vec3) Load 50(dvec3v) + 683: 48(f64vec3) Load 50(dvec3v) + 684: 48(f64vec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 681 682 683 + 685: 48(f64vec3) Load 50(dvec3v) + 686: 48(f64vec3) FAdd 685 684 + Store 50(dvec3v) 686 + 687: 53(f64vec4) Load 55(dvec4v) + 688: 53(f64vec4) Load 55(dvec4v) + 689: 53(f64vec4) Load 55(dvec4v) + 690: 53(f64vec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 687 688 689 + 691: 53(f64vec4) Load 55(dvec4v) + 692: 53(f64vec4) FAdd 691 690 + Store 55(dvec4v) 692 + 693:39(float64_t) Load 41(doublev) + 694:39(float64_t) Load 41(doublev) + 695:39(float64_t) ExtInst 1(GLSL.std.450) 71(Reflect) 693 694 + 696:39(float64_t) Load 41(doublev) + 697:39(float64_t) FAdd 696 695 + Store 41(doublev) 697 + 698: 43(f64vec2) Load 45(dvec2v) + 699: 43(f64vec2) Load 45(dvec2v) + 700: 43(f64vec2) ExtInst 1(GLSL.std.450) 71(Reflect) 698 699 + 701: 43(f64vec2) Load 45(dvec2v) + 702: 43(f64vec2) FAdd 701 700 + Store 45(dvec2v) 702 + 703: 48(f64vec3) Load 50(dvec3v) + 704: 48(f64vec3) Load 50(dvec3v) + 705: 48(f64vec3) ExtInst 1(GLSL.std.450) 71(Reflect) 703 704 + 706: 48(f64vec3) Load 50(dvec3v) + 707: 48(f64vec3) FAdd 706 705 + Store 50(dvec3v) 707 + 708: 53(f64vec4) Load 55(dvec4v) + 709: 53(f64vec4) Load 55(dvec4v) + 710: 53(f64vec4) ExtInst 1(GLSL.std.450) 71(Reflect) 708 709 + 711: 53(f64vec4) Load 55(dvec4v) + 712: 53(f64vec4) FAdd 711 710 + Store 55(dvec4v) 712 + 713:39(float64_t) Load 41(doublev) + 714:39(float64_t) Load 41(doublev) + 715:39(float64_t) Load 41(doublev) + 716:39(float64_t) ExtInst 1(GLSL.std.450) 72(Refract) 713 714 715 + 717:39(float64_t) Load 41(doublev) + 718:39(float64_t) FAdd 717 716 + Store 41(doublev) 718 + 719: 43(f64vec2) Load 45(dvec2v) + 720: 43(f64vec2) Load 45(dvec2v) + 721:39(float64_t) Load 41(doublev) + 722: 43(f64vec2) ExtInst 1(GLSL.std.450) 72(Refract) 719 720 721 + 723: 43(f64vec2) Load 45(dvec2v) + 724: 43(f64vec2) FAdd 723 722 + Store 45(dvec2v) 724 + 725: 48(f64vec3) Load 50(dvec3v) + 726: 48(f64vec3) Load 50(dvec3v) + 727:39(float64_t) Load 41(doublev) + 728: 48(f64vec3) ExtInst 1(GLSL.std.450) 72(Refract) 725 726 727 + 729: 48(f64vec3) Load 50(dvec3v) + 730: 48(f64vec3) FAdd 729 728 + Store 50(dvec3v) 730 + 731: 53(f64vec4) Load 55(dvec4v) + 732: 53(f64vec4) Load 55(dvec4v) + 733:39(float64_t) Load 41(doublev) + 734: 53(f64vec4) ExtInst 1(GLSL.std.450) 72(Refract) 731 732 733 + 735: 53(f64vec4) Load 55(dvec4v) + 736: 53(f64vec4) FAdd 735 734 + Store 55(dvec4v) 736 + 740: 43(f64vec2) Load 45(dvec2v) + 741: 43(f64vec2) Load 45(dvec2v) + 742: 737 OuterProduct 740 741 + Store 739(dmat2v) 742 + 746: 48(f64vec3) Load 50(dvec3v) + 747: 48(f64vec3) Load 50(dvec3v) + 748: 743 OuterProduct 746 747 + Store 745(dmat3v) 748 + 752: 53(f64vec4) Load 55(dvec4v) + 753: 53(f64vec4) Load 55(dvec4v) + 754: 749 OuterProduct 752 753 + Store 751(dmat4v) 754 + 758: 48(f64vec3) Load 50(dvec3v) + 759: 43(f64vec2) Load 45(dvec2v) + 760: 755 OuterProduct 758 759 + Store 757(dmat2x3v) 760 + 764: 43(f64vec2) Load 45(dvec2v) + 765: 48(f64vec3) Load 50(dvec3v) + 766: 761 OuterProduct 764 765 + Store 763(dmat3x2v) 766 + 770: 53(f64vec4) Load 55(dvec4v) + 771: 43(f64vec2) Load 45(dvec2v) + 772: 767 OuterProduct 770 771 + Store 769(dmat2x4v) 772 + 776: 43(f64vec2) Load 45(dvec2v) + 777: 53(f64vec4) Load 55(dvec4v) + 778: 773 OuterProduct 776 777 + Store 775(dmat4x2v) 778 + 782: 53(f64vec4) Load 55(dvec4v) + 783: 48(f64vec3) Load 50(dvec3v) + 784: 779 OuterProduct 782 783 + Store 781(dmat3x4v) 784 + 788: 48(f64vec3) Load 50(dvec3v) + 789: 53(f64vec4) Load 55(dvec4v) + 790: 785 OuterProduct 788 789 + Store 787(dmat4x3v) 790 + 791: 737 Load 739(dmat2v) + 792: 737 Load 739(dmat2v) + 793: 43(f64vec2) CompositeExtract 791 0 + 794: 43(f64vec2) CompositeExtract 792 0 + 795: 43(f64vec2) FMul 793 794 + 796: 43(f64vec2) CompositeExtract 791 1 + 797: 43(f64vec2) CompositeExtract 792 1 + 798: 43(f64vec2) FMul 796 797 + 799: 737 CompositeConstruct 795 798 + 800: 737 Load 739(dmat2v) + 801: 737 MatrixTimesMatrix 800 799 + Store 739(dmat2v) 801 + 802: 743 Load 745(dmat3v) + 803: 743 Load 745(dmat3v) + 804: 48(f64vec3) CompositeExtract 802 0 + 805: 48(f64vec3) CompositeExtract 803 0 + 806: 48(f64vec3) FMul 804 805 + 807: 48(f64vec3) CompositeExtract 802 1 + 808: 48(f64vec3) CompositeExtract 803 1 + 809: 48(f64vec3) FMul 807 808 + 810: 48(f64vec3) CompositeExtract 802 2 + 811: 48(f64vec3) CompositeExtract 803 2 + 812: 48(f64vec3) FMul 810 811 + 813: 743 CompositeConstruct 806 809 812 + 814: 743 Load 745(dmat3v) + 815: 743 MatrixTimesMatrix 814 813 + Store 745(dmat3v) 815 + 816: 749 Load 751(dmat4v) + 817: 749 Load 751(dmat4v) + 818: 53(f64vec4) CompositeExtract 816 0 + 819: 53(f64vec4) CompositeExtract 817 0 + 820: 53(f64vec4) FMul 818 819 + 821: 53(f64vec4) CompositeExtract 816 1 + 822: 53(f64vec4) CompositeExtract 817 1 + 823: 53(f64vec4) FMul 821 822 + 824: 53(f64vec4) CompositeExtract 816 2 + 825: 53(f64vec4) CompositeExtract 817 2 + 826: 53(f64vec4) FMul 824 825 + 827: 53(f64vec4) CompositeExtract 816 3 + 828: 53(f64vec4) CompositeExtract 817 3 + 829: 53(f64vec4) FMul 827 828 + 830: 749 CompositeConstruct 820 823 826 829 + 831: 749 Load 751(dmat4v) + 832: 749 MatrixTimesMatrix 831 830 + Store 751(dmat4v) 832 + 833: 755 Load 757(dmat2x3v) + 834: 755 Load 757(dmat2x3v) + 835: 48(f64vec3) CompositeExtract 833 0 + 836: 48(f64vec3) CompositeExtract 834 0 + 837: 48(f64vec3) FMul 835 836 + 838: 48(f64vec3) CompositeExtract 833 1 + 839: 48(f64vec3) CompositeExtract 834 1 + 840: 48(f64vec3) FMul 838 839 + 841: 755 CompositeConstruct 837 840 + Store 757(dmat2x3v) 841 + 842: 767 Load 769(dmat2x4v) + 843: 767 Load 769(dmat2x4v) + 844: 53(f64vec4) CompositeExtract 842 0 + 845: 53(f64vec4) CompositeExtract 843 0 + 846: 53(f64vec4) FMul 844 845 + 847: 53(f64vec4) CompositeExtract 842 1 + 848: 53(f64vec4) CompositeExtract 843 1 + 849: 53(f64vec4) FMul 847 848 + 850: 767 CompositeConstruct 846 849 + Store 769(dmat2x4v) 850 + 851: 761 Load 763(dmat3x2v) + 852: 761 Load 763(dmat3x2v) + 853: 43(f64vec2) CompositeExtract 851 0 + 854: 43(f64vec2) CompositeExtract 852 0 + 855: 43(f64vec2) FMul 853 854 + 856: 43(f64vec2) CompositeExtract 851 1 + 857: 43(f64vec2) CompositeExtract 852 1 + 858: 43(f64vec2) FMul 856 857 + 859: 43(f64vec2) CompositeExtract 851 2 + 860: 43(f64vec2) CompositeExtract 852 2 + 861: 43(f64vec2) FMul 859 860 + 862: 761 CompositeConstruct 855 858 861 + Store 763(dmat3x2v) 862 + 863: 779 Load 781(dmat3x4v) + 864: 779 Load 781(dmat3x4v) + 865: 53(f64vec4) CompositeExtract 863 0 + 866: 53(f64vec4) CompositeExtract 864 0 + 867: 53(f64vec4) FMul 865 866 + 868: 53(f64vec4) CompositeExtract 863 1 + 869: 53(f64vec4) CompositeExtract 864 1 + 870: 53(f64vec4) FMul 868 869 + 871: 53(f64vec4) CompositeExtract 863 2 + 872: 53(f64vec4) CompositeExtract 864 2 + 873: 53(f64vec4) FMul 871 872 + 874: 779 CompositeConstruct 867 870 873 + Store 781(dmat3x4v) 874 + 875: 773 Load 775(dmat4x2v) + 876: 773 Load 775(dmat4x2v) + 877: 43(f64vec2) CompositeExtract 875 0 + 878: 43(f64vec2) CompositeExtract 876 0 + 879: 43(f64vec2) FMul 877 878 + 880: 43(f64vec2) CompositeExtract 875 1 + 881: 43(f64vec2) CompositeExtract 876 1 + 882: 43(f64vec2) FMul 880 881 + 883: 43(f64vec2) CompositeExtract 875 2 + 884: 43(f64vec2) CompositeExtract 876 2 + 885: 43(f64vec2) FMul 883 884 + 886: 43(f64vec2) CompositeExtract 875 3 + 887: 43(f64vec2) CompositeExtract 876 3 + 888: 43(f64vec2) FMul 886 887 + 889: 773 CompositeConstruct 879 882 885 888 + Store 775(dmat4x2v) 889 + 890: 785 Load 787(dmat4x3v) + 891: 785 Load 787(dmat4x3v) + 892: 48(f64vec3) CompositeExtract 890 0 + 893: 48(f64vec3) CompositeExtract 891 0 + 894: 48(f64vec3) FMul 892 893 + 895: 48(f64vec3) CompositeExtract 890 1 + 896: 48(f64vec3) CompositeExtract 891 1 + 897: 48(f64vec3) FMul 895 896 + 898: 48(f64vec3) CompositeExtract 890 2 + 899: 48(f64vec3) CompositeExtract 891 2 + 900: 48(f64vec3) FMul 898 899 + 901: 48(f64vec3) CompositeExtract 890 3 + 902: 48(f64vec3) CompositeExtract 891 3 + 903: 48(f64vec3) FMul 901 902 + 904: 785 CompositeConstruct 894 897 900 903 + Store 787(dmat4x3v) 904 + 905: 737 Load 739(dmat2v) + 906: 737 Transpose 905 + 907: 737 Load 739(dmat2v) + 908: 737 MatrixTimesMatrix 907 906 + Store 739(dmat2v) 908 + 909: 743 Load 745(dmat3v) + 910: 743 Transpose 909 + 911: 743 Load 745(dmat3v) + 912: 743 MatrixTimesMatrix 911 910 + Store 745(dmat3v) 912 + 913: 749 Load 751(dmat4v) + 914: 749 Transpose 913 + 915: 749 Load 751(dmat4v) + 916: 749 MatrixTimesMatrix 915 914 + Store 751(dmat4v) 916 + 917: 761 Load 763(dmat3x2v) + 918: 755 Transpose 917 + Store 757(dmat2x3v) 918 + 919: 755 Load 757(dmat2x3v) + 920: 761 Transpose 919 + Store 763(dmat3x2v) 920 + 921: 773 Load 775(dmat4x2v) + 922: 767 Transpose 921 + Store 769(dmat2x4v) 922 + 923: 767 Load 769(dmat2x4v) + 924: 773 Transpose 923 + Store 775(dmat4x2v) 924 + 925: 785 Load 787(dmat4x3v) + 926: 779 Transpose 925 + Store 781(dmat3x4v) 926 + 927: 779 Load 781(dmat3x4v) + 928: 785 Transpose 927 + Store 787(dmat4x3v) 928 + 929: 737 Load 739(dmat2v) + 930:39(float64_t) ExtInst 1(GLSL.std.450) 33(Determinant) 929 + 931:39(float64_t) Load 41(doublev) + 932:39(float64_t) FAdd 931 930 + Store 41(doublev) 932 + 933: 743 Load 745(dmat3v) + 934:39(float64_t) ExtInst 1(GLSL.std.450) 33(Determinant) 933 + 935:39(float64_t) Load 41(doublev) + 936:39(float64_t) FAdd 935 934 + Store 41(doublev) 936 + 937: 749 Load 751(dmat4v) + 938:39(float64_t) ExtInst 1(GLSL.std.450) 33(Determinant) 937 + 939:39(float64_t) Load 41(doublev) + 940:39(float64_t) FAdd 939 938 + Store 41(doublev) 940 + 941: 737 Load 739(dmat2v) + 942: 737 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 941 + 943: 737 Load 739(dmat2v) + 944: 737 MatrixTimesMatrix 943 942 + Store 739(dmat2v) 944 + 945: 743 Load 745(dmat3v) + 946: 743 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 945 + 947: 743 Load 745(dmat3v) + 948: 743 MatrixTimesMatrix 947 946 + Store 745(dmat3v) 948 + 949: 749 Load 751(dmat4v) + 950: 749 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 949 + 951: 749 Load 751(dmat4v) + 952: 749 MatrixTimesMatrix 951 950 + Store 751(dmat4v) 952 + 953:39(float64_t) Load 41(doublev) + 955: 40(ptr) AccessChain 45(dvec2v) 954 + 956:39(float64_t) Load 955 + 957:39(float64_t) FAdd 953 956 + 959: 40(ptr) AccessChain 50(dvec3v) 958 + 960:39(float64_t) Load 959 + 961:39(float64_t) FAdd 957 960 + 963: 40(ptr) AccessChain 55(dvec4v) 962 + 964:39(float64_t) Load 963 + 965:39(float64_t) FAdd 961 964 + 967: 40(ptr) AccessChain 739(dmat2v) 966 954 + 968:39(float64_t) Load 967 + 969:39(float64_t) FAdd 965 968 + 971: 40(ptr) AccessChain 745(dmat3v) 970 958 + 972:39(float64_t) Load 971 + 973:39(float64_t) FAdd 969 972 + 974: 40(ptr) AccessChain 751(dmat4v) 25 962 + 975:39(float64_t) Load 974 + 976:39(float64_t) FAdd 973 975 + 977: 40(ptr) AccessChain 757(dmat2x3v) 966 954 + 978:39(float64_t) Load 977 + 979:39(float64_t) FAdd 976 978 + 980: 40(ptr) AccessChain 763(dmat3x2v) 966 954 + 981:39(float64_t) Load 980 + 982:39(float64_t) FAdd 979 981 + 983: 40(ptr) AccessChain 781(dmat3x4v) 970 958 + 984:39(float64_t) Load 983 + 985:39(float64_t) FAdd 982 984 + 986: 40(ptr) AccessChain 787(dmat4x3v) 970 958 + 987:39(float64_t) Load 986 + 988:39(float64_t) FAdd 985 987 + 989: 40(ptr) AccessChain 769(dmat2x4v) 966 954 + 990:39(float64_t) Load 989 + 991:39(float64_t) FAdd 988 990 + 992: 40(ptr) AccessChain 775(dmat4x2v) 966 954 + 993:39(float64_t) Load 992 + 994:39(float64_t) FAdd 991 993 + 995: 428(bool) Load 430(boolv) + 997: 10(float) Select 995 996 21 + 998:39(float64_t) FConvert 997 + 999:39(float64_t) FAdd 994 998 + 1000: 429(ptr) AccessChain 439(bvec2v) 33 + 1001: 428(bool) Load 1000 + 1002: 10(float) Select 1001 996 21 + 1003:39(float64_t) FConvert 1002 + 1004:39(float64_t) FAdd 999 1003 + 1005: 429(ptr) AccessChain 448(bvec3v) 33 + 1006: 428(bool) Load 1005 + 1007: 10(float) Select 1006 996 21 + 1008:39(float64_t) FConvert 1007 + 1009:39(float64_t) FAdd 1004 1008 + 1010: 429(ptr) AccessChain 457(bvec4v) 33 + 1011: 428(bool) Load 1010 + 1012: 10(float) Select 1011 996 21 + 1013:39(float64_t) FConvert 1012 + 1014:39(float64_t) FAdd 1009 1013 + 1015: 10(float) FConvert 1014 + 1016: 11(fvec4) Load 13(outp) + 1017: 11(fvec4) VectorTimesScalar 1016 1015 + Store 13(outp) 1017 + Return + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/spv.functionParameterTypes.frag.out b/3rdparty/glslang/Test/baseResults/spv.functionParameterTypes.frag.out new file mode 100644 index 000000000..24e780e21 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/spv.functionParameterTypes.frag.out @@ -0,0 +1,62 @@ +spv.functionParameterTypes.frag +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 34 + + Capability Shader + Capability Float16 + Capability Int64 + Capability Int16 + Capability Int8 + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source GLSL 460 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" + Name 4 "main" + Name 29 "f(i81;u81;i161;u161;i641;u641;f161;" + Name 22 "i8" + Name 23 "u8" + Name 24 "i16" + Name 25 "u16" + Name 26 "i64" + Name 27 "u64" + Name 28 "f16" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 8 1 + 7: TypePointer Function 6(int8_t) + 8: TypeInt 8 0 + 9: TypePointer Function 8(int8_t) + 10: TypeInt 16 1 + 11: TypePointer Function 10(int16_t) + 12: TypeInt 16 0 + 13: TypePointer Function 12(int16_t) + 14: TypeInt 64 1 + 15: TypePointer Function 14(int64_t) + 16: TypeInt 64 0 + 17: TypePointer Function 16(int64_t) + 18: TypeFloat 16 + 19: TypePointer Function 18(float16_t) + 20: TypeInt 32 1 + 21: TypeFunction 20(int) 7(ptr) 9(ptr) 11(ptr) 13(ptr) 15(ptr) 17(ptr) 19(ptr) + 31: 20(int) Constant 0 + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd +29(f(i81;u81;i161;u161;i641;u641;f161;): 20(int) Function None 21 + 22(i8): 7(ptr) FunctionParameter + 23(u8): 9(ptr) FunctionParameter + 24(i16): 11(ptr) FunctionParameter + 25(u16): 13(ptr) FunctionParameter + 26(i64): 15(ptr) FunctionParameter + 27(u64): 17(ptr) FunctionParameter + 28(f16): 19(ptr) FunctionParameter + 30: Label + ReturnValue 31 + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics.comp.out b/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics.comp.out index 9361e76e2..8c4e5763f 100644 --- a/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics.comp.out +++ b/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics.comp.out @@ -1,7 +1,7 @@ spv.memoryScopeSemantics.comp // Module Version 10300 // Generated by (magic number): 80007 -// Id's are bound by 148 +// Id's are bound by 163 Capability Shader Capability Int64 @@ -23,59 +23,66 @@ spv.memoryScopeSemantics.comp Name 23 "atomu" Name 24 "value" Name 36 "imagei" - Name 45 "imageu" - Name 65 "BufferU" - MemberName 65(BufferU) 0 "x" - Name 67 "bufferu" - Name 72 "y" - Name 77 "BufferI" - MemberName 77(BufferI) 0 "x" - Name 79 "bufferi" - Name 83 "A" - MemberName 83(A) 0 "x" - Name 84 "BufferJ" - MemberName 84(BufferJ) 0 "a" - Name 87 "bufferj" - Name 98 "BufferK" - MemberName 98(BufferK) 0 "x" - Name 100 "bufferk" - Name 110 "imagej" - Name 122 "samp" - Name 133 "atomu64" - Name 138 "atomi64" - Name 143 "BufferL" - MemberName 143(BufferL) 0 "x" - Name 145 "bufferl" + Name 46 "imageu" + Name 66 "BufferU" + MemberName 66(BufferU) 0 "x" + Name 68 "bufferu" + Name 73 "y" + Name 78 "BufferI" + MemberName 78(BufferI) 0 "x" + Name 80 "bufferi" + Name 84 "A" + MemberName 84(A) 0 "x" + Name 85 "BufferJ" + MemberName 85(BufferJ) 0 "a" + Name 88 "bufferj" + Name 99 "BufferK" + MemberName 99(BufferK) 0 "x" + Name 101 "bufferk" + Name 111 "imagej" + Name 123 "samp" + Name 134 "atomu64" + Name 139 "atomi64" + Name 144 "BufferL" + MemberName 144(BufferL) 0 "x" + Name 146 "bufferl" + Name 151 "BufferM" + MemberName 151(BufferM) 0 "x" + Name 153 "bufferm" Decorate 36(imagei) DescriptorSet 0 Decorate 36(imagei) Binding 1 - Decorate 45(imageu) DescriptorSet 0 - Decorate 45(imageu) Binding 0 - MemberDecorate 65(BufferU) 0 Offset 0 - Decorate 65(BufferU) Block - Decorate 67(bufferu) DescriptorSet 0 - Decorate 67(bufferu) Binding 2 - MemberDecorate 77(BufferI) 0 Offset 0 - Decorate 77(BufferI) Block - Decorate 79(bufferi) DescriptorSet 0 - Decorate 79(bufferi) Binding 3 - Decorate 82 ArrayStride 4 - MemberDecorate 83(A) 0 Offset 0 - MemberDecorate 84(BufferJ) 0 Offset 0 - Decorate 84(BufferJ) Block - Decorate 87(bufferj) DescriptorSet 0 - Decorate 87(bufferj) Binding 4 - MemberDecorate 98(BufferK) 0 Offset 0 - Decorate 98(BufferK) Block - Decorate 100(bufferk) DescriptorSet 0 - Decorate 100(bufferk) Binding 7 - Decorate 110(imagej) DescriptorSet 0 - Decorate 110(imagej) Binding 5 - Decorate 122(samp) DescriptorSet 0 - Decorate 122(samp) Binding 6 - MemberDecorate 143(BufferL) 0 Offset 0 - Decorate 143(BufferL) Block - Decorate 145(bufferl) DescriptorSet 0 - Decorate 145(bufferl) Binding 8 + Decorate 46(imageu) DescriptorSet 0 + Decorate 46(imageu) Binding 0 + MemberDecorate 66(BufferU) 0 Offset 0 + Decorate 66(BufferU) Block + Decorate 68(bufferu) DescriptorSet 0 + Decorate 68(bufferu) Binding 2 + MemberDecorate 78(BufferI) 0 Offset 0 + Decorate 78(BufferI) Block + Decorate 80(bufferi) DescriptorSet 0 + Decorate 80(bufferi) Binding 3 + Decorate 83 ArrayStride 4 + MemberDecorate 84(A) 0 Offset 0 + MemberDecorate 85(BufferJ) 0 Offset 0 + Decorate 85(BufferJ) Block + Decorate 88(bufferj) DescriptorSet 0 + Decorate 88(bufferj) Binding 4 + MemberDecorate 99(BufferK) 0 Offset 0 + Decorate 99(BufferK) Block + Decorate 101(bufferk) DescriptorSet 0 + Decorate 101(bufferk) Binding 7 + Decorate 111(imagej) DescriptorSet 0 + Decorate 111(imagej) Binding 5 + Decorate 123(samp) DescriptorSet 0 + Decorate 123(samp) Binding 6 + MemberDecorate 144(BufferL) 0 Offset 0 + Decorate 144(BufferL) Block + Decorate 146(bufferl) DescriptorSet 0 + Decorate 146(bufferl) Binding 8 + MemberDecorate 151(BufferM) 0 Offset 0 + Decorate 151(BufferM) Block + Decorate 153(bufferm) DescriptorSet 0 + Decorate 153(bufferm) Binding 9 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -106,67 +113,72 @@ spv.memoryScopeSemantics.comp 38: 6(int) Constant 0 39: 37(ivec2) ConstantComposite 38 38 40: TypePointer Image 6(int) - 43: TypeImage 15(int) 2D nonsampled format:R32ui - 44: TypePointer UniformConstant 43 - 45(imageu): 44(ptr) Variable UniformConstant - 46: 15(int) Constant 3 - 47: TypePointer Image 15(int) - 50: 15(int) Constant 4 - 52: 15(int) Constant 7 - 57: 6(int) Constant 7 - 61: 15(int) Constant 10 - 63: 15(int) Constant 322 - 65(BufferU): TypeStruct 15(int) - 66: TypePointer StorageBuffer 65(BufferU) - 67(bufferu): 66(ptr) Variable StorageBuffer - 68: TypePointer StorageBuffer 15(int) - 70: 15(int) Constant 1 - 77(BufferI): TypeStruct 15(int) - 78: TypePointer StorageBuffer 77(BufferI) - 79(bufferi): 78(ptr) Variable StorageBuffer - 82: TypeArray 15(int) 26 - 83(A): TypeStruct 82 - 84(BufferJ): TypeStruct 83(A) - 85: TypeArray 84(BufferJ) 26 - 86: TypePointer StorageBuffer 85 - 87(bufferj): 86(ptr) Variable StorageBuffer - 94: TypePointer StorageBuffer 83(A) - 98(BufferK): TypeStruct 15(int) - 99: TypePointer Uniform 98(BufferK) - 100(bufferk): 99(ptr) Variable Uniform - 101: TypePointer Uniform 15(int) - 106: TypeVector 6(int) 4 - 108: TypeArray 34 26 - 109: TypePointer UniformConstant 108 - 110(imagej): 109(ptr) Variable UniformConstant - 116: 106(ivec4) ConstantComposite 38 38 38 38 - 117: TypeFloat 32 - 118: TypeImage 117(float) 2D sampled format:Unknown - 119: TypeSampledImage 118 - 120: TypeArray 119 26 - 121: TypePointer UniformConstant 120 - 122(samp): 121(ptr) Variable UniformConstant - 123: TypePointer UniformConstant 119 - 126: TypeVector 117(float) 2 - 127: 117(float) Constant 0 - 128: 126(fvec2) ConstantComposite 127 127 - 129: TypeVector 117(float) 4 - 131: TypeInt 64 0 - 132: TypePointer Workgroup 131(int64_t) - 133(atomu64): 132(ptr) Variable Workgroup - 134:131(int64_t) Constant 7 0 - 136: TypeInt 64 1 - 137: TypePointer Workgroup 136(int64_t) - 138(atomi64): 137(ptr) Variable Workgroup - 139:136(int64_t) Constant 10 0 - 143(BufferL): TypeStruct 15(int) - 144: TypePointer StorageBuffer 143(BufferL) - 145(bufferl): 144(ptr) Variable StorageBuffer + 42: 15(int) Constant 32768 + 44: TypeImage 15(int) 2D nonsampled format:R32ui + 45: TypePointer UniformConstant 44 + 46(imageu): 45(ptr) Variable UniformConstant + 47: 15(int) Constant 3 + 48: TypePointer Image 15(int) + 51: 15(int) Constant 4 + 53: 15(int) Constant 7 + 58: 6(int) Constant 7 + 62: 15(int) Constant 10 + 64: 15(int) Constant 322 + 66(BufferU): TypeStruct 15(int) + 67: TypePointer StorageBuffer 66(BufferU) + 68(bufferu): 67(ptr) Variable StorageBuffer + 69: TypePointer StorageBuffer 15(int) + 71: 15(int) Constant 1 + 78(BufferI): TypeStruct 15(int) + 79: TypePointer StorageBuffer 78(BufferI) + 80(bufferi): 79(ptr) Variable StorageBuffer + 83: TypeArray 15(int) 26 + 84(A): TypeStruct 83 + 85(BufferJ): TypeStruct 84(A) + 86: TypeArray 85(BufferJ) 26 + 87: TypePointer StorageBuffer 86 + 88(bufferj): 87(ptr) Variable StorageBuffer + 95: TypePointer StorageBuffer 84(A) + 99(BufferK): TypeStruct 15(int) + 100: TypePointer Uniform 99(BufferK) + 101(bufferk): 100(ptr) Variable Uniform + 102: TypePointer Uniform 15(int) + 107: TypeVector 6(int) 4 + 109: TypeArray 34 26 + 110: TypePointer UniformConstant 109 + 111(imagej): 110(ptr) Variable UniformConstant + 117: 107(ivec4) ConstantComposite 38 38 38 38 + 118: TypeFloat 32 + 119: TypeImage 118(float) 2D sampled format:Unknown + 120: TypeSampledImage 119 + 121: TypeArray 120 26 + 122: TypePointer UniformConstant 121 + 123(samp): 122(ptr) Variable UniformConstant + 124: TypePointer UniformConstant 120 + 127: TypeVector 118(float) 2 + 128: 118(float) Constant 0 + 129: 127(fvec2) ConstantComposite 128 128 + 130: TypeVector 118(float) 4 + 132: TypeInt 64 0 + 133: TypePointer Workgroup 132(int64_t) + 134(atomu64): 133(ptr) Variable Workgroup + 135:132(int64_t) Constant 7 0 + 137: TypeInt 64 1 + 138: TypePointer Workgroup 137(int64_t) + 139(atomi64): 138(ptr) Variable Workgroup + 140:137(int64_t) Constant 10 0 + 144(BufferL): TypeStruct 15(int) + 145: TypePointer StorageBuffer 144(BufferL) + 146(bufferl): 145(ptr) Variable StorageBuffer + 151(BufferM): TypeStruct 15(int) + 152: TypePointer StorageBuffer 151(BufferM) + 153(bufferm): 152(ptr) Variable StorageBuffer + 161: 6(int) Constant 32768 4(main): 2 Function None 3 5: Label 8(origi): 7(ptr) Variable Function 21(origu): 20(ptr) Variable Function - 72(y): 20(ptr) Variable Function + 73(y): 20(ptr) Variable Function 19: 6(int) AtomicIAdd 10(atomi) 12 18 11 Store 8(origi) 19 25: 15(int) Load 24(value) MakePointerVisibleKHR NonPrivatePointerKHR 26 @@ -177,77 +189,87 @@ spv.memoryScopeSemantics.comp 32: 15(int) Load 24(value) MakePointerVisibleKHR NonPrivatePointerKHR 26 AtomicStore 23(atomu) 12 33 32 41: 40(ptr) ImageTexelPointer 36(imagei) 39 17 - 42: 6(int) AtomicLoad 41 12 30 - Store 8(origi) 42 - 48: 47(ptr) ImageTexelPointer 45(imageu) 39 17 - 49: 15(int) AtomicIAdd 48 12 30 46 - Store 21(origu) 49 - 51: 47(ptr) ImageTexelPointer 45(imageu) 39 17 - AtomicStore 51 12 33 50 - 53: 15(int) AtomicOr 23(atomu) 12 17 52 - Store 21(origu) 53 - 54: 15(int) AtomicXor 23(atomu) 12 17 52 + 43: 6(int) AtomicLoad 41 12 30 + Store 8(origi) 43 + 49: 48(ptr) ImageTexelPointer 46(imageu) 39 17 + 50: 15(int) AtomicIAdd 49 12 30 47 + Store 21(origu) 50 + 52: 48(ptr) ImageTexelPointer 46(imageu) 39 17 + AtomicStore 52 12 33 51 + 54: 15(int) AtomicOr 23(atomu) 12 17 53 Store 21(origu) 54 - 55: 15(int) Load 24(value) MakePointerVisibleKHR NonPrivatePointerKHR 26 - 56: 15(int) AtomicUMin 23(atomu) 12 17 55 - Store 21(origu) 56 - 58: 6(int) AtomicSMax 10(atomi) 12 17 57 - Store 8(origi) 58 - 59: 6(int) Load 8(origi) - 60: 6(int) AtomicExchange 10(atomi) 12 17 59 - Store 8(origi) 60 - 62: 15(int) Load 24(value) MakePointerVisibleKHR NonPrivatePointerKHR 26 - 64: 15(int) AtomicCompareExchange 23(atomu) 12 63 63 62 61 - Store 21(origu) 64 - 69: 68(ptr) AccessChain 67(bufferu) 38 - 71: 15(int) AtomicIAdd 69 12 18 70 + 55: 15(int) AtomicXor 23(atomu) 12 17 53 + Store 21(origu) 55 + 56: 15(int) Load 24(value) MakePointerVisibleKHR NonPrivatePointerKHR 26 + 57: 15(int) AtomicUMin 23(atomu) 12 17 56 + Store 21(origu) 57 + 59: 6(int) AtomicSMax 10(atomi) 12 17 58 + Store 8(origi) 59 + 60: 6(int) Load 8(origi) + 61: 6(int) AtomicExchange 10(atomi) 12 17 60 + Store 8(origi) 61 + 63: 15(int) Load 24(value) MakePointerVisibleKHR NonPrivatePointerKHR 26 + 65: 15(int) AtomicCompareExchange 23(atomu) 12 64 64 63 62 + Store 21(origu) 65 + 70: 69(ptr) AccessChain 68(bufferu) 38 + 72: 15(int) AtomicIAdd 70 12 18 71 MemoryBarrier 26 18 - ControlBarrier 26 26 63 + ControlBarrier 26 26 64 ControlBarrier 26 26 17 - 73: 68(ptr) AccessChain 67(bufferu) 38 - 74: 15(int) Load 73 MakePointerVisibleKHR NonPrivatePointerKHR 26 - Store 72(y) 74 - 75: 15(int) Load 72(y) - 76: 68(ptr) AccessChain 67(bufferu) 38 - Store 76 75 MakePointerAvailableKHR NonPrivatePointerKHR 26 - 80: 68(ptr) AccessChain 79(bufferi) 38 - 81: 15(int) Load 80 MakePointerVisibleKHR NonPrivatePointerKHR 16 - Store 72(y) 81 - 88: 68(ptr) AccessChain 87(bufferj) 38 38 38 12 - 89: 15(int) Load 88 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16 - Store 72(y) 89 - 90: 15(int) Load 72(y) - 91: 68(ptr) AccessChain 79(bufferi) 38 - Store 91 90 MakePointerAvailableKHR NonPrivatePointerKHR 16 - 92: 15(int) Load 72(y) - 93: 68(ptr) AccessChain 87(bufferj) 38 38 38 12 - Store 93 92 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 16 - 95: 94(ptr) AccessChain 87(bufferj) 12 38 - 96: 83(A) Load 95 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16 - 97: 94(ptr) AccessChain 87(bufferj) 38 38 - Store 97 96 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 16 - 102: 101(ptr) AccessChain 100(bufferk) 38 - 103: 15(int) Load 102 NonPrivatePointerKHR - 104: 68(ptr) AccessChain 79(bufferi) 38 - Store 104 103 MakePointerAvailableKHR NonPrivatePointerKHR 16 - 105: 34 Load 36(imagei) - 107: 106(ivec4) ImageRead 105 39 MakeTexelVisibleKHR NonPrivateTexelKHR VolatileTexelKHR 16 - 111: 35(ptr) AccessChain 110(imagej) 38 - 112: 34 Load 111 - 113: 106(ivec4) ImageRead 112 39 NonPrivateTexelKHR - 114: 35(ptr) AccessChain 110(imagej) 12 - 115: 34 Load 114 - ImageWrite 115 39 116 NonPrivateTexelKHR - 124: 123(ptr) AccessChain 122(samp) 38 - 125: 119 Load 124 - 130: 129(fvec4) ImageSampleExplicitLod 125 128 Lod NonPrivateTexelKHR 127 - 135:131(int64_t) AtomicUMax 133(atomu64) 12 17 134 - Store 133(atomu64) 135 MakePointerAvailableKHR NonPrivatePointerKHR 26 - 140:131(int64_t) Load 133(atomu64) MakePointerVisibleKHR NonPrivatePointerKHR 26 - 141:136(int64_t) Bitcast 140 - 142:136(int64_t) AtomicCompareExchange 138(atomi64) 12 63 63 141 139 - 146: 68(ptr) AccessChain 145(bufferl) 38 - 147: 15(int) Load 146 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16 - Store 72(y) 147 + 74: 69(ptr) AccessChain 68(bufferu) 38 + 75: 15(int) Load 74 MakePointerVisibleKHR NonPrivatePointerKHR 26 + Store 73(y) 75 + 76: 15(int) Load 73(y) + 77: 69(ptr) AccessChain 68(bufferu) 38 + Store 77 76 MakePointerAvailableKHR NonPrivatePointerKHR 26 + 81: 69(ptr) AccessChain 80(bufferi) 38 + 82: 15(int) Load 81 MakePointerVisibleKHR NonPrivatePointerKHR 16 + Store 73(y) 82 + 89: 69(ptr) AccessChain 88(bufferj) 38 38 38 12 + 90: 15(int) Load 89 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16 + Store 73(y) 90 + 91: 15(int) Load 73(y) + 92: 69(ptr) AccessChain 80(bufferi) 38 + Store 92 91 MakePointerAvailableKHR NonPrivatePointerKHR 16 + 93: 15(int) Load 73(y) + 94: 69(ptr) AccessChain 88(bufferj) 38 38 38 12 + Store 94 93 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 16 + 96: 95(ptr) AccessChain 88(bufferj) 12 38 + 97: 84(A) Load 96 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16 + 98: 95(ptr) AccessChain 88(bufferj) 38 38 + Store 98 97 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 16 + 103: 102(ptr) AccessChain 101(bufferk) 38 + 104: 15(int) Load 103 NonPrivatePointerKHR + 105: 69(ptr) AccessChain 80(bufferi) 38 + Store 105 104 MakePointerAvailableKHR NonPrivatePointerKHR 16 + 106: 34 Load 36(imagei) + 108: 107(ivec4) ImageRead 106 39 MakeTexelVisibleKHR NonPrivateTexelKHR VolatileTexelKHR 16 + 112: 35(ptr) AccessChain 111(imagej) 38 + 113: 34 Load 112 + 114: 107(ivec4) ImageRead 113 39 NonPrivateTexelKHR + 115: 35(ptr) AccessChain 111(imagej) 12 + 116: 34 Load 115 + ImageWrite 116 39 117 NonPrivateTexelKHR + 125: 124(ptr) AccessChain 123(samp) 38 + 126: 120 Load 125 + 131: 130(fvec4) ImageSampleExplicitLod 126 129 Lod NonPrivateTexelKHR 128 + 136:132(int64_t) AtomicUMax 134(atomu64) 12 17 135 + Store 134(atomu64) 136 MakePointerAvailableKHR NonPrivatePointerKHR 26 + 141:132(int64_t) Load 134(atomu64) MakePointerVisibleKHR NonPrivatePointerKHR 26 + 142:137(int64_t) Bitcast 141 + 143:137(int64_t) AtomicCompareExchange 139(atomi64) 12 64 64 142 140 + 147: 69(ptr) AccessChain 146(bufferl) 38 + 148: 15(int) Load 147 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16 + Store 73(y) 148 + 149: 69(ptr) AccessChain 146(bufferl) 38 + 150: 15(int) AtomicIAdd 149 16 42 71 + 154: 69(ptr) AccessChain 153(bufferm) 38 + 155: 15(int) AtomicOr 154 16 42 26 + 156: 40(ptr) ImageTexelPointer 36(imagei) 39 17 + 157: 6(int) AtomicIAdd 156 16 42 11 + 158: 69(ptr) AccessChain 68(bufferu) 38 + 159: 15(int) AtomicIAdd 158 12 17 51 + 160: 69(ptr) AccessChain 68(bufferu) 38 + 162: 15(int) AtomicIAdd 160 12 42 16 Return FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics_Error.comp.out b/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics_Error.comp.out index c4149d871..6de93fde4 100644 --- a/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics_Error.comp.out +++ b/3rdparty/glslang/Test/baseResults/spv.memoryScopeSemantics_Error.comp.out @@ -11,7 +11,9 @@ ERROR: 0:23: 'atomicAdd' : Semantics must not include multiple of gl_SemanticsRe ERROR: 0:24: 'atomicCompSwap' : semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease ERROR: 0:25: 'memoryBarrier' : gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease ERROR: 0:26: 'memoryBarrier' : gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease -ERROR: 12 compilation errors. No code generated. +ERROR: 0:27: 'memoryBarrier' : gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier +ERROR: 0:28: 'atomicCompSwap' : semEqual and semUnequal must either both include gl_SemanticsVolatile or neither +ERROR: 14 compilation errors. No code generated. SPIR-V is not generated for failed compile or link diff --git a/3rdparty/glslang/Test/baseResults/spv.privateVariableTypes.frag.out b/3rdparty/glslang/Test/baseResults/spv.privateVariableTypes.frag.out new file mode 100644 index 000000000..9b4063ed5 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/spv.privateVariableTypes.frag.out @@ -0,0 +1,54 @@ +spv.privateVariableTypes.frag +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 27 + + Capability Shader + Capability Float16 + Capability Int64 + Capability Int16 + Capability Int8 + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source GLSL 460 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" + Name 4 "main" + Name 8 "i8" + Name 11 "u8" + Name 14 "i16" + Name 17 "u16" + Name 20 "i64" + Name 23 "u64" + Name 26 "f16" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 8 1 + 7: TypePointer Private 6(int8_t) + 8(i8): 7(ptr) Variable Private + 9: TypeInt 8 0 + 10: TypePointer Private 9(int8_t) + 11(u8): 10(ptr) Variable Private + 12: TypeInt 16 1 + 13: TypePointer Private 12(int16_t) + 14(i16): 13(ptr) Variable Private + 15: TypeInt 16 0 + 16: TypePointer Private 15(int16_t) + 17(u16): 16(ptr) Variable Private + 18: TypeInt 64 1 + 19: TypePointer Private 18(int64_t) + 20(i64): 19(ptr) Variable Private + 21: TypeInt 64 0 + 22: TypePointer Private 21(int64_t) + 23(u64): 22(ptr) Variable Private + 24: TypeFloat 16 + 25: TypePointer Private 24(float16_t) + 26(f16): 25(ptr) Variable Private + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out b/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out index d25eec7ee..1c616ee51 100644 --- a/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out +++ b/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out @@ -1,8 +1,7 @@ spv.shaderBallot.comp -Validation failed // Module Version 10000 // Generated by (magic number): 80007 -// Id's are bound by 298 +// Id's are bound by 318 Capability Shader Capability Int64 @@ -10,7 +9,7 @@ Validation failed Extension "SPV_KHR_shader_ballot" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 4 "main" 10 12 21 23 26 29 32 + EntryPoint GLCompute 4 "main" 10 12 22 29 36 43 50 ExecutionMode 4 LocalSize 8 8 1 Source GLSL 450 SourceExtension "GL_ARB_gpu_shader_int64" @@ -20,30 +19,30 @@ Validation failed Name 10 "gl_SubGroupInvocationARB" Name 12 "gl_SubGroupSizeARB" Name 19 "relMask" - Name 21 "gl_SubGroupEqMaskARB" - Name 23 "gl_SubGroupGeMaskARB" - Name 26 "gl_SubGroupGtMaskARB" - Name 29 "gl_SubGroupLeMaskARB" - Name 32 "gl_SubGroupLtMaskARB" - Name 52 "Buffers" - MemberName 52(Buffers) 0 "f4" - MemberName 52(Buffers) 1 "i4" - MemberName 52(Buffers) 2 "u4" - Name 55 "data" + Name 22 "gl_SubGroupEqMaskARB" + Name 29 "gl_SubGroupGeMaskARB" + Name 36 "gl_SubGroupGtMaskARB" + Name 43 "gl_SubGroupLeMaskARB" + Name 50 "gl_SubGroupLtMaskARB" + Name 72 "Buffers" + MemberName 72(Buffers) 0 "f4" + MemberName 72(Buffers) 1 "i4" + MemberName 72(Buffers) 2 "u4" + Name 75 "data" Decorate 10(gl_SubGroupInvocationARB) BuiltIn SubgroupLocalInvocationId Decorate 12(gl_SubGroupSizeARB) BuiltIn SubgroupSize - Decorate 21(gl_SubGroupEqMaskARB) BuiltIn SubgroupEqMaskKHR - Decorate 23(gl_SubGroupGeMaskARB) BuiltIn SubgroupGeMaskKHR - Decorate 26(gl_SubGroupGtMaskARB) BuiltIn SubgroupGtMaskKHR - Decorate 29(gl_SubGroupLeMaskARB) BuiltIn SubgroupLeMaskKHR - Decorate 32(gl_SubGroupLtMaskARB) BuiltIn SubgroupLtMaskKHR - MemberDecorate 52(Buffers) 0 Offset 0 - MemberDecorate 52(Buffers) 1 Offset 16 - MemberDecorate 52(Buffers) 2 Offset 32 - Decorate 52(Buffers) BufferBlock - Decorate 55(data) DescriptorSet 0 - Decorate 55(data) Binding 0 - Decorate 297 BuiltIn WorkgroupSize + Decorate 22(gl_SubGroupEqMaskARB) BuiltIn SubgroupEqMaskKHR + Decorate 29(gl_SubGroupGeMaskARB) BuiltIn SubgroupGeMaskKHR + Decorate 36(gl_SubGroupGtMaskARB) BuiltIn SubgroupGtMaskKHR + Decorate 43(gl_SubGroupLeMaskARB) BuiltIn SubgroupLeMaskKHR + Decorate 50(gl_SubGroupLtMaskARB) BuiltIn SubgroupLtMaskKHR + MemberDecorate 72(Buffers) 0 Offset 0 + MemberDecorate 72(Buffers) 1 Offset 16 + MemberDecorate 72(Buffers) 2 Offset 32 + Decorate 72(Buffers) BufferBlock + Decorate 75(data) DescriptorSet 0 + Decorate 75(data) Binding 0 + Decorate 317 BuiltIn WorkgroupSize 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -54,43 +53,43 @@ Validation failed 15: 6(int) Constant 4 17: TypeInt 64 0 18: TypePointer Function 17(int64_t) - 20: TypePointer Input 17(int64_t) -21(gl_SubGroupEqMaskARB): 20(ptr) Variable Input -23(gl_SubGroupGeMaskARB): 20(ptr) Variable Input -26(gl_SubGroupGtMaskARB): 20(ptr) Variable Input -29(gl_SubGroupLeMaskARB): 20(ptr) Variable Input -32(gl_SubGroupLtMaskARB): 20(ptr) Variable Input - 36: TypeBool - 37: 36(bool) ConstantTrue - 38: TypeVector 6(int) 4 - 42: TypeVector 6(int) 2 - 48: TypeFloat 32 - 49: TypeVector 48(float) 4 - 50: TypeInt 32 1 - 51: TypeVector 50(int) 4 - 52(Buffers): TypeStruct 49(fvec4) 51(ivec4) 38(ivec4) - 53: TypeArray 52(Buffers) 15 - 54: TypePointer Uniform 53 - 55(data): 54(ptr) Variable Uniform - 57: 50(int) Constant 0 - 58: 6(int) Constant 0 - 59: TypePointer Uniform 48(float) - 66: 50(int) Constant 1 - 67: TypeVector 48(float) 2 - 68: TypePointer Uniform 49(fvec4) - 82: 50(int) Constant 2 - 83: TypeVector 48(float) 3 - 99: 50(int) Constant 3 - 114: TypePointer Uniform 50(int) - 121: TypeVector 50(int) 2 - 122: TypePointer Uniform 51(ivec4) - 136: TypeVector 50(int) 3 - 166: TypePointer Uniform 6(int) - 173: TypePointer Uniform 38(ivec4) - 187: TypeVector 6(int) 3 - 295: 6(int) Constant 8 - 296: 6(int) Constant 1 - 297: 187(ivec3) ConstantComposite 295 295 296 + 20: TypeVector 6(int) 4 + 21: TypePointer Input 20(ivec4) +22(gl_SubGroupEqMaskARB): 21(ptr) Variable Input + 26: TypeVector 6(int) 2 +29(gl_SubGroupGeMaskARB): 21(ptr) Variable Input +36(gl_SubGroupGtMaskARB): 21(ptr) Variable Input +43(gl_SubGroupLeMaskARB): 21(ptr) Variable Input +50(gl_SubGroupLtMaskARB): 21(ptr) Variable Input + 58: TypeBool + 59: 58(bool) ConstantTrue + 68: TypeFloat 32 + 69: TypeVector 68(float) 4 + 70: TypeInt 32 1 + 71: TypeVector 70(int) 4 + 72(Buffers): TypeStruct 69(fvec4) 71(ivec4) 20(ivec4) + 73: TypeArray 72(Buffers) 15 + 74: TypePointer Uniform 73 + 75(data): 74(ptr) Variable Uniform + 77: 70(int) Constant 0 + 78: 6(int) Constant 0 + 79: TypePointer Uniform 68(float) + 86: 70(int) Constant 1 + 87: TypeVector 68(float) 2 + 88: TypePointer Uniform 69(fvec4) + 102: 70(int) Constant 2 + 103: TypeVector 68(float) 3 + 119: 70(int) Constant 3 + 134: TypePointer Uniform 70(int) + 141: TypeVector 70(int) 2 + 142: TypePointer Uniform 71(ivec4) + 156: TypeVector 70(int) 3 + 186: TypePointer Uniform 6(int) + 193: TypePointer Uniform 20(ivec4) + 207: TypeVector 6(int) 3 + 315: 6(int) Constant 8 + 316: 6(int) Constant 1 + 317: 207(ivec3) ConstantComposite 315 315 316 4(main): 2 Function None 3 5: Label 8(invocation): 7(ptr) Variable Function @@ -100,275 +99,295 @@ Validation failed 14: 6(int) IAdd 11 13 16: 6(int) UMod 14 15 Store 8(invocation) 16 - 22: 17(int64_t) Load 21(gl_SubGroupEqMaskARB) - 24: 17(int64_t) Load 23(gl_SubGroupGeMaskARB) - 25: 17(int64_t) IAdd 22 24 - 27: 17(int64_t) Load 26(gl_SubGroupGtMaskARB) - 28: 17(int64_t) IAdd 25 27 - 30: 17(int64_t) Load 29(gl_SubGroupLeMaskARB) - 31: 17(int64_t) IAdd 28 30 - 33: 17(int64_t) Load 32(gl_SubGroupLtMaskARB) - 34: 17(int64_t) IAdd 31 33 - Store 19(relMask) 34 - 35: 17(int64_t) Load 19(relMask) - 39: 38(ivec4) SubgroupBallotKHR 37 - 40: 6(int) CompositeExtract 39 0 - 41: 6(int) CompositeExtract 39 1 - 43: 42(ivec2) CompositeConstruct 40 41 - 44: 17(int64_t) Bitcast 43 - 45: 36(bool) IEqual 35 44 - SelectionMerge 47 None - BranchConditional 45 46 216 - 46: Label - 56: 6(int) Load 8(invocation) - 60: 59(ptr) AccessChain 55(data) 57 57 58 - 61: 48(float) Load 60 - 62: 6(int) Load 8(invocation) - 63: 48(float) SubgroupReadInvocationKHR 61 62 - 64: 59(ptr) AccessChain 55(data) 56 57 58 - Store 64 63 - 65: 6(int) Load 8(invocation) - 69: 68(ptr) AccessChain 55(data) 66 57 - 70: 49(fvec4) Load 69 - 71: 67(fvec2) VectorShuffle 70 70 0 1 - 72: 6(int) Load 8(invocation) - 73: 48(float) CompositeExtract 71 0 - 74: 48(float) SubgroupReadInvocationKHR 73 72 - 75: 48(float) CompositeExtract 71 1 - 76: 48(float) SubgroupReadInvocationKHR 75 72 - 77: 67(fvec2) CompositeConstruct 74 76 - 78: 68(ptr) AccessChain 55(data) 65 57 - 79: 49(fvec4) Load 78 - 80: 49(fvec4) VectorShuffle 79 77 4 5 2 3 - Store 78 80 - 81: 6(int) Load 8(invocation) - 84: 68(ptr) AccessChain 55(data) 82 57 - 85: 49(fvec4) Load 84 - 86: 83(fvec3) VectorShuffle 85 85 0 1 2 - 87: 6(int) Load 8(invocation) - 88: 48(float) CompositeExtract 86 0 - 89: 48(float) SubgroupReadInvocationKHR 88 87 - 90: 48(float) CompositeExtract 86 1 - 91: 48(float) SubgroupReadInvocationKHR 90 87 - 92: 48(float) CompositeExtract 86 2 - 93: 48(float) SubgroupReadInvocationKHR 92 87 - 94: 83(fvec3) CompositeConstruct 89 91 93 - 95: 68(ptr) AccessChain 55(data) 81 57 - 96: 49(fvec4) Load 95 - 97: 49(fvec4) VectorShuffle 96 94 4 5 6 3 - Store 95 97 - 98: 6(int) Load 8(invocation) - 100: 68(ptr) AccessChain 55(data) 99 57 - 101: 49(fvec4) Load 100 - 102: 6(int) Load 8(invocation) - 103: 48(float) CompositeExtract 101 0 - 104: 48(float) SubgroupReadInvocationKHR 103 102 - 105: 48(float) CompositeExtract 101 1 - 106: 48(float) SubgroupReadInvocationKHR 105 102 - 107: 48(float) CompositeExtract 101 2 - 108: 48(float) SubgroupReadInvocationKHR 107 102 - 109: 48(float) CompositeExtract 101 3 - 110: 48(float) SubgroupReadInvocationKHR 109 102 - 111: 49(fvec4) CompositeConstruct 104 106 108 110 - 112: 68(ptr) AccessChain 55(data) 98 57 - Store 112 111 - 113: 6(int) Load 8(invocation) - 115: 114(ptr) AccessChain 55(data) 57 66 58 - 116: 50(int) Load 115 - 117: 6(int) Load 8(invocation) - 118: 50(int) SubgroupReadInvocationKHR 116 117 - 119: 114(ptr) AccessChain 55(data) 113 66 58 - Store 119 118 - 120: 6(int) Load 8(invocation) - 123: 122(ptr) AccessChain 55(data) 66 66 - 124: 51(ivec4) Load 123 - 125: 121(ivec2) VectorShuffle 124 124 0 1 - 126: 6(int) Load 8(invocation) - 127: 50(int) CompositeExtract 125 0 - 128: 50(int) SubgroupReadInvocationKHR 127 126 - 129: 50(int) CompositeExtract 125 1 - 130: 50(int) SubgroupReadInvocationKHR 129 126 - 131: 121(ivec2) CompositeConstruct 128 130 - 132: 122(ptr) AccessChain 55(data) 120 66 - 133: 51(ivec4) Load 132 - 134: 51(ivec4) VectorShuffle 133 131 4 5 2 3 - Store 132 134 - 135: 6(int) Load 8(invocation) - 137: 122(ptr) AccessChain 55(data) 82 66 - 138: 51(ivec4) Load 137 - 139: 136(ivec3) VectorShuffle 138 138 0 1 2 + 23: 20(ivec4) Load 22(gl_SubGroupEqMaskARB) + 24: 6(int) CompositeExtract 23 0 + 25: 6(int) CompositeExtract 23 1 + 27: 26(ivec2) CompositeConstruct 24 25 + 28: 17(int64_t) Bitcast 27 + 30: 20(ivec4) Load 29(gl_SubGroupGeMaskARB) + 31: 6(int) CompositeExtract 30 0 + 32: 6(int) CompositeExtract 30 1 + 33: 26(ivec2) CompositeConstruct 31 32 + 34: 17(int64_t) Bitcast 33 + 35: 17(int64_t) IAdd 28 34 + 37: 20(ivec4) Load 36(gl_SubGroupGtMaskARB) + 38: 6(int) CompositeExtract 37 0 + 39: 6(int) CompositeExtract 37 1 + 40: 26(ivec2) CompositeConstruct 38 39 + 41: 17(int64_t) Bitcast 40 + 42: 17(int64_t) IAdd 35 41 + 44: 20(ivec4) Load 43(gl_SubGroupLeMaskARB) + 45: 6(int) CompositeExtract 44 0 + 46: 6(int) CompositeExtract 44 1 + 47: 26(ivec2) CompositeConstruct 45 46 + 48: 17(int64_t) Bitcast 47 + 49: 17(int64_t) IAdd 42 48 + 51: 20(ivec4) Load 50(gl_SubGroupLtMaskARB) + 52: 6(int) CompositeExtract 51 0 + 53: 6(int) CompositeExtract 51 1 + 54: 26(ivec2) CompositeConstruct 52 53 + 55: 17(int64_t) Bitcast 54 + 56: 17(int64_t) IAdd 49 55 + Store 19(relMask) 56 + 57: 17(int64_t) Load 19(relMask) + 60: 20(ivec4) SubgroupBallotKHR 59 + 61: 6(int) CompositeExtract 60 0 + 62: 6(int) CompositeExtract 60 1 + 63: 26(ivec2) CompositeConstruct 61 62 + 64: 17(int64_t) Bitcast 63 + 65: 58(bool) IEqual 57 64 + SelectionMerge 67 None + BranchConditional 65 66 236 + 66: Label + 76: 6(int) Load 8(invocation) + 80: 79(ptr) AccessChain 75(data) 77 77 78 + 81: 68(float) Load 80 + 82: 6(int) Load 8(invocation) + 83: 68(float) SubgroupReadInvocationKHR 81 82 + 84: 79(ptr) AccessChain 75(data) 76 77 78 + Store 84 83 + 85: 6(int) Load 8(invocation) + 89: 88(ptr) AccessChain 75(data) 86 77 + 90: 69(fvec4) Load 89 + 91: 87(fvec2) VectorShuffle 90 90 0 1 + 92: 6(int) Load 8(invocation) + 93: 68(float) CompositeExtract 91 0 + 94: 68(float) SubgroupReadInvocationKHR 93 92 + 95: 68(float) CompositeExtract 91 1 + 96: 68(float) SubgroupReadInvocationKHR 95 92 + 97: 87(fvec2) CompositeConstruct 94 96 + 98: 88(ptr) AccessChain 75(data) 85 77 + 99: 69(fvec4) Load 98 + 100: 69(fvec4) VectorShuffle 99 97 4 5 2 3 + Store 98 100 + 101: 6(int) Load 8(invocation) + 104: 88(ptr) AccessChain 75(data) 102 77 + 105: 69(fvec4) Load 104 + 106: 103(fvec3) VectorShuffle 105 105 0 1 2 + 107: 6(int) Load 8(invocation) + 108: 68(float) CompositeExtract 106 0 + 109: 68(float) SubgroupReadInvocationKHR 108 107 + 110: 68(float) CompositeExtract 106 1 + 111: 68(float) SubgroupReadInvocationKHR 110 107 + 112: 68(float) CompositeExtract 106 2 + 113: 68(float) SubgroupReadInvocationKHR 112 107 + 114: 103(fvec3) CompositeConstruct 109 111 113 + 115: 88(ptr) AccessChain 75(data) 101 77 + 116: 69(fvec4) Load 115 + 117: 69(fvec4) VectorShuffle 116 114 4 5 6 3 + Store 115 117 + 118: 6(int) Load 8(invocation) + 120: 88(ptr) AccessChain 75(data) 119 77 + 121: 69(fvec4) Load 120 + 122: 6(int) Load 8(invocation) + 123: 68(float) CompositeExtract 121 0 + 124: 68(float) SubgroupReadInvocationKHR 123 122 + 125: 68(float) CompositeExtract 121 1 + 126: 68(float) SubgroupReadInvocationKHR 125 122 + 127: 68(float) CompositeExtract 121 2 + 128: 68(float) SubgroupReadInvocationKHR 127 122 + 129: 68(float) CompositeExtract 121 3 + 130: 68(float) SubgroupReadInvocationKHR 129 122 + 131: 69(fvec4) CompositeConstruct 124 126 128 130 + 132: 88(ptr) AccessChain 75(data) 118 77 + Store 132 131 + 133: 6(int) Load 8(invocation) + 135: 134(ptr) AccessChain 75(data) 77 86 78 + 136: 70(int) Load 135 + 137: 6(int) Load 8(invocation) + 138: 70(int) SubgroupReadInvocationKHR 136 137 + 139: 134(ptr) AccessChain 75(data) 133 86 78 + Store 139 138 140: 6(int) Load 8(invocation) - 141: 50(int) CompositeExtract 139 0 - 142: 50(int) SubgroupReadInvocationKHR 141 140 - 143: 50(int) CompositeExtract 139 1 - 144: 50(int) SubgroupReadInvocationKHR 143 140 - 145: 50(int) CompositeExtract 139 2 - 146: 50(int) SubgroupReadInvocationKHR 145 140 - 147: 136(ivec3) CompositeConstruct 142 144 146 - 148: 122(ptr) AccessChain 55(data) 135 66 - 149: 51(ivec4) Load 148 - 150: 51(ivec4) VectorShuffle 149 147 4 5 6 3 - Store 148 150 - 151: 6(int) Load 8(invocation) - 152: 122(ptr) AccessChain 55(data) 99 66 - 153: 51(ivec4) Load 152 - 154: 6(int) Load 8(invocation) - 155: 50(int) CompositeExtract 153 0 - 156: 50(int) SubgroupReadInvocationKHR 155 154 - 157: 50(int) CompositeExtract 153 1 - 158: 50(int) SubgroupReadInvocationKHR 157 154 - 159: 50(int) CompositeExtract 153 2 - 160: 50(int) SubgroupReadInvocationKHR 159 154 - 161: 50(int) CompositeExtract 153 3 - 162: 50(int) SubgroupReadInvocationKHR 161 154 - 163: 51(ivec4) CompositeConstruct 156 158 160 162 - 164: 122(ptr) AccessChain 55(data) 151 66 - Store 164 163 - 165: 6(int) Load 8(invocation) - 167: 166(ptr) AccessChain 55(data) 57 82 58 - 168: 6(int) Load 167 - 169: 6(int) Load 8(invocation) - 170: 6(int) SubgroupReadInvocationKHR 168 169 - 171: 166(ptr) AccessChain 55(data) 165 82 58 - Store 171 170 - 172: 6(int) Load 8(invocation) - 174: 173(ptr) AccessChain 55(data) 66 82 - 175: 38(ivec4) Load 174 - 176: 42(ivec2) VectorShuffle 175 175 0 1 - 177: 6(int) Load 8(invocation) - 178: 6(int) CompositeExtract 176 0 - 179: 6(int) SubgroupReadInvocationKHR 178 177 - 180: 6(int) CompositeExtract 176 1 - 181: 6(int) SubgroupReadInvocationKHR 180 177 - 182: 42(ivec2) CompositeConstruct 179 181 - 183: 173(ptr) AccessChain 55(data) 172 82 - 184: 38(ivec4) Load 183 - 185: 38(ivec4) VectorShuffle 184 182 4 5 2 3 - Store 183 185 - 186: 6(int) Load 8(invocation) - 188: 173(ptr) AccessChain 55(data) 82 82 - 189: 38(ivec4) Load 188 - 190: 187(ivec3) VectorShuffle 189 189 0 1 2 - 191: 6(int) Load 8(invocation) - 192: 6(int) CompositeExtract 190 0 - 193: 6(int) SubgroupReadInvocationKHR 192 191 - 194: 6(int) CompositeExtract 190 1 - 195: 6(int) SubgroupReadInvocationKHR 194 191 - 196: 6(int) CompositeExtract 190 2 - 197: 6(int) SubgroupReadInvocationKHR 196 191 - 198: 187(ivec3) CompositeConstruct 193 195 197 - 199: 173(ptr) AccessChain 55(data) 186 82 - 200: 38(ivec4) Load 199 - 201: 38(ivec4) VectorShuffle 200 198 4 5 6 3 - Store 199 201 - 202: 6(int) Load 8(invocation) - 203: 173(ptr) AccessChain 55(data) 99 82 - 204: 38(ivec4) Load 203 - 205: 6(int) Load 8(invocation) - 206: 6(int) CompositeExtract 204 0 - 207: 6(int) SubgroupReadInvocationKHR 206 205 - 208: 6(int) CompositeExtract 204 1 - 209: 6(int) SubgroupReadInvocationKHR 208 205 - 210: 6(int) CompositeExtract 204 2 - 211: 6(int) SubgroupReadInvocationKHR 210 205 - 212: 6(int) CompositeExtract 204 3 - 213: 6(int) SubgroupReadInvocationKHR 212 205 - 214: 38(ivec4) CompositeConstruct 207 209 211 213 - 215: 173(ptr) AccessChain 55(data) 202 82 - Store 215 214 - Branch 47 - 216: Label - 217: 6(int) Load 8(invocation) - 218: 59(ptr) AccessChain 55(data) 57 57 58 - 219: 48(float) Load 218 - 220: 48(float) SubgroupFirstInvocationKHR 219 - 221: 59(ptr) AccessChain 55(data) 217 57 58 - Store 221 220 + 143: 142(ptr) AccessChain 75(data) 86 86 + 144: 71(ivec4) Load 143 + 145: 141(ivec2) VectorShuffle 144 144 0 1 + 146: 6(int) Load 8(invocation) + 147: 70(int) CompositeExtract 145 0 + 148: 70(int) SubgroupReadInvocationKHR 147 146 + 149: 70(int) CompositeExtract 145 1 + 150: 70(int) SubgroupReadInvocationKHR 149 146 + 151: 141(ivec2) CompositeConstruct 148 150 + 152: 142(ptr) AccessChain 75(data) 140 86 + 153: 71(ivec4) Load 152 + 154: 71(ivec4) VectorShuffle 153 151 4 5 2 3 + Store 152 154 + 155: 6(int) Load 8(invocation) + 157: 142(ptr) AccessChain 75(data) 102 86 + 158: 71(ivec4) Load 157 + 159: 156(ivec3) VectorShuffle 158 158 0 1 2 + 160: 6(int) Load 8(invocation) + 161: 70(int) CompositeExtract 159 0 + 162: 70(int) SubgroupReadInvocationKHR 161 160 + 163: 70(int) CompositeExtract 159 1 + 164: 70(int) SubgroupReadInvocationKHR 163 160 + 165: 70(int) CompositeExtract 159 2 + 166: 70(int) SubgroupReadInvocationKHR 165 160 + 167: 156(ivec3) CompositeConstruct 162 164 166 + 168: 142(ptr) AccessChain 75(data) 155 86 + 169: 71(ivec4) Load 168 + 170: 71(ivec4) VectorShuffle 169 167 4 5 6 3 + Store 168 170 + 171: 6(int) Load 8(invocation) + 172: 142(ptr) AccessChain 75(data) 119 86 + 173: 71(ivec4) Load 172 + 174: 6(int) Load 8(invocation) + 175: 70(int) CompositeExtract 173 0 + 176: 70(int) SubgroupReadInvocationKHR 175 174 + 177: 70(int) CompositeExtract 173 1 + 178: 70(int) SubgroupReadInvocationKHR 177 174 + 179: 70(int) CompositeExtract 173 2 + 180: 70(int) SubgroupReadInvocationKHR 179 174 + 181: 70(int) CompositeExtract 173 3 + 182: 70(int) SubgroupReadInvocationKHR 181 174 + 183: 71(ivec4) CompositeConstruct 176 178 180 182 + 184: 142(ptr) AccessChain 75(data) 171 86 + Store 184 183 + 185: 6(int) Load 8(invocation) + 187: 186(ptr) AccessChain 75(data) 77 102 78 + 188: 6(int) Load 187 + 189: 6(int) Load 8(invocation) + 190: 6(int) SubgroupReadInvocationKHR 188 189 + 191: 186(ptr) AccessChain 75(data) 185 102 78 + Store 191 190 + 192: 6(int) Load 8(invocation) + 194: 193(ptr) AccessChain 75(data) 86 102 + 195: 20(ivec4) Load 194 + 196: 26(ivec2) VectorShuffle 195 195 0 1 + 197: 6(int) Load 8(invocation) + 198: 6(int) CompositeExtract 196 0 + 199: 6(int) SubgroupReadInvocationKHR 198 197 + 200: 6(int) CompositeExtract 196 1 + 201: 6(int) SubgroupReadInvocationKHR 200 197 + 202: 26(ivec2) CompositeConstruct 199 201 + 203: 193(ptr) AccessChain 75(data) 192 102 + 204: 20(ivec4) Load 203 + 205: 20(ivec4) VectorShuffle 204 202 4 5 2 3 + Store 203 205 + 206: 6(int) Load 8(invocation) + 208: 193(ptr) AccessChain 75(data) 102 102 + 209: 20(ivec4) Load 208 + 210: 207(ivec3) VectorShuffle 209 209 0 1 2 + 211: 6(int) Load 8(invocation) + 212: 6(int) CompositeExtract 210 0 + 213: 6(int) SubgroupReadInvocationKHR 212 211 + 214: 6(int) CompositeExtract 210 1 + 215: 6(int) SubgroupReadInvocationKHR 214 211 + 216: 6(int) CompositeExtract 210 2 + 217: 6(int) SubgroupReadInvocationKHR 216 211 + 218: 207(ivec3) CompositeConstruct 213 215 217 + 219: 193(ptr) AccessChain 75(data) 206 102 + 220: 20(ivec4) Load 219 + 221: 20(ivec4) VectorShuffle 220 218 4 5 6 3 + Store 219 221 222: 6(int) Load 8(invocation) - 223: 68(ptr) AccessChain 55(data) 66 57 - 224: 49(fvec4) Load 223 - 225: 67(fvec2) VectorShuffle 224 224 0 1 - 226: 67(fvec2) SubgroupFirstInvocationKHR 225 - 227: 68(ptr) AccessChain 55(data) 222 57 - 228: 49(fvec4) Load 227 - 229: 49(fvec4) VectorShuffle 228 226 4 5 2 3 - Store 227 229 - 230: 6(int) Load 8(invocation) - 231: 68(ptr) AccessChain 55(data) 82 57 - 232: 49(fvec4) Load 231 - 233: 83(fvec3) VectorShuffle 232 232 0 1 2 - 234: 83(fvec3) SubgroupFirstInvocationKHR 233 - 235: 68(ptr) AccessChain 55(data) 230 57 - 236: 49(fvec4) Load 235 - 237: 49(fvec4) VectorShuffle 236 234 4 5 6 3 - Store 235 237 - 238: 6(int) Load 8(invocation) - 239: 68(ptr) AccessChain 55(data) 99 57 - 240: 49(fvec4) Load 239 - 241: 49(fvec4) SubgroupFirstInvocationKHR 240 - 242: 68(ptr) AccessChain 55(data) 238 57 - Store 242 241 - 243: 6(int) Load 8(invocation) - 244: 114(ptr) AccessChain 55(data) 57 66 58 - 245: 50(int) Load 244 - 246: 50(int) SubgroupFirstInvocationKHR 245 - 247: 114(ptr) AccessChain 55(data) 243 66 58 - Store 247 246 - 248: 6(int) Load 8(invocation) - 249: 122(ptr) AccessChain 55(data) 66 66 - 250: 51(ivec4) Load 249 - 251: 121(ivec2) VectorShuffle 250 250 0 1 - 252: 121(ivec2) SubgroupFirstInvocationKHR 251 - 253: 122(ptr) AccessChain 55(data) 248 66 - 254: 51(ivec4) Load 253 - 255: 51(ivec4) VectorShuffle 254 252 4 5 2 3 - Store 253 255 - 256: 6(int) Load 8(invocation) - 257: 122(ptr) AccessChain 55(data) 82 66 - 258: 51(ivec4) Load 257 - 259: 136(ivec3) VectorShuffle 258 258 0 1 2 - 260: 136(ivec3) SubgroupFirstInvocationKHR 259 - 261: 122(ptr) AccessChain 55(data) 256 66 - 262: 51(ivec4) Load 261 - 263: 51(ivec4) VectorShuffle 262 260 4 5 6 3 - Store 261 263 - 264: 6(int) Load 8(invocation) - 265: 122(ptr) AccessChain 55(data) 99 66 - 266: 51(ivec4) Load 265 - 267: 51(ivec4) SubgroupFirstInvocationKHR 266 - 268: 122(ptr) AccessChain 55(data) 264 66 - Store 268 267 - 269: 6(int) Load 8(invocation) - 270: 166(ptr) AccessChain 55(data) 57 82 58 - 271: 6(int) Load 270 - 272: 6(int) SubgroupFirstInvocationKHR 271 - 273: 166(ptr) AccessChain 55(data) 269 82 58 - Store 273 272 - 274: 6(int) Load 8(invocation) - 275: 173(ptr) AccessChain 55(data) 66 82 - 276: 38(ivec4) Load 275 - 277: 42(ivec2) VectorShuffle 276 276 0 1 - 278: 42(ivec2) SubgroupFirstInvocationKHR 277 - 279: 173(ptr) AccessChain 55(data) 274 82 - 280: 38(ivec4) Load 279 - 281: 38(ivec4) VectorShuffle 280 278 4 5 2 3 - Store 279 281 - 282: 6(int) Load 8(invocation) - 283: 173(ptr) AccessChain 55(data) 82 82 - 284: 38(ivec4) Load 283 - 285: 187(ivec3) VectorShuffle 284 284 0 1 2 - 286: 187(ivec3) SubgroupFirstInvocationKHR 285 - 287: 173(ptr) AccessChain 55(data) 282 82 - 288: 38(ivec4) Load 287 - 289: 38(ivec4) VectorShuffle 288 286 4 5 6 3 - Store 287 289 - 290: 6(int) Load 8(invocation) - 291: 173(ptr) AccessChain 55(data) 99 82 - 292: 38(ivec4) Load 291 - 293: 38(ivec4) SubgroupFirstInvocationKHR 292 - 294: 173(ptr) AccessChain 55(data) 290 82 - Store 294 293 - Branch 47 - 47: Label + 223: 193(ptr) AccessChain 75(data) 119 102 + 224: 20(ivec4) Load 223 + 225: 6(int) Load 8(invocation) + 226: 6(int) CompositeExtract 224 0 + 227: 6(int) SubgroupReadInvocationKHR 226 225 + 228: 6(int) CompositeExtract 224 1 + 229: 6(int) SubgroupReadInvocationKHR 228 225 + 230: 6(int) CompositeExtract 224 2 + 231: 6(int) SubgroupReadInvocationKHR 230 225 + 232: 6(int) CompositeExtract 224 3 + 233: 6(int) SubgroupReadInvocationKHR 232 225 + 234: 20(ivec4) CompositeConstruct 227 229 231 233 + 235: 193(ptr) AccessChain 75(data) 222 102 + Store 235 234 + Branch 67 + 236: Label + 237: 6(int) Load 8(invocation) + 238: 79(ptr) AccessChain 75(data) 77 77 78 + 239: 68(float) Load 238 + 240: 68(float) SubgroupFirstInvocationKHR 239 + 241: 79(ptr) AccessChain 75(data) 237 77 78 + Store 241 240 + 242: 6(int) Load 8(invocation) + 243: 88(ptr) AccessChain 75(data) 86 77 + 244: 69(fvec4) Load 243 + 245: 87(fvec2) VectorShuffle 244 244 0 1 + 246: 87(fvec2) SubgroupFirstInvocationKHR 245 + 247: 88(ptr) AccessChain 75(data) 242 77 + 248: 69(fvec4) Load 247 + 249: 69(fvec4) VectorShuffle 248 246 4 5 2 3 + Store 247 249 + 250: 6(int) Load 8(invocation) + 251: 88(ptr) AccessChain 75(data) 102 77 + 252: 69(fvec4) Load 251 + 253: 103(fvec3) VectorShuffle 252 252 0 1 2 + 254: 103(fvec3) SubgroupFirstInvocationKHR 253 + 255: 88(ptr) AccessChain 75(data) 250 77 + 256: 69(fvec4) Load 255 + 257: 69(fvec4) VectorShuffle 256 254 4 5 6 3 + Store 255 257 + 258: 6(int) Load 8(invocation) + 259: 88(ptr) AccessChain 75(data) 119 77 + 260: 69(fvec4) Load 259 + 261: 69(fvec4) SubgroupFirstInvocationKHR 260 + 262: 88(ptr) AccessChain 75(data) 258 77 + Store 262 261 + 263: 6(int) Load 8(invocation) + 264: 134(ptr) AccessChain 75(data) 77 86 78 + 265: 70(int) Load 264 + 266: 70(int) SubgroupFirstInvocationKHR 265 + 267: 134(ptr) AccessChain 75(data) 263 86 78 + Store 267 266 + 268: 6(int) Load 8(invocation) + 269: 142(ptr) AccessChain 75(data) 86 86 + 270: 71(ivec4) Load 269 + 271: 141(ivec2) VectorShuffle 270 270 0 1 + 272: 141(ivec2) SubgroupFirstInvocationKHR 271 + 273: 142(ptr) AccessChain 75(data) 268 86 + 274: 71(ivec4) Load 273 + 275: 71(ivec4) VectorShuffle 274 272 4 5 2 3 + Store 273 275 + 276: 6(int) Load 8(invocation) + 277: 142(ptr) AccessChain 75(data) 102 86 + 278: 71(ivec4) Load 277 + 279: 156(ivec3) VectorShuffle 278 278 0 1 2 + 280: 156(ivec3) SubgroupFirstInvocationKHR 279 + 281: 142(ptr) AccessChain 75(data) 276 86 + 282: 71(ivec4) Load 281 + 283: 71(ivec4) VectorShuffle 282 280 4 5 6 3 + Store 281 283 + 284: 6(int) Load 8(invocation) + 285: 142(ptr) AccessChain 75(data) 119 86 + 286: 71(ivec4) Load 285 + 287: 71(ivec4) SubgroupFirstInvocationKHR 286 + 288: 142(ptr) AccessChain 75(data) 284 86 + Store 288 287 + 289: 6(int) Load 8(invocation) + 290: 186(ptr) AccessChain 75(data) 77 102 78 + 291: 6(int) Load 290 + 292: 6(int) SubgroupFirstInvocationKHR 291 + 293: 186(ptr) AccessChain 75(data) 289 102 78 + Store 293 292 + 294: 6(int) Load 8(invocation) + 295: 193(ptr) AccessChain 75(data) 86 102 + 296: 20(ivec4) Load 295 + 297: 26(ivec2) VectorShuffle 296 296 0 1 + 298: 26(ivec2) SubgroupFirstInvocationKHR 297 + 299: 193(ptr) AccessChain 75(data) 294 102 + 300: 20(ivec4) Load 299 + 301: 20(ivec4) VectorShuffle 300 298 4 5 2 3 + Store 299 301 + 302: 6(int) Load 8(invocation) + 303: 193(ptr) AccessChain 75(data) 102 102 + 304: 20(ivec4) Load 303 + 305: 207(ivec3) VectorShuffle 304 304 0 1 2 + 306: 207(ivec3) SubgroupFirstInvocationKHR 305 + 307: 193(ptr) AccessChain 75(data) 302 102 + 308: 20(ivec4) Load 307 + 309: 20(ivec4) VectorShuffle 308 306 4 5 6 3 + Store 307 309 + 310: 6(int) Load 8(invocation) + 311: 193(ptr) AccessChain 75(data) 119 102 + 312: 20(ivec4) Load 311 + 313: 20(ivec4) SubgroupFirstInvocationKHR 312 + 314: 193(ptr) AccessChain 75(data) 310 102 + Store 314 313 + Branch 67 + 67: Label Return FunctionEnd diff --git a/3rdparty/glslang/Test/runtests b/3rdparty/glslang/Test/runtests index cc3430604..c50f1482a 100755 --- a/3rdparty/glslang/Test/runtests +++ b/3rdparty/glslang/Test/runtests @@ -239,6 +239,13 @@ $EXE -D -E hlsl.pp.expand.frag > $TARGETDIR/hlsl.pp.expand.frag.out 2> $TARGETDI diff -b $BASEDIR/hlsl.pp.expand.frag.out $TARGETDIR/hlsl.pp.expand.frag.out || HASERROR=1 diff -b $BASEDIR/hlsl.pp.expand.frag.err $TARGETDIR/hlsl.pp.expand.frag.err || HASERROR=1 +# +# Test --nan-clamp +# +echo "Testing nan-clamp" +$EXE --nan-clamp -H --aml --amb spv.400.frag > $TARGETDIR/spv.400.frag.nanclamp.out +diff -b $BASEDIR/spv.400.frag.nanclamp.out $TARGETDIR/spv.400.frag.nanclamp.out || HASERROR=1 + # # Final checking # diff --git a/3rdparty/glslang/Test/spv.functionParameterTypes.frag b/3rdparty/glslang/Test/spv.functionParameterTypes.frag new file mode 100644 index 000000000..08c168750 --- /dev/null +++ b/3rdparty/glslang/Test/spv.functionParameterTypes.frag @@ -0,0 +1,20 @@ +#version 460 core +#extension GL_EXT_shader_explicit_arithmetic_types_int64 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_int16 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable + +int f(int8_t i8, + uint8_t u8, + int16_t i16, + uint16_t u16, + int64_t i64, + uint64_t u64, + float16_t f16) +{ + return 0; +} + +void main() +{ +} diff --git a/3rdparty/glslang/Test/spv.memoryScopeSemantics.comp b/3rdparty/glslang/Test/spv.memoryScopeSemantics.comp index 88f54819e..037e6d7b3 100644 --- a/3rdparty/glslang/Test/spv.memoryScopeSemantics.comp +++ b/3rdparty/glslang/Test/spv.memoryScopeSemantics.comp @@ -19,6 +19,7 @@ layout (binding = 7) nonprivate uniform BufferK { uint x; } bufferk; shared uint64_t atomu64; shared int64_t atomi64; layout (binding = 8) volatile buffer BufferL { uint x; } bufferl; +layout (binding = 9) buffer BufferM { volatile uint x; } bufferm; void main() @@ -60,5 +61,10 @@ void main() atomicCompSwap(atomi64, int64_t(10), int64_t(atomu64), gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire); y = bufferl.x; + atomicAdd(bufferl.x, 1); + atomicOr(bufferm.x, 2); + imageAtomicAdd(imagei, ivec2(0,0), 3); + atomicAdd(bufferu.x, 4u, gl_ScopeDevice, 0, 0); + atomicAdd(bufferu.x, 5u, gl_ScopeDevice, 0, gl_SemanticsVolatile); } diff --git a/3rdparty/glslang/Test/spv.memoryScopeSemantics_Error.comp b/3rdparty/glslang/Test/spv.memoryScopeSemantics_Error.comp index 4e18b2e08..1b856717a 100644 --- a/3rdparty/glslang/Test/spv.memoryScopeSemantics_Error.comp +++ b/3rdparty/glslang/Test/spv.memoryScopeSemantics_Error.comp @@ -24,5 +24,7 @@ void main() uint origu = atomicCompSwap(atomu, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease); memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeVisible); memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeAvailable); + memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsVolatile); + atomicCompSwap(bufferi.x, 10u, 10u, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile, gl_StorageSemanticsBuffer, gl_SemanticsAcquire); } diff --git a/3rdparty/glslang/Test/spv.privateVariableTypes.frag b/3rdparty/glslang/Test/spv.privateVariableTypes.frag new file mode 100644 index 000000000..cb6981f7b --- /dev/null +++ b/3rdparty/glslang/Test/spv.privateVariableTypes.frag @@ -0,0 +1,17 @@ +#version 460 core +#extension GL_EXT_shader_explicit_arithmetic_types_int64 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_int16 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable + +int8_t i8; +uint8_t u8; +int16_t i16; +uint16_t u16; +int64_t i64; +uint64_t u64; +float16_t f16; + +void main() +{ +} diff --git a/3rdparty/glslang/glslang/Include/revision.h b/3rdparty/glslang/glslang/Include/revision.h index dd6c8da04..a22ceb4b9 100644 --- a/3rdparty/glslang/glslang/Include/revision.h +++ b/3rdparty/glslang/glslang/Include/revision.h @@ -1,3 +1,3 @@ // This header is generated by the make-revision script. -#define GLSLANG_PATCH_LEVEL 3226 +#define GLSLANG_PATCH_LEVEL 3276 diff --git a/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp index afaf2d6ff..fc362e0c5 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp @@ -6309,6 +6309,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV commonBuiltins.append("const int gl_SemanticsAcquireRelease = 0x8;\n"); commonBuiltins.append("const int gl_SemanticsMakeAvailable = 0x2000;\n"); commonBuiltins.append("const int gl_SemanticsMakeVisible = 0x4000;\n"); + commonBuiltins.append("const int gl_SemanticsVolatile = 0x8000;\n"); commonBuiltins.append("const int gl_StorageSemanticsNone = 0x0;\n"); commonBuiltins.append("const int gl_StorageSemanticsBuffer = 0x40;\n"); @@ -7899,19 +7900,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("readInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setFunctionExtensions("readFirstInvocationARB", 1, &E_GL_ARB_shader_ballot); - BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); - BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); - BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); - BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); - BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); - BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - - if (spvVersion.vulkan > 0) - // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan - SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); - else - BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); - if (version >= 430) { symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote); symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote); @@ -8172,7 +8160,22 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); } - + + if (profile != EEsProfile) { + BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); + BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); + BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); + BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); + BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); + BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); + + if (spvVersion.vulkan > 0) + // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan + SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + else + BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); + } + // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { @@ -8630,6 +8633,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_SemanticsAcquireRelease", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsMakeAvailable", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsMakeVisible", 1, &E_GL_KHR_memory_scope_semantics); + symbolTable.setVariableExtensions("gl_SemanticsVolatile", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsNone", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsBuffer", 1, &E_GL_KHR_memory_scope_semantics); diff --git a/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp index 8e570ae0e..57cc5f9d2 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -1641,6 +1641,7 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& const int gl_SemanticsAcquireRelease = 0x8; const int gl_SemanticsMakeAvailable = 0x2000; const int gl_SemanticsMakeVisible = 0x4000; + const int gl_SemanticsVolatile = 0x8000; //const int gl_StorageSemanticsNone = 0x0; const int gl_StorageSemanticsBuffer = 0x40; @@ -1730,7 +1731,8 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& gl_SemanticsRelease | gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable | - gl_SemanticsMakeVisible))) { + gl_SemanticsMakeVisible | + gl_SemanticsVolatile))) { error(loc, "Invalid semantics value", fnCandidate.getName().c_str(), ""); } if (((storageClassSemantics | storageClassSemantics2) & ~(gl_StorageSemanticsBuffer | @@ -1782,7 +1784,16 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& error(loc, "gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } - + if ((semantics & gl_SemanticsVolatile) && + (callNode.getOp() == EOpMemoryBarrier || callNode.getOp() == EOpBarrier)) { + error(loc, "gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier", + fnCandidate.getName().c_str(), ""); + } + if ((callNode.getOp() == EOpAtomicCompSwap || callNode.getOp() == EOpImageAtomicCompSwap) && + ((semantics ^ semantics2) & gl_SemanticsVolatile)) { + error(loc, "semEqual and semUnequal must either both include gl_SemanticsVolatile or neither", + fnCandidate.getName().c_str(), ""); + } } diff --git a/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp index 6f9db0195..c7e8a3428 100755 --- a/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -1791,6 +1791,7 @@ void TShader::setUniformLocationBase(int base) void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); } void TShader::setFlattenUniformArrays(bool flatten) { intermediate->setFlattenUniformArrays(flatten); } void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); } +void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); } void TShader::setResourceSetBinding(const std::vector& base) { intermediate->setResourceSetBinding(base); } void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } diff --git a/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h b/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h index 30ba98dbf..7b8bf7ff5 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h +++ b/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h @@ -266,7 +266,8 @@ public: needToLegalize(false), binaryDoubleOutput(false), usePhysicalStorageBuffer(false), - uniformLocationBase(0) + uniformLocationBase(0), + nanMinMaxClamp(false) { localSize[0] = 1; localSize[1] = 1; @@ -767,6 +768,9 @@ public: void setUniformLocationBase(int base) { uniformLocationBase = base; } int getUniformLocationBase() const { return uniformLocationBase; } + void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; } + bool getNanMinMaxClamp() const { return nanMinMaxClamp; } + void setNeedsLegalization() { needToLegalize = true; } bool needsLegalization() const { return needToLegalize; } @@ -900,6 +904,7 @@ protected: std::unordered_map uniformLocationOverrides; int uniformLocationBase; + bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN private: void operator=(TIntermediate&); // prevent assignments diff --git a/3rdparty/glslang/glslang/Public/ShaderLang.h b/3rdparty/glslang/glslang/Public/ShaderLang.h index 33f05e2cd..9d4ec6759 100755 --- a/3rdparty/glslang/glslang/Public/ShaderLang.h +++ b/3rdparty/glslang/glslang/Public/ShaderLang.h @@ -435,6 +435,7 @@ public: void setHlslIoMapping(bool hlslIoMap); void setFlattenUniformArrays(bool flatten); void setNoStorageFormat(bool useUnknownFormat); + void setNanMinMaxClamp(bool nanMinMaxClamp); void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode); // For setting up the environment (cleared to nothingness in the constructor). diff --git a/3rdparty/glslang/gtests/Spv.FromFile.cpp b/3rdparty/glslang/gtests/Spv.FromFile.cpp index e28f7aa6c..95f4d9802 100644 --- a/3rdparty/glslang/gtests/Spv.FromFile.cpp +++ b/3rdparty/glslang/gtests/Spv.FromFile.cpp @@ -325,6 +325,7 @@ INSTANTIATE_TEST_CASE_P( "spv.functionCall.frag", "spv.functionNestedOpaque.vert", "spv.functionSemantics.frag", + "spv.functionParameterTypes.frag", "spv.GeometryShaderPassthrough.geom", "spv.interpOps.frag", "spv.int64.frag", @@ -353,6 +354,7 @@ INSTANTIATE_TEST_CASE_P( "spv.precision.frag", "spv.precisionNonESSamp.frag", "spv.prepost.frag", + "spv.privateVariableTypes.frag", "spv.qualifiers.vert", "spv.sample.frag", "spv.sampleId.frag",