Lines Matching refs:Id
84 Id Builder::import(const char* name)
124 spv::Id strId = getStringId(filename);
133 void Builder::addLine(Id fileName, int lineNum, int column)
142 void Builder::addDebugScopeAndLine(Id fileName, int lineNum, int column)
146 spv::Id resultId = getUniqueId();
154 spv::Id resultId = getUniqueId();
167 Id Builder::makeVoidType()
171 Id typeId = getUniqueId();
185 Id Builder::makeBoolType()
206 Id Builder::makeSamplerType()
226 Id Builder::makePointer(StorageClass storageClass, Id pointee)
248 Id Builder::makeForwardPointer(StorageClass storageClass)
261 Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardPointerType, Id pointee)
282 Id Builder::makeIntegerType(int width, bool hasSign)
323 Id Builder::makeFloatType(int width)
365 Id Builder::makeStructType(const std::vector<Id>& members, const char* name, bool const compilerGenerated)
390 Id Builder::makeStructResultType(Id type0, Id type1)
405 std::vector<spv::Id> members;
412 Id Builder::makeVectorType(Id component, int size)
440 Id Builder::makeMatrixType(Id component, int cols, int rows)
444 Id column = makeVectorType(component, rows);
472 Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use)
500 Id Builder::makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols)
524 Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType)
535 Id Builder::makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands)
570 // 'size' is an Id of a constant or specialization constant of the array size
571 Id Builder::makeArrayType(Id element, Id sizeId, int stride)
601 Id Builder::makeRuntimeArray(Id element)
617 Id Builder::makeFunctionType(Id returnType, const std::vector<Id>& paramTypes)
642 Id debugTypeId = makeDebugFunctionType(returnType, {});
650 Id typeId = getUniqueId();
661 Id debugTypeId = makeDebugFunctionType(returnType, paramTypes);
668 Id Builder::makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTypes)
672 Id typeId = getUniqueId();
691 Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled,
789 Id Builder::makeSampledImageType(Id imageType)
816 Id Builder::makeDebugInfoNone()
833 Id Builder::makeBoolDebugType(int const size)
861 Id Builder::makeIntegerDebugType(int const width, bool const hasSign)
901 Id Builder::makeFloatDebugType(int const width)
936 Id Builder::makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType)
964 Id Builder::makeArrayDebugType(Id const baseType, Id const componentCount)
969 Id Builder::makeVectorDebugType(Id const baseType, int const componentCount)
974 Id Builder::makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor)
1000 Id Builder::makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc)
1025 Id Builder::makeCompositeDebugType(std::vector<Id> const& memberTypes, char const*const name,
1029 std::vector<Id> memberDebugTypes;
1073 Id Builder::makeDebugSource(const Id fileName) {
1076 spv::Id resultId = getUniqueId();
1082 spv::Id sourceId = 0;
1098 Id Builder::makeDebugCompilationUnit() {
1101 spv::Id resultId = getUniqueId();
1121 Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id const variable)
1144 Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber)
1169 Id Builder::makeDebugExpression()
1186 Id Builder::makeDebugDeclare(Id const debugLocalVariable, Id const pointer)
1199 Id Builder::makeDebugValue(Id const debugLocalVariable, Id const value)
1212 Id Builder::makeAccelerationStructureType()
1227 Id Builder::makeRayQueryType()
1242 Id Builder::makeHitObjectNVType()
1257 Id Builder::getDerefTypeId(Id resultId) const
1259 Id typeId = getTypeId(resultId);
1265 Op Builder::getMostBasicTypeClass(Id typeId) const
1284 int Builder::getNumTypeConstituents(Id typeId) const
1300 Id lengthId = instr->getIdOperand(1);
1318 Id Builder::getScalarTypeId(Id typeId) const
1344 Id Builder::getContainedTypeId(Id typeId, int member) const
1369 Id Builder::getResultingAccessChainType() const
1372 Id typeId = getTypeId(accessChain.base);
1389 Id Builder::getContainedTypeId(Id typeId) const
1397 bool Builder::containsType(Id typeId, spv::Op typeOp, unsigned int width) const
1427 bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const
1451 Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value)
1466 Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2)
1531 Id Builder::makeNullConstant(Id typeId)
1536 Id existing = NoResult;
1555 Id Builder::makeBoolConstant(bool b, bool specConstant)
1557 Id typeId = makeBoolType();
1564 Id existing = 0;
1584 Id Builder::makeIntConstant(Id typeId, unsigned value, bool specConstant)
1591 Id existing = findScalarConstant(OpTypeInt, opcode, typeId, value);
1605 Id Builder::makeInt64Constant(Id typeId, unsigned long long value, bool specConstant)
1615 Id existing = findScalarConstant(OpTypeInt, opcode, typeId, op1, op2);
1630 Id Builder::makeFloatConstant(float f, bool specConstant)
1633 Id typeId = makeFloatType(32);
1641 Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value);
1655 Id Builder::makeDoubleConstant(double d, bool specConstant)
1658 Id typeId = makeFloatType(64);
1668 Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, op1, op2);
1683 Id Builder::makeFloat16Constant(float f16, bool specConstant)
1686 Id typeId = makeFloatType(16);
1697 Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value);
1711 Id Builder::makeFpConstant(Id type, double d, bool specConstant)
1732 Id Builder::importNonSemanticShaderDebugInfoInstructions()
1745 Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector<Id>& comps)
1772 Id Builder::findStructConstant(Id typeId, const std::vector<Id>& comps)
1797 Id Builder::makeCompositeConstant(Id typeId, const std::vector<Id>& members, bool specConstant)
1810 Id existing = findCompositeConstant(typeClass, typeId, members);
1817 Id existing = findStructConstant(typeId, members);
1887 void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector<Id>& operandIds)
1902 void Builder::addName(Id id, const char* string)
1911 void Builder::addMemberName(Id id, int memberNumber, const char* string)
1921 void Builder::addDecoration(Id id, Decoration decoration, int num)
1935 void Builder::addDecoration(Id id, Decoration decoration, const char* s)
1948 void Builder::addDecoration(Id id, Decoration decoration, const std::vector<unsigned>& literals)
1962 void Builder::addDecoration(Id id, Decoration decoration, const std::vector<const char*>& strings)
1976 void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) {
1986 void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
1999 void Builder::addDecorationId(Id id, Decoration decoration, const std::vector<Id>& operandIds)
2014 void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num)
2029 void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const char *s)
2043 void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<unsigned>& literals)
2058 void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<const char*>& strings)
2094 Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
2095 const std::vector<Id>& paramTypes,
2099 Id typeId = makeFunctionType(returnType, paramTypes);
2100 Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size());
2101 Id funcId = getUniqueId();
2133 void Builder::setupDebugFunctionEntry(Function* function, const char* name, int line, const std::vector<Id>& paramTypes,
2141 Id nameId = getStringId(unmangleFunctionName(name));
2142 Id funcTypeId = function->getFuncTypeId();
2144 Id funcId = function->getId();
2149 Id debugFuncId = makeDebugFunction(function, nameId, funcTypeId);
2158 Id firstParamId = function->getParamId(0);
2162 Id paramTypeId = paramTypes[p];
2172 auto const paramId = static_cast<Id>(firstParamId + p);
2188 Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId)
2195 Id funcId = getUniqueId();
2213 Id Builder::makeDebugLexicalBlock(uint32_t line) {
2216 Id lexId = getUniqueId();
2241 void Builder::makeReturn(bool implicit, Id retVal)
2258 Id lexId = makeDebugLexicalBlock(line);
2283 Id funcId = function->getFuncId();
2286 spv::Id resultId = getUniqueId();
2296 Id funcId = function->getFuncId();
2333 void Builder::makeStatementTerminator(spv::Op opcode, const std::vector<Id>& operands, const char* name)
2343 Id Builder::createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name, Id initializer,
2346 Id pointerType = makePointer(storageClass, type);
2387 Id Builder::createUndefined(Id type)
2415 void Builder::createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess, spv::Scope scope,
2438 Id Builder::createLoad(Id lValue, spv::Decoration precision, spv::MemoryAccessMask memoryAccess,
2463 Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vector<Id>& offsets)
2466 Id typeId = getResultingAccessChainType();
2479 Id Builder::createArrayLength(Id base, unsigned int member)
2481 spv::Id intType = makeUintType(32);
2490 Id Builder::createCooperativeMatrixLengthKHR(Id type)
2492 spv::Id intType = makeUintType(32);
2497 return createSpecConstantOp(OpCooperativeMatrixLengthKHR, intType, std::vector<Id>(1, type), std::vector<Id>());
2507 Id Builder::createCooperativeMatrixLengthNV(Id type)
2509 spv::Id intType = makeUintType(32);
2514 return createSpecConstantOp(OpCooperativeMatrixLengthNV, intType, std::vector<Id>(1, type), std::vector<Id>());
2524 Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index)
2529 return createSpecConstantOp(OpCompositeExtract, typeId, std::vector<Id>(1, composite),
2530 std::vector<Id>(1, index));
2540 Id Builder::createCompositeExtract(Id composite, Id typeId, const std::vector<unsigned>& indexes)
2545 return createSpecConstantOp(OpCompositeExtract, typeId, std::vector<Id>(1, composite), indexes);
2556 Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, unsigned index)
2567 Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, const std::vector<unsigned>& indexes)
2579 Id Builder::createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex)
2589 Id Builder::createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex)
2608 void Builder::createNoResultOp(Op opCode, Id operand)
2616 void Builder::createNoResultOp(Op opCode, const std::vector<Id>& operands)
2656 Id Builder::createUnaryOp(Op opCode, Id typeId, Id operand)
2661 return createSpecConstantOp(opCode, typeId, std::vector<Id>(1, operand), std::vector<Id>());
2670 Id Builder::createBinOp(Op opCode, Id typeId, Id left, Id right)
2675 std::vector<Id> operands(2);
2677 return createSpecConstantOp(opCode, typeId, operands, std::vector<Id>());
2687 Id Builder::createTriOp(Op opCode, Id typeId, Id op1, Id op2, Id op3)
2692 std::vector<Id> operands(3);
2697 opCode, typeId, operands, std::vector<Id>());
2708 Id Builder::createOp(Op opCode, Id typeId, const std::vector<Id>& operands)
2718 Id Builder::createOp(Op opCode, Id typeId, const std::vector<IdImmediate>& operands)
2732 Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector<Id>& operands,
2755 Id Builder::createFunctionCall(spv::Function* function, const std::vector<spv::Id>& args)
2767 Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, const std::vector<unsigned>& channels)
2773 std::vector<Id> operands(2);
2789 Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, const std::vector<unsigned>& channels)
2822 void Builder::promoteScalar(Decoration precision, Id& left, Id& right)
2835 Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType)
2846 auto members = std::vector<spv::Id>(numComponents, scalar);
2868 Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const std::vector<Id>& args)
2883 Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather,
2886 std::vector<Id> texArgs;
3040 Id smearedType = resultType;
3054 Id typeId0 = 0;
3055 Id typeId1 = 0;
3074 Id resultId = textureInst->getResultId();
3095 Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters, bool isUnsignedResult)
3098 Id resultType = 0;
3126 Id intType = isUnsignedResult ? makeUintType(32) : makeIntType(32);
3160 Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, bool equal)
3162 Id boolType = makeBoolType();
3163 Id valueType = getTypeId(value1);
3165 Id resultId = NoResult;
3211 Id constituentType1 = getContainedTypeId(getTypeId(value1), constituent);
3212 Id constituentType2 = getContainedTypeId(getTypeId(value2), constituent);
3213 Id constituent1 = createCompositeExtract(value1, constituentType1, indexes);
3214 Id constituent2 = createCompositeExtract(value2, constituentType2, indexes);
3216 Id subResultId = createCompositeCompare(precision, constituent1, constituent2, equal);
3229 Id Builder::createCompositeConstruct(Id typeId, const std::vector<Id>& constituents)
3245 [&](spv::Id id) { return isSpecConstant(id); }));
3257 Id Builder::createConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId)
3259 Id result = NoResult;
3269 std::vector<Id> constituents;
3270 Id scalarTypeId = getScalarTypeId(resultTypeId);
3273 const auto latchResult = [&](Id comp) {
3282 const auto accumulateVectorConstituents = [&](Id sourceArg) {
3296 const auto accumulateMatrixConstituents = [&](Id sourceArg) {
3309 std::vector<Id> indexes;
3342 Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId)
3344 Id componentTypeId = getScalarTypeId(resultTypeId);
3356 Id matrix = sources[0];
3357 Id columnTypeId = getContainedTypeId(resultTypeId);
3358 Id sourceColumnTypeId = getContainedTypeId(getTypeId(matrix));
3364 std::vector<Id> matrixColumns;
3368 Id colv = createCompositeExtract(matrix, sourceColumnTypeId, indexes);
3388 Id ids[maxMatrixSize][maxMatrixSize];
3389 Id one = (bitCount == 64 ? makeDoubleConstant(1.0) : makeFloatConstant(1.0));
3390 Id zero = (bitCount == 64 ? makeDoubleConstant(0.0) : makeFloatConstant(0.0));
3407 Id matrix = sources[0];
3426 Id argComp = sources[arg];
3449 Id columnTypeId = getContainedTypeId(resultTypeId);
3450 std::vector<Id> matrixColumns;
3452 std::vector<Id> vectorComponents;
3455 Id column = createCompositeConstruct(columnTypeId, vectorComponents);
3465 Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) :
3521 void Builder::makeSwitch(Id selector, unsigned int control, int numSegments, const std::vector<int>& caseValues,
3644 void Builder::accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType,
3671 void Builder::accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
3685 Id base = collapseAccessChain();
3694 Id source = createCompositeExtract(rvalue, getContainedTypeId(getTypeId(rvalue)), i);
3706 Id base = collapseAccessChain();
3709 Id source = rvalue;
3717 Id tempBaseId = createLoad(base, spv::NoPrecision);
3732 Id Builder::accessChainLoad(Decoration precision, Decoration l_nonUniform,
3733 Decoration r_nonUniform, Id resultType, spv::MemoryAccessMask memoryAccess,
3736 Id id;
3742 Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType;
3760 Id lValue = NoResult;
3811 Id swizzledType = getScalarTypeId(getTypeId(id));
3825 Id Builder::accessChainGetLValue()
3830 Id lvalue = collapseAccessChain();
3842 Id Builder::accessChainGetInferredType()
3847 Id type = getTypeId(accessChain.base);
3936 Id Builder::collapseAccessChain()
3981 std::vector<Id> components;
3984 Id mapType = makeVectorType(makeUintType(32), (int)accessChain.swizzle.size());
3985 Id map = makeCompositeConstant(mapType, components);
4090 void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock)
4104 void Builder::dumpSourceInstructions(const spv::Id fileId, const std::string& text,