Lines Matching refs:SpvId
238 void SPIRVCodeGenerator::writeLabel(SpvId label, OutputStream& out) { in writeLabel()
368 this->writeInstruction(SpvOpCapability, (SpvId) i, out); in writeCapabilities()
379 SpvId SPIRVCodeGenerator::nextId() { in nextId()
384 SpvId resultId) { in writeStruct()
388 std::vector<SpvId> types; in writeStruct()
394 for (SpvId id : types) { in writeStruct()
424 this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, SpvDecorationOffset, in writeStruct()
425 (SpvId) offset, fDecorationBuffer); in writeStruct()
431 (SpvId) memoryLayout.stride(*field.fType), in writeStruct()
435 this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, in writeStruct()
472 SpvId SPIRVCodeGenerator::getType(const Type& type) { in getType()
476 SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layout) { in getType()
481 SpvId result = this->nextId(); in getType()
534 SpvId image = result; in getType()
574 SpvId SPIRVCodeGenerator::getImageType(const Type& type) { in getImageType()
582 SpvId SPIRVCodeGenerator::getFunctionType(const FunctionDeclaration& function) { in getFunctionType()
593 SpvId result = this->nextId(); in getFunctionType()
595 SpvId returnType = this->getType(function.fReturnType); in getFunctionType()
596 std::vector<SpvId> parameterTypes; in getFunctionType()
630 for (SpvId id : parameterTypes) { in getFunctionType()
639 SpvId SPIRVCodeGenerator::getPointerType(const Type& type, SpvStorageClass_ storageClass) { in getPointerType()
643 SpvId SPIRVCodeGenerator::getPointerType(const Type& rawType, const MemoryLayout& layout, in getPointerType()
649 SpvId result = this->nextId(); in getPointerType()
658 SpvId SPIRVCodeGenerator::writeExpression(const Expression& expr, OutputStream& out) { in writeExpression()
695 SpvId SPIRVCodeGenerator::writeIntrinsicCall(const FunctionCall& c, OutputStream& out) { in writeIntrinsicCall()
717 SpvId result = this->nextId(); in writeIntrinsicCall()
718 std::vector<SpvId> arguments; in writeIntrinsicCall()
731 for (SpvId id : arguments) { in writeIntrinsicCall()
737 SpvId result = this->nextId(); in writeIntrinsicCall()
738 std::vector<SpvId> arguments; in writeIntrinsicCall()
753 for (SpvId id : arguments) { in writeIntrinsicCall()
765 std::vector<SpvId> SPIRVCodeGenerator::vectorize( in vectorize()
779 std::vector<SpvId> result; in vectorize()
781 SpvId raw = this->writeExpression(*a, out); in vectorize()
783 SpvId vector = this->nextId(); in vectorize()
799 void SPIRVCodeGenerator::writeGLSLExtendedInstruction(const Type& type, SpvId id, SpvId floatInst, in writeGLSLExtendedInstruction()
800 SpvId signedInst, SpvId unsignedInst, in writeGLSLExtendedInstruction()
801 const std::vector<SpvId>& args, in writeGLSLExtendedInstruction()
817 for (SpvId a : args) { in writeGLSLExtendedInstruction()
822 SpvId SPIRVCodeGenerator::writeSpecialIntrinsic(const FunctionCall& c, SpecialIntrinsic kind, in writeSpecialIntrinsic()
824 SpvId result = this->nextId(); in writeSpecialIntrinsic()
827 std::vector<SpvId> arguments; in writeSpecialIntrinsic()
836 for (SpvId id : arguments) { in writeSpecialIntrinsic()
843 SpvId img = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
844 SpvId sampler = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
854 SpvId img = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
859 SpvId coords = this->writeConstantVector(ctor); in writeSpecialIntrinsic()
869 SpvId sample = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
911 SpvId type = this->getType(c.fType); in writeSpecialIntrinsic()
912 SpvId sampler = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
913 SpvId uv = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
935 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
957 SpvId fn = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
964 SpvId flipped = this->nextId(); in writeSpecialIntrinsic()
972 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
979 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
986 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
993 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
1005 std::vector<SpvId> spvArgs = this->vectorize(finalArgs, out); in writeSpecialIntrinsic()
1014 SpvId SPIRVCodeGenerator::writeFunctionCall(const FunctionCall& c, OutputStream& out) { in writeFunctionCall()
1020 std::vector<std::tuple<SpvId, const Type*, std::unique_ptr<LValue>>> lvalues; in writeFunctionCall()
1021 std::vector<SpvId> arguments; in writeFunctionCall()
1025 SpvId tmpVar; in writeFunctionCall()
1027 SpvId tmpValueId; in writeFunctionCall()
1030 SpvId ptr = lv->getPointer(); in writeFunctionCall()
1056 SpvId result = this->nextId(); in writeFunctionCall()
1061 for (SpvId id : arguments) { in writeFunctionCall()
1067 SpvId load = this->nextId(); in writeFunctionCall()
1076 SpvId SPIRVCodeGenerator::writeConstantVector(const Constructor& c) { in writeConstantVector()
1078 SpvId result = this->nextId(); in writeConstantVector()
1079 std::vector<SpvId> arguments; in writeConstantVector()
1083 SpvId type = this->getType(c.fType); in writeConstantVector()
1097 for (SpvId id : arguments) { in writeConstantVector()
1104 SpvId SPIRVCodeGenerator::writeFloatConstructor(const Constructor& c, OutputStream& out) { in writeFloatConstructor()
1108 SpvId result = this->nextId(); in writeFloatConstructor()
1109 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeFloatConstructor()
1121 SpvId SPIRVCodeGenerator::writeIntConstructor(const Constructor& c, OutputStream& out) { in writeIntConstructor()
1125 SpvId result = this->nextId(); in writeIntConstructor()
1126 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeIntConstructor()
1139 SpvId SPIRVCodeGenerator::writeUIntConstructor(const Constructor& c, OutputStream& out) { in writeUIntConstructor()
1143 SpvId result = this->nextId(); in writeUIntConstructor()
1144 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeUIntConstructor()
1156 void SPIRVCodeGenerator::writeUniformScaleMatrix(SpvId id, SpvId diagonal, const Type& type, in writeUniformScaleMatrix()
1159 SpvId zeroId = this->writeFloatLiteral(zero); in writeUniformScaleMatrix()
1160 std::vector<SpvId> columnIds; in writeUniformScaleMatrix()
1166 SpvId columnId = this->nextId(); in writeUniformScaleMatrix()
1178 for (SpvId id : columnIds) { in writeUniformScaleMatrix()
1184 void SPIRVCodeGenerator::writeMatrixCopy(SpvId id, SpvId src, const Type& srcType, in writeMatrixCopy()
1189 SpvId srcColumnType = this->getType(srcType.componentType().toCompound(fContext, in writeMatrixCopy()
1192 SpvId dstColumnType = this->getType(dstType.componentType().toCompound(fContext, in writeMatrixCopy()
1195 SpvId zeroId; in writeMatrixCopy()
1205 SpvId zeroColumn = 0; in writeMatrixCopy()
1206 SpvId columns[4]; in writeMatrixCopy()
1210 SpvId srcColumn = this->nextId(); in writeMatrixCopy()
1213 SpvId dstColumn; in writeMatrixCopy()
1270 void SPIRVCodeGenerator::addColumnEntry(SpvId columnType, Precision precision, in addColumnEntry()
1271 std::vector<SpvId>* currentColumn, in addColumnEntry()
1272 std::vector<SpvId>* columnIds, in addColumnEntry()
1273 int* currentCount, int rows, SpvId entry, in addColumnEntry()
1282 SpvId columnId = this->nextId(); in addColumnEntry()
1285 for (SpvId id : *currentColumn) { in addColumnEntry()
1293 SpvId SPIRVCodeGenerator::writeMatrixConstructor(const Constructor& c, OutputStream& out) { in writeMatrixConstructor()
1297 std::vector<SpvId> arguments; in writeMatrixConstructor()
1301 SpvId result = this->nextId(); in writeMatrixConstructor()
1311 SpvId componentType = this->getType(c.fType.componentType()); in writeMatrixConstructor()
1312 SpvId v[4]; in writeMatrixConstructor()
1317 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, 2, 1)); in writeMatrixConstructor()
1318 SpvId column1 = this->nextId(); in writeMatrixConstructor()
1320 SpvId column2 = this->nextId(); in writeMatrixConstructor()
1325 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, rows, 1)); in writeMatrixConstructor()
1326 std::vector<SpvId> columnIds; in writeMatrixConstructor()
1328 std::vector<SpvId> currentColumn; in writeMatrixConstructor()
1342 SpvId componentType = this->getType(c.fArguments[i]->fType.componentType()); in writeMatrixConstructor()
1344 SpvId swizzle = this->nextId(); in writeMatrixConstructor()
1357 for (SpvId id : columnIds) { in writeMatrixConstructor()
1365 SpvId SPIRVCodeGenerator::writeVectorConstructor(const Constructor& c, OutputStream& out) { in writeVectorConstructor()
1372 std::vector<SpvId> arguments; in writeVectorConstructor()
1380 SpvId vec = this->writeExpression(*c.fArguments[i], out); in writeVectorConstructor()
1438 SpvId swizzle = this->nextId(); in writeVectorConstructor()
1442 SpvId cast = this->nextId(); in writeVectorConstructor()
1453 SpvId result = this->nextId(); in writeVectorConstructor()
1466 for (SpvId id : arguments) { in writeVectorConstructor()
1473 SpvId SPIRVCodeGenerator::writeArrayConstructor(const Constructor& c, OutputStream& out) { in writeArrayConstructor()
1477 std::vector<SpvId> arguments; in writeArrayConstructor()
1481 SpvId result = this->nextId(); in writeArrayConstructor()
1485 for (SpvId id : arguments) { in writeArrayConstructor()
1491 SpvId SPIRVCodeGenerator::writeConstructor(const Constructor& c, OutputStream& out) { in writeConstructor()
1561 std::vector<SpvId> SPIRVCodeGenerator::getAccessChain(const Expression& expr, OutputStream& out) { in getAccessChain()
1562 std::vector<SpvId> chain; in getAccessChain()
1578 SpvId id = this->getLValue(expr, out)->getPointer(); in getAccessChain()
1588 PointerLValue(SPIRVCodeGenerator& gen, SpvId pointer, SpvId type, in PointerLValue()
1595 virtual SpvId getPointer() override { in getPointer()
1599 virtual SpvId load(OutputStream& out) override { in load()
1600 SpvId result = fGen.nextId(); in load()
1606 virtual void store(SpvId value, OutputStream& out) override { in store()
1612 const SpvId fPointer;
1613 const SpvId fType;
1619 SwizzleLValue(SPIRVCodeGenerator& gen, SpvId vecPointer, const std::vector<int>& components, in SwizzleLValue()
1629 virtual SpvId getPointer() override { in getPointer()
1633 virtual SpvId load(OutputStream& out) override { in load()
1634 SpvId base = fGen.nextId(); in load()
1637 SpvId result = fGen.nextId(); in load()
1650 virtual void store(SpvId value, OutputStream& out) override { in store()
1661 SpvId base = fGen.nextId(); in store()
1663 SpvId shuffle = fGen.nextId(); in store()
1691 const SpvId fVecPointer;
1703 SpvId type; in getLValue()
1720 std::vector<SpvId> chain = this->getAccessChain(expr, out); in getLValue()
1721 SpvId member = this->nextId(); in getLValue()
1722 this->writeOpCode(SpvOpAccessChain, (SpvId) (3 + chain.size()), out); in getLValue()
1725 for (SpvId idx : chain) { in getLValue()
1737 SpvId base = this->getLValue(*swizzle.fBase, out)->getPointer(); in getLValue()
1741 SpvId member = this->nextId(); in getLValue()
1766 SpvId test = this->writeExpression(*t.fTest, out); in getLValue()
1767 SpvId end = this->nextId(); in getLValue()
1768 SpvId ifTrueLabel = this->nextId(); in getLValue()
1769 SpvId ifFalseLabel = this->nextId(); in getLValue()
1773 SpvId ifTrue = this->getLValue(*t.fIfTrue, out)->getPointer(); in getLValue()
1777 SpvId ifFalse = this->getLValue(*t.fIfFalse, out)->getPointer(); in getLValue()
1781 SpvId result = this->nextId(); in getLValue()
1795 SpvId result = this->nextId(); in getLValue()
1796 SpvId type = this->getPointerType(expr.fType, SpvStorageClassFunction); in getLValue()
1808 SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, OutputStream& out) { in writeVariableReference()
1809 SpvId result = this->nextId(); in writeVariableReference()
1812 SpvId var = entry->second; in writeVariableReference()
1818 if (fRTHeightStructId == (SpvId) -1) { in writeVariableReference()
1821 SkASSERT(fRTHeightFieldIndex == (SpvId) -1); in writeVariableReference()
1856 SkASSERT(fRTHeightFieldIndex != (SpvId) -1); in writeVariableReference()
1858 SpvId xId = this->nextId(); in writeVariableReference()
1862 SpvId fieldIndexId = this->writeIntLiteral(fieldIndex); in writeVariableReference()
1863 SpvId heightPtr = this->nextId(); in writeVariableReference()
1869 SpvId heightRead = this->nextId(); in writeVariableReference()
1872 SpvId rawYId = this->nextId(); in writeVariableReference()
1875 SpvId flippedYId = this->nextId(); in writeVariableReference()
1879 SpvId zeroId = writeFloatLiteral(zero); in writeVariableReference()
1881 SpvId wId = this->nextId(); in writeVariableReference()
1884 SpvId flipped = this->nextId(); in writeVariableReference()
1898 SpvId inverse = this->nextId(); in writeVariableReference()
1906 SpvId SPIRVCodeGenerator::writeIndexExpression(const IndexExpression& expr, OutputStream& out) { in writeIndexExpression()
1908 SpvId base = this->writeExpression(*expr.fBase, out); in writeIndexExpression()
1909 SpvId index = this->writeExpression(*expr.fIndex, out); in writeIndexExpression()
1910 SpvId result = this->nextId(); in writeIndexExpression()
1918 SpvId SPIRVCodeGenerator::writeFieldAccess(const FieldAccess& f, OutputStream& out) { in writeFieldAccess()
1922 SpvId SPIRVCodeGenerator::writeSwizzle(const Swizzle& swizzle, OutputStream& out) { in writeSwizzle()
1923 SpvId base = this->writeExpression(*swizzle.fBase, out); in writeSwizzle()
1924 SpvId result = this->nextId(); in writeSwizzle()
1934 SpvId other = base; in writeSwizzle()
1939 SpvId zeroId = this->writeFloatLiteral(zero); in writeSwizzle()
1941 SpvId oneId = this->writeFloatLiteral(one); in writeSwizzle()
1942 SpvId type = this->getType(*fContext.fFloat2_Type); in writeSwizzle()
1968 SpvId SPIRVCodeGenerator::writeBinaryOperation(const Type& resultType, in writeBinaryOperation()
1969 const Type& operandType, SpvId lhs, in writeBinaryOperation()
1970 SpvId rhs, SpvOp_ ifFloat, SpvOp_ ifInt, in writeBinaryOperation()
1972 SpvId result = this->nextId(); in writeBinaryOperation()
1994 SpvId SPIRVCodeGenerator::foldToBool(SpvId id, const Type& operandType, SpvOp op, in foldToBool()
1997 SpvId result = this->nextId(); in foldToBool()
2004 SpvId SPIRVCodeGenerator::writeMatrixComparison(const Type& operandType, SpvId lhs, SpvId rhs, in writeMatrixComparison()
2010 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeMatrixComparison()
2013 SpvId bvecType = this->getType(fContext.fBool_Type->toCompound(fContext, in writeMatrixComparison()
2016 SpvId boolType = this->getType(*fContext.fBool_Type); in writeMatrixComparison()
2017 SpvId result = 0; in writeMatrixComparison()
2019 SpvId columnL = this->nextId(); in writeMatrixComparison()
2021 SpvId columnR = this->nextId(); in writeMatrixComparison()
2023 SpvId compare = this->nextId(); in writeMatrixComparison()
2025 SpvId merge = this->nextId(); in writeMatrixComparison()
2028 SpvId next = this->nextId(); in writeMatrixComparison()
2039 SpvId SPIRVCodeGenerator::writeComponentwiseMatrixBinary(const Type& operandType, SpvId lhs, in writeComponentwiseMatrixBinary()
2040 SpvId rhs, SpvOp_ floatOperator, in writeComponentwiseMatrixBinary()
2045 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeComponentwiseMatrixBinary()
2048 SpvId columns[4]; in writeComponentwiseMatrixBinary()
2050 SpvId columnL = this->nextId(); in writeComponentwiseMatrixBinary()
2052 SpvId columnR = this->nextId(); in writeComponentwiseMatrixBinary()
2057 SpvId result = this->nextId(); in writeComponentwiseMatrixBinary()
2078 SpvId SPIRVCodeGenerator::writeBinaryExpression(const Type& leftType, SpvId lhs, Token::Kind op, in writeBinaryExpression()
2079 const Type& rightType, SpvId rhs, in writeBinaryExpression()
2089 SpvId one = this->writeExpression(*create_literal_1(fContext, rightType), out); in writeBinaryExpression()
2090 SpvId inverse = this->nextId(); in writeBinaryExpression()
2096 SpvId result = this->nextId(); in writeBinaryExpression()
2102 SpvId vec = this->nextId(); in writeBinaryExpression()
2114 SpvId result = this->nextId(); in writeBinaryExpression()
2120 SpvId vec = this->nextId(); in writeBinaryExpression()
2140 SpvId result = this->nextId(); in writeBinaryExpression()
2144 SpvId result = this->nextId(); in writeBinaryExpression()
2243 SpvId result = this->nextId(); in writeBinaryExpression()
2281 SpvId SPIRVCodeGenerator::writeBinaryExpression(const BinaryExpression& b, OutputStream& out) { in writeBinaryExpression()
2285 SpvId rhs = this->writeExpression(*b.fRight, out); in writeBinaryExpression()
2298 SpvId lhs; in writeBinaryExpression()
2306 SpvId rhs = this->writeExpression(*b.fRight, out); in writeBinaryExpression()
2307 SpvId result = this->writeBinaryExpression(b.fLeft->fType, lhs, remove_assignment(b.fOperator), in writeBinaryExpression()
2315 SpvId SPIRVCodeGenerator::writeLogicalAnd(const BinaryExpression& a, OutputStream& out) { in writeLogicalAnd()
2318 SpvId falseConstant = this->writeBoolLiteral(falseLiteral); in writeLogicalAnd()
2319 SpvId lhs = this->writeExpression(*a.fLeft, out); in writeLogicalAnd()
2320 SpvId rhsLabel = this->nextId(); in writeLogicalAnd()
2321 SpvId end = this->nextId(); in writeLogicalAnd()
2322 SpvId lhsBlock = fCurrentBlock; in writeLogicalAnd()
2326 SpvId rhs = this->writeExpression(*a.fRight, out); in writeLogicalAnd()
2327 SpvId rhsBlock = fCurrentBlock; in writeLogicalAnd()
2330 SpvId result = this->nextId(); in writeLogicalAnd()
2336 SpvId SPIRVCodeGenerator::writeLogicalOr(const BinaryExpression& o, OutputStream& out) { in writeLogicalOr()
2339 SpvId trueConstant = this->writeBoolLiteral(trueLiteral); in writeLogicalOr()
2340 SpvId lhs = this->writeExpression(*o.fLeft, out); in writeLogicalOr()
2341 SpvId rhsLabel = this->nextId(); in writeLogicalOr()
2342 SpvId end = this->nextId(); in writeLogicalOr()
2343 SpvId lhsBlock = fCurrentBlock; in writeLogicalOr()
2347 SpvId rhs = this->writeExpression(*o.fRight, out); in writeLogicalOr()
2348 SpvId rhsBlock = fCurrentBlock; in writeLogicalOr()
2351 SpvId result = this->nextId(); in writeLogicalOr()
2357 SpvId SPIRVCodeGenerator::writeTernaryExpression(const TernaryExpression& t, OutputStream& out) { in writeTernaryExpression()
2358 SpvId test = this->writeExpression(*t.fTest, out); in writeTernaryExpression()
2361 SpvId result = this->nextId(); in writeTernaryExpression()
2362 SpvId trueId = this->writeExpression(*t.fIfTrue, out); in writeTernaryExpression()
2363 SpvId falseId = this->writeExpression(*t.fIfFalse, out); in writeTernaryExpression()
2370 SpvId var = this->nextId(); in writeTernaryExpression()
2373 SpvId trueLabel = this->nextId(); in writeTernaryExpression()
2374 SpvId falseLabel = this->nextId(); in writeTernaryExpression()
2375 SpvId end = this->nextId(); in writeTernaryExpression()
2385 SpvId result = this->nextId(); in writeTernaryExpression()
2391 SpvId SPIRVCodeGenerator::writePrefixExpression(const PrefixExpression& p, OutputStream& out) { in writePrefixExpression()
2393 SpvId result = this->nextId(); in writePrefixExpression()
2394 SpvId typeId = this->getType(p.fType); in writePrefixExpression()
2395 SpvId expr = this->writeExpression(*p.fOperand, out); in writePrefixExpression()
2413 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2414 SpvId result = this->writeBinaryOperation(p.fType, p.fType, lv->load(out), one, in writePrefixExpression()
2422 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2423 SpvId result = this->writeBinaryOperation(p.fType, p.fType, lv->load(out), one, in writePrefixExpression()
2431 SpvId result = this->nextId(); in writePrefixExpression()
2437 SpvId result = this->nextId(); in writePrefixExpression()
2450 SpvId SPIRVCodeGenerator::writePostfixExpression(const PostfixExpression& p, OutputStream& out) { in writePostfixExpression()
2452 SpvId result = lv->load(out); in writePostfixExpression()
2453 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePostfixExpression()
2456 SpvId temp = this->writeBinaryOperation(p.fType, p.fType, result, one, SpvOpFAdd, in writePostfixExpression()
2462 SpvId temp = this->writeBinaryOperation(p.fType, p.fType, result, one, SpvOpFSub, in writePostfixExpression()
2475 SpvId SPIRVCodeGenerator::writeBoolLiteral(const BoolLiteral& b) { in writeBoolLiteral()
2493 SpvId SPIRVCodeGenerator::writeIntLiteral(const IntLiteral& i) { in writeIntLiteral()
2509 SpvId result = this->nextId(); in writeIntLiteral()
2510 this->writeInstruction(SpvOpConstant, this->getType(i.fType), result, (SpvId) i.fValue, in writeIntLiteral()
2518 SpvId SPIRVCodeGenerator::writeFloatLiteral(const FloatLiteral& f) { in writeFloatLiteral()
2530 SpvId result = this->nextId(); in writeFloatLiteral()
2544 SpvId result = this->nextId(); in writeFloatLiteral()
2557 SpvId SPIRVCodeGenerator::writeFunctionStart(const FunctionDeclaration& f, OutputStream& out) { in writeFunctionStart()
2558 SpvId result = fFunctionMap[&f]; in writeFunctionStart()
2563 SpvId id = this->nextId(); in writeFunctionStart()
2565 SpvId type; in writeFunctionStart()
2572 SpvId SPIRVCodeGenerator::writeFunction(const FunctionDefinition& f, OutputStream& out) { in writeFunction()
2574 SpvId result = this->writeFunctionStart(f.fDeclaration, out); in writeFunction()
2594 void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target) { in writeLayout()
2623 void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target, int member) { in writeLayout()
2672 SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { in writeInterfaceBlock()
2679 SpvId result = this->nextId(); in writeInterfaceBlock()
2682 SkASSERT(fRTHeightStructId == (SpvId) -1); in writeInterfaceBlock()
2683 SkASSERT(fRTHeightFieldIndex == (SpvId) -1); in writeInterfaceBlock()
2690 SpvId typeId; in writeInterfaceBlock()
2709 SpvId ptrType = this->nextId(); in writeInterfaceBlock()
2724 void SPIRVCodeGenerator::writePrecisionModifier(const Type& type, SpvId id) { in writePrecisionModifier()
2728 void SPIRVCodeGenerator::writePrecisionModifier(Precision precision, SpvId id) { in writePrecisionModifier()
2793 SpvId id = this->nextId(); in writeGlobalVars()
2795 SpvId type; in writeGlobalVars()
2809 SpvId value = this->writeExpression(*varDecl.fValue, fGlobalInitializersBuffer); in writeGlobalVars()
2836 SpvId id = this->nextId(); in writeVarDeclarations()
2838 SpvId type = this->getPointerType(var->fType, SpvStorageClassFunction); in writeVarDeclarations()
2842 SpvId value = this->writeExpression(*varDecl.fValue, out); in writeVarDeclarations()
2903 SpvId test = this->writeExpression(*stmt.fTest, out); in writeIfStatement()
2904 SpvId ifTrue = this->nextId(); in writeIfStatement()
2905 SpvId ifFalse = this->nextId(); in writeIfStatement()
2907 SpvId end = this->nextId(); in writeIfStatement()
2937 SpvId header = this->nextId(); in writeForStatement()
2938 SpvId start = this->nextId(); in writeForStatement()
2939 SpvId body = this->nextId(); in writeForStatement()
2940 SpvId next = this->nextId(); in writeForStatement()
2942 SpvId end = this->nextId(); in writeForStatement()
2950 SpvId test = this->writeExpression(*f.fTest, out); in writeForStatement()
2969 SpvId header = this->nextId(); in writeWhileStatement()
2970 SpvId start = this->nextId(); in writeWhileStatement()
2971 SpvId body = this->nextId(); in writeWhileStatement()
2972 SpvId continueTarget = this->nextId(); in writeWhileStatement()
2974 SpvId end = this->nextId(); in writeWhileStatement()
2981 SpvId test = this->writeExpression(*w.fTest, out); in writeWhileStatement()
3004 SpvId header = this->nextId(); in writeDoStatement()
3005 SpvId start = this->nextId(); in writeDoStatement()
3006 SpvId next = this->nextId(); in writeDoStatement()
3007 SpvId continueTarget = this->nextId(); in writeDoStatement()
3009 SpvId end = this->nextId(); in writeDoStatement()
3021 SpvId test = this->writeExpression(*d.fTest, out); in writeDoStatement()
3031 SpvId value = this->writeExpression(*s.fValue, out); in writeSwitchStatement()
3032 std::vector<SpvId> labels; in writeSwitchStatement()
3033 SpvId end = this->nextId(); in writeSwitchStatement()
3034 SpvId defaultLabel = end; in writeSwitchStatement()
3038 SpvId label = this->nextId(); in writeSwitchStatement()
3081 void SPIRVCodeGenerator::writeGeometryShaderExecutionMode(SpvId entryPoint, OutputStream& out) { in writeGeometryShaderExecutionMode()
3091 SpvId input; in writeGeometryShaderExecutionMode()
3117 SpvId output; in writeGeometryShaderExecutionMode()
3150 std::set<SpvId> interfaceVars; in writeInstructions()
3192 SpvId id = this->writeInterfaceBlock(intf); in writeInstructions()
3232 this->writeOpCode(SpvOpEntryPoint, (SpvId) (3 + (main->fName.fLength + 4) / 4) + in writeInstructions()
3247 SpvId entryPoint = fFunctionMap[main]; in writeInstructions()