Lines Matching refs:std
48 #include "GLSL.std.450.h"
139 void dumpSpv(std::vector<unsigned int>& out);
157 spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector<unsigned int>& operands) const;
159 void TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>&, std::vector<unsigned>&) const;
165 void convertSwizzle(const glslang::TIntermAggregate&, std::vector<unsigned>& swizzle);
169 void applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional<int> member);
175 const glslang::TQualifier&, spv::Id, const std::vector<spv::Id>& spvMembers);
196 void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
198 void translateArguments(glslang::TIntermUnary& node, std::vector<spv::Id>& arguments);
215 std::vector<spv::Id>& operands, glslang::TBasicType typeProxy,
217 spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands,
220 spv::Id typeId, std::vector<spv::Id>& operands);
221 spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands,
224 std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
236 std::pair<spv::Id, spv::Id> getForcedType(glslang::TBuiltInVariable builtIn, const glslang::TType&);
238 spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
254 std::set<spv::Id> iOSet; // all input/output variables from either static use or declaration of interface
259 std::unordered_map<std::string, spv::Id> extBuiltinMap;
261 std::unordered_map<long long, spv::Id> symbolValues;
262 std::unordered_map<uint32_t, spv::Id> builtInVariableIds;
263 std::unordered_set<long long> rValueParameters; // set of formal function parameters passed as rValues,
265 std::unordered_map<std::string, spv::Function*> functionMap;
266 std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount];
268 std::unordered_map<long long, std::vector<int>> memberRemapper;
270 std::unordered_map<const glslang::TTypeList*, long long> glslangTypeToIdMap;
271 std::stack<bool> breakForLoop; // false means break for switch
272 std::unordered_map<std::string, const glslang::TIntermSymbol*> counterOriginator;
274 std::map<const glslang::TType *, spv::Id> forwardPointers;
278 std::unordered_map<spv::Id, spv::Id> forceType;
282 std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[4];
394 void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory,
1240 std::vector<unsigned int>& operands) const
1354 std::vector<unsigned>& literals) const
1567 std::string text;
1568 const std::vector<std::string>& processes = glslangIntermediate->getProcesses();
1582 const std::map<std::string, std::string>& include_txt = glslangIntermediate->getIncludeText();
1590 stdBuiltins = builder.import("GLSL.std.450");
1757 std::vector<spv::Id> dimConstId;
1892 std::vector<spv::Id> dimConstId;
1952 std::vector<unsigned> literals;
1961 std::vector<spv::Id> operandIds;
1998 void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
2105 std::string keyName = symbol->getName().c_str();
2110 std::string keyName = symbol->getName().c_str();
2224 std::vector<unsigned> swizzle;
2253 std::vector<int>& remapper = memberRemapper[glslangId];
2319 std::vector<unsigned> swizzle;
2408 std::vector<spv::Id> constituents;
2427 std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(glslang::TBuiltInVariable glslangBuiltIn,
2442 std::pair<spv::Id, spv::Id> ret(ivec4_type, uint64_type);
2451 std::pair<spv::Id, spv::Id> ret(mat43, mat34);
2458 std::pair<spv::Id, spv::Id> ret(spv::NoType, spv::NoType);
2482 std::vector<spv::Id> components;
2683 std::vector<unsigned> literals;
2696 resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()),
2792 spv::Id TGlslangToSpvTraverser::createCompositeConstruct(spv::Id resultTypeId, std::vector<spv::Id> constituents)
2802 std::vector<spv::Id> rTypeConstituents;
2811 std::vector<spv::Id> rTypeConstituents;
2833 std::vector<spv::Builder::AccessChain> complexLvalues; // for holding swizzling l-values too complex for
2835 std::vector<spv::Id> temporaryLvalues; // temporaries to pass, as proxies for complexLValues
3079 std::vector<spv::Id> arguments;
3096 std::vector<spv::Id> constituents;
3384 std::vector<spv::Id> operands;
3385 std::vector<spv::IdImmediate> memoryAccessOperands;
3654 std::vector<spv::IdImmediate> idImmOps;
3677 std::vector<spv::IdImmediate> idImmOps;
3696 std::vector<spv::IdImmediate> idImmOps;
3729 std::vector<spv::IdImmediate> idImmOps;
3746 std::vector<spv::IdImmediate> idImmOps;
3750 std::vector<unsigned> literals;
3765 resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()),
4028 std::vector<TIntermNode*> codeSegments;
4030 std::vector<int> caseValues;
4031 std::vector<int> valueIndexToSegment(sequence.size()); // note: probably not all are used, it is an overestimate
4051 std::vector<spv::Block*> segmentBlocks; // returned, as the blocks allocated in the call
4089 std::vector<unsigned int> operands;
4359 std::vector<unsigned> swizzle;
4365 void TGlslangToSpvTraverser::convertSwizzle(const glslang::TIntermAggregate& node, std::vector<unsigned>& swizzle)
4551 std::vector<spv::IdImmediate> operands;
4713 void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional<int> member)
4722 std::vector<unsigned> literals;
4742 std::vector<spv::Id> operandIds;
4756 std::vector<const char*> strings;
4814 std::vector<spv::Id> spvMembers;
4817 std::vector<std::pair<glslang::TType*, glslang::TQualifier> > deferredForwardPointers;
4848 deferredForwardPointers.push_back(std::make_pair(glslangMember.type, memberQualifier));
4896 const std::vector<spv::Id>& spvMembers)
4939 std::vector<spv::Decoration> memory;
5416 const auto getParamDecorations = [&](std::vector<spv::Decoration>& decorations, const glslang::TType& type,
5445 std::vector<spv::Id>(), // main function has no param
5446 std::vector<char const*>());
5464 std::vector<spv::Id> paramTypes;
5465 std::vector<char const*> paramNames;
5466 std::vector<std::vector<spv::Decoration>> paramDecorations; // list of decorations per parameter
5571 locationToSymbol[set].insert(std::make_pair(location, objNode));
5596 void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
5729 void TGlslangToSpvTraverser::translateArguments(glslang::TIntermUnary& node, std::vector<spv::Id>& arguments)
5765 std::vector<spv::Id> arguments;
5832 std::vector<spv::IdImmediate> operands;
5843 std::vector<spv::Id> comps;
5913 std::vector<spv::Id> result(1, builder.createOp(spv::OpImageRead, resultType(), operands));
6038 std::vector<spv::Id> operands;
6053 std::vector<spv::Id> operands;
6061 std::vector<spv::Id> comps;
6137 std::vector<spv::Id> indexes;
6247 std::vector<spv::Id> members;
6307 std::vector<spv::Id> result( 1,
6337 std::vector<spv::Builder::AccessChain> lValues;
6338 std::vector<spv::Id> rValues;
6339 std::vector<const glslang::TType*> argTypes;
6362 std::vector<spv::Id> spvArgs;
6462 std::swap(left, right);
6709 std::swap(left, right);
6760 std::vector<spv::Id> results;
6769 std::vector<unsigned int> indexes;
7077 std::vector<spv::Id> operands;
7134 std::vector<spv::Id> operands;
7173 std::vector<spv::Id> operands;
7310 std::vector<spv::Id> args;
7338 std::vector<spv::Id> results;
7342 std::vector<unsigned int> indexes;
7786 std::vector<spv::Id> components;
7794 spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy,
7972 std::vector<spv::Id> spvAtomicOperands; // hold the spv operands
8001 std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
8007 std::vector<spv::IdImmediate> spvGroupOperands;
8105 std::vector<spv::Id> components;
8211 spv::Id typeId, std::vector<spv::Id>& operands)
8233 std::vector<spv::Id> results;
8237 std::vector<unsigned int> indexes;
8240 std::vector<spv::IdImmediate> spvGroupOperands;
8270 std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
8577 std::vector<spv::IdImmediate> spvGroupOperands;
8612 spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
8677 std::swap(operands.front(), operands.back());
9191 std::vector<spv::Id> callArguments(operands.begin(), operands.begin() + consumedOperands);
9359 std::vector<spv::Id> operands;
9364 std::vector<spv::Id> args; // Dummy arguments
9395 std::vector<spv::Id> args; // Dummy arguments
9402 std::vector<spv::Id> args;
9410 std::vector<spv::Id> args;
9436 std::vector<spv::Id> args; // Dummy args
9571 std::vector<spv::Decoration> memory;
9743 std::vector<spv::Id> dimConstId;
9792 std::vector<spv::Id> spvConsts;
10027 std::vector<spv::Id> phiOperands;
10078 void GetSpirvVersion(std::string& version)
10106 bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
10108 std::ofstream out;
10109 out.open(baseName, std::ios::binary | std::ios::out);
10123 bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
10125 std::ofstream out;
10126 out.open(baseName, std::ios::binary | std::ios::out);
10134 GLSLANG_VERSION_FLAVOR << std::endl;
10136 out << "\t #pragma once" << std::endl;
10137 out << "const uint32_t " << varName << "[] = {" << std::endl;
10144 out << "0x" << std::hex << std::setw(8) << std::setfill('0') << word;
10149 out << std::endl;
10153 out << std::endl;
10162 void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>& spirv, SpvOptions* options)
10168 void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>& spirv,
10204 SpirvToolsDisassemble(std::cout, spirv);