Lines Matching refs:SpvId
232 void SPIRVCodeGenerator::writeLabel(SpvId label, OutputStream& out) { in writeLabel()
362 this->writeInstruction(SpvOpCapability, (SpvId) i, out); in writeCapabilities()
373 SpvId SPIRVCodeGenerator::nextId() { in nextId()
378 SpvId resultId) { in writeStruct()
382 std::vector<SpvId> types; in writeStruct()
388 for (SpvId id : types) { in writeStruct()
417 this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, SpvDecorationOffset, in writeStruct()
418 (SpvId) offset, fDecorationBuffer); in writeStruct()
424 (SpvId) memoryLayout.stride(*type.fields()[i].fType), in writeStruct()
461 SpvId SPIRVCodeGenerator::getType(const Type& type) { in getType()
465 SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layout) { in getType()
470 SpvId result = this->nextId(); in getType()
521 SpvId image = result; in getType()
552 SpvId SPIRVCodeGenerator::getImageType(const Type& type) { in getImageType()
560 SpvId SPIRVCodeGenerator::getFunctionType(const FunctionDeclaration& function) { in getFunctionType()
571 SpvId result = this->nextId(); in getFunctionType()
573 SpvId returnType = this->getType(function.fReturnType); in getFunctionType()
574 std::vector<SpvId> parameterTypes; in getFunctionType()
608 for (SpvId id : parameterTypes) { in getFunctionType()
617 SpvId SPIRVCodeGenerator::getPointerType(const Type& type, SpvStorageClass_ storageClass) { in getPointerType()
621 SpvId SPIRVCodeGenerator::getPointerType(const Type& rawType, const MemoryLayout& layout, in getPointerType()
627 SpvId result = this->nextId(); in getPointerType()
636 SpvId SPIRVCodeGenerator::writeExpression(const Expression& expr, OutputStream& out) { in writeExpression()
670 SpvId SPIRVCodeGenerator::writeIntrinsicCall(const FunctionCall& c, OutputStream& out) { in writeIntrinsicCall()
692 SpvId result = this->nextId(); in writeIntrinsicCall()
693 std::vector<SpvId> arguments; in writeIntrinsicCall()
706 for (SpvId id : arguments) { in writeIntrinsicCall()
712 SpvId result = this->nextId(); in writeIntrinsicCall()
713 std::vector<SpvId> arguments; in writeIntrinsicCall()
728 for (SpvId id : arguments) { in writeIntrinsicCall()
740 std::vector<SpvId> SPIRVCodeGenerator::vectorize( in vectorize()
754 std::vector<SpvId> result; in vectorize()
756 SpvId raw = this->writeExpression(*a, out); in vectorize()
758 SpvId vector = this->nextId(); in vectorize()
773 void SPIRVCodeGenerator::writeGLSLExtendedInstruction(const Type& type, SpvId id, SpvId floatInst, in writeGLSLExtendedInstruction()
774 SpvId signedInst, SpvId unsignedInst, in writeGLSLExtendedInstruction()
775 const std::vector<SpvId>& args, in writeGLSLExtendedInstruction()
791 for (SpvId a : args) { in writeGLSLExtendedInstruction()
796 SpvId SPIRVCodeGenerator::writeSpecialIntrinsic(const FunctionCall& c, SpecialIntrinsic kind, in writeSpecialIntrinsic()
798 SpvId result = this->nextId(); in writeSpecialIntrinsic()
801 std::vector<SpvId> arguments; in writeSpecialIntrinsic()
810 for (SpvId id : arguments) { in writeSpecialIntrinsic()
816 SpvId img = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
821 SpvId coords = this->writeConstantVector(ctor); in writeSpecialIntrinsic()
831 SpvId sample = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
873 SpvId type = this->getType(c.fType); in writeSpecialIntrinsic()
874 SpvId sampler = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
875 SpvId uv = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
897 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
919 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
926 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
933 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
940 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
952 std::vector<SpvId> spvArgs = this->vectorize(finalArgs, out); in writeSpecialIntrinsic()
961 SpvId SPIRVCodeGenerator::writeFunctionCall(const FunctionCall& c, OutputStream& out) { in writeFunctionCall()
967 std::vector<std::tuple<SpvId, SpvId, std::unique_ptr<LValue>>> lvalues; in writeFunctionCall()
968 std::vector<SpvId> arguments; in writeFunctionCall()
972 SpvId tmpVar; in writeFunctionCall()
974 SpvId tmpValueId; in writeFunctionCall()
977 SpvId ptr = lv->getPointer(); in writeFunctionCall()
1004 SpvId result = this->nextId(); in writeFunctionCall()
1009 for (SpvId id : arguments) { in writeFunctionCall()
1015 SpvId load = this->nextId(); in writeFunctionCall()
1022 SpvId SPIRVCodeGenerator::writeConstantVector(const Constructor& c) { in writeConstantVector()
1024 SpvId result = this->nextId(); in writeConstantVector()
1025 std::vector<SpvId> arguments; in writeConstantVector()
1029 SpvId type = this->getType(c.fType); in writeConstantVector()
1043 for (SpvId id : arguments) { in writeConstantVector()
1050 SpvId SPIRVCodeGenerator::writeFloatConstructor(const Constructor& c, OutputStream& out) { in writeFloatConstructor()
1054 SpvId result = this->nextId(); in writeFloatConstructor()
1055 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeFloatConstructor()
1067 SpvId SPIRVCodeGenerator::writeIntConstructor(const Constructor& c, OutputStream& out) { in writeIntConstructor()
1071 SpvId result = this->nextId(); in writeIntConstructor()
1072 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeIntConstructor()
1085 SpvId SPIRVCodeGenerator::writeUIntConstructor(const Constructor& c, OutputStream& out) { in writeUIntConstructor()
1089 SpvId result = this->nextId(); in writeUIntConstructor()
1090 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeUIntConstructor()
1102 void SPIRVCodeGenerator::writeUniformScaleMatrix(SpvId id, SpvId diagonal, const Type& type, in writeUniformScaleMatrix()
1105 SpvId zeroId = this->writeFloatLiteral(zero); in writeUniformScaleMatrix()
1106 std::vector<SpvId> columnIds; in writeUniformScaleMatrix()
1112 SpvId columnId = this->nextId(); in writeUniformScaleMatrix()
1123 for (SpvId id : columnIds) { in writeUniformScaleMatrix()
1128 void SPIRVCodeGenerator::writeMatrixCopy(SpvId id, SpvId src, const Type& srcType, in writeMatrixCopy()
1133 SpvId srcColumnType = this->getType(srcType.componentType().toCompound(fContext, in writeMatrixCopy()
1136 SpvId dstColumnType = this->getType(dstType.componentType().toCompound(fContext, in writeMatrixCopy()
1139 SpvId zeroId; in writeMatrixCopy()
1149 SpvId zeroColumn = 0; in writeMatrixCopy()
1150 SpvId columns[4]; in writeMatrixCopy()
1154 SpvId srcColumn = this->nextId(); in writeMatrixCopy()
1156 SpvId dstColumn; in writeMatrixCopy()
1209 SpvId SPIRVCodeGenerator::writeMatrixConstructor(const Constructor& c, OutputStream& out) { in writeMatrixConstructor()
1213 std::vector<SpvId> arguments; in writeMatrixConstructor()
1217 SpvId result = this->nextId(); in writeMatrixConstructor()
1227 SpvId componentType = this->getType(c.fType.componentType()); in writeMatrixConstructor()
1228 SpvId v[4]; in writeMatrixConstructor()
1233 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, 2, 1)); in writeMatrixConstructor()
1234 SpvId column1 = this->nextId(); in writeMatrixConstructor()
1236 SpvId column2 = this->nextId(); in writeMatrixConstructor()
1241 std::vector<SpvId> columnIds; in writeMatrixConstructor()
1243 std::vector<SpvId> currentColumn; in writeMatrixConstructor()
1256 SpvId componentType = this->getType(c.fArguments[i]->fType.componentType()); in writeMatrixConstructor()
1258 SpvId swizzle = this->nextId(); in writeMatrixConstructor()
1271 SpvId columnId = this->nextId(); in writeMatrixConstructor()
1274 for (SpvId id : currentColumn) { in writeMatrixConstructor()
1286 for (SpvId id : columnIds) { in writeMatrixConstructor()
1293 SpvId SPIRVCodeGenerator::writeVectorConstructor(const Constructor& c, OutputStream& out) { in writeVectorConstructor()
1300 std::vector<SpvId> arguments; in writeVectorConstructor()
1308 SpvId vec = this->writeExpression(*c.fArguments[i], out); in writeVectorConstructor()
1366 SpvId swizzle = this->nextId(); in writeVectorConstructor()
1370 SpvId cast = this->nextId(); in writeVectorConstructor()
1381 SpvId result = this->nextId(); in writeVectorConstructor()
1394 for (SpvId id : arguments) { in writeVectorConstructor()
1401 SpvId SPIRVCodeGenerator::writeArrayConstructor(const Constructor& c, OutputStream& out) { in writeArrayConstructor()
1405 std::vector<SpvId> arguments; in writeArrayConstructor()
1409 SpvId result = this->nextId(); in writeArrayConstructor()
1413 for (SpvId id : arguments) { in writeArrayConstructor()
1419 SpvId SPIRVCodeGenerator::writeConstructor(const Constructor& c, OutputStream& out) { in writeConstructor()
1486 std::vector<SpvId> SPIRVCodeGenerator::getAccessChain(const Expression& expr, OutputStream& out) { in getAccessChain()
1487 std::vector<SpvId> chain; in getAccessChain()
1503 SpvId id = this->getLValue(expr, out)->getPointer(); in getAccessChain()
1513 PointerLValue(SPIRVCodeGenerator& gen, SpvId pointer, SpvId type) in PointerLValue()
1518 virtual SpvId getPointer() override { in getPointer()
1522 virtual SpvId load(OutputStream& out) override { in load()
1523 SpvId result = fGen.nextId(); in load()
1528 virtual void store(SpvId value, OutputStream& out) override { in store()
1534 const SpvId fPointer;
1535 const SpvId fType;
1540 SwizzleLValue(SPIRVCodeGenerator& gen, SpvId vecPointer, const std::vector<int>& components, in SwizzleLValue()
1548 virtual SpvId getPointer() override { in getPointer()
1552 virtual SpvId load(OutputStream& out) override { in load()
1553 SpvId base = fGen.nextId(); in load()
1555 SpvId result = fGen.nextId(); in load()
1567 virtual void store(SpvId value, OutputStream& out) override { in store()
1578 SpvId base = fGen.nextId(); in store()
1580 SpvId shuffle = fGen.nextId(); in store()
1607 const SpvId fVecPointer;
1617 SpvId type; in getLValue()
1633 std::vector<SpvId> chain = this->getAccessChain(expr, out); in getLValue()
1634 SpvId member = this->nextId(); in getLValue()
1635 this->writeOpCode(SpvOpAccessChain, (SpvId) (3 + chain.size()), out); in getLValue()
1638 for (SpvId idx : chain) { in getLValue()
1649 SpvId base = this->getLValue(*swizzle.fBase, out)->getPointer(); in getLValue()
1653 SpvId member = this->nextId(); in getLValue()
1676 SpvId test = this->writeExpression(*t.fTest, out); in getLValue()
1677 SpvId end = this->nextId(); in getLValue()
1678 SpvId ifTrueLabel = this->nextId(); in getLValue()
1679 SpvId ifFalseLabel = this->nextId(); in getLValue()
1683 SpvId ifTrue = this->getLValue(*t.fIfTrue, out)->getPointer(); in getLValue()
1687 SpvId ifFalse = this->getLValue(*t.fIfFalse, out)->getPointer(); in getLValue()
1691 SpvId result = this->nextId(); in getLValue()
1704 SpvId result = this->nextId(); in getLValue()
1705 SpvId type = this->getPointerType(expr.fType, SpvStorageClassFunction); in getLValue()
1716 SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, OutputStream& out) { in writeVariableReference()
1717 SpvId result = this->nextId(); in writeVariableReference()
1720 SpvId var = entry->second; in writeVariableReference()
1725 if (fRTHeightStructId == (SpvId) -1) { in writeVariableReference()
1728 SkASSERT(fRTHeightFieldIndex == (SpvId) -1); in writeVariableReference()
1747 SkASSERT(fRTHeightFieldIndex != (SpvId) -1); in writeVariableReference()
1749 SpvId xId = this->nextId(); in writeVariableReference()
1753 SpvId fieldIndexId = this->writeIntLiteral(fieldIndex); in writeVariableReference()
1754 SpvId heightPtr = this->nextId(); in writeVariableReference()
1760 SpvId heightRead = this->nextId(); in writeVariableReference()
1763 SpvId rawYId = this->nextId(); in writeVariableReference()
1766 SpvId flippedYId = this->nextId(); in writeVariableReference()
1770 SpvId zeroId = writeFloatLiteral(zero); in writeVariableReference()
1772 SpvId wId = this->nextId(); in writeVariableReference()
1775 SpvId flipped = this->nextId(); in writeVariableReference()
1789 SpvId inverse = this->nextId(); in writeVariableReference()
1797 SpvId SPIRVCodeGenerator::writeIndexExpression(const IndexExpression& expr, OutputStream& out) { in writeIndexExpression()
1799 SpvId base = this->writeExpression(*expr.fBase, out); in writeIndexExpression()
1800 SpvId index = this->writeExpression(*expr.fIndex, out); in writeIndexExpression()
1801 SpvId result = this->nextId(); in writeIndexExpression()
1809 SpvId SPIRVCodeGenerator::writeFieldAccess(const FieldAccess& f, OutputStream& out) { in writeFieldAccess()
1813 SpvId SPIRVCodeGenerator::writeSwizzle(const Swizzle& swizzle, OutputStream& out) { in writeSwizzle()
1814 SpvId base = this->writeExpression(*swizzle.fBase, out); in writeSwizzle()
1815 SpvId result = this->nextId(); in writeSwizzle()
1833 SpvId SPIRVCodeGenerator::writeBinaryOperation(const Type& resultType, in writeBinaryOperation()
1834 const Type& operandType, SpvId lhs, in writeBinaryOperation()
1835 SpvId rhs, SpvOp_ ifFloat, SpvOp_ ifInt, in writeBinaryOperation()
1837 SpvId result = this->nextId(); in writeBinaryOperation()
1874 SpvId SPIRVCodeGenerator::foldToBool(SpvId id, const Type& operandType, SpvOp op, in foldToBool()
1877 SpvId result = this->nextId(); in foldToBool()
1884 SpvId SPIRVCodeGenerator::writeMatrixComparison(const Type& operandType, SpvId lhs, SpvId rhs, in writeMatrixComparison()
1890 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeMatrixComparison()
1893 SpvId bvecType = this->getType(fContext.fBool_Type->toCompound(fContext, in writeMatrixComparison()
1896 SpvId boolType = this->getType(*fContext.fBool_Type); in writeMatrixComparison()
1897 SpvId result = 0; in writeMatrixComparison()
1899 SpvId columnL = this->nextId(); in writeMatrixComparison()
1901 SpvId columnR = this->nextId(); in writeMatrixComparison()
1903 SpvId compare = this->nextId(); in writeMatrixComparison()
1905 SpvId merge = this->nextId(); in writeMatrixComparison()
1908 SpvId next = this->nextId(); in writeMatrixComparison()
1919 SpvId SPIRVCodeGenerator::writeComponentwiseMatrixBinary(const Type& operandType, SpvId lhs, in writeComponentwiseMatrixBinary()
1920 SpvId rhs, SpvOp_ floatOperator, in writeComponentwiseMatrixBinary()
1925 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeComponentwiseMatrixBinary()
1928 SpvId columns[4]; in writeComponentwiseMatrixBinary()
1930 SpvId columnL = this->nextId(); in writeComponentwiseMatrixBinary()
1932 SpvId columnR = this->nextId(); in writeComponentwiseMatrixBinary()
1937 SpvId result = this->nextId(); in writeComponentwiseMatrixBinary()
1947 SpvId SPIRVCodeGenerator::writeBinaryExpression(const BinaryExpression& b, OutputStream& out) { in writeBinaryExpression()
1951 SpvId rhs = this->writeExpression(*b.fRight, out); in writeBinaryExpression()
1966 SpvId lhs; in writeBinaryExpression()
1974 SpvId rhs = this->writeExpression(*b.fRight, out); in writeBinaryExpression()
1987 SpvId vec = this->nextId(); in writeBinaryExpression()
2000 SpvId vec = this->nextId(); in writeBinaryExpression()
2021 SpvId result = this->nextId(); in writeBinaryExpression()
2030 SpvId result = this->nextId(); in writeBinaryExpression()
2133 SpvId result = this->nextId(); in writeBinaryExpression()
2164 SpvId result; in writeBinaryExpression()
2180 SpvId result; in writeBinaryExpression()
2199 SpvId result = this->nextId(); in writeBinaryExpression()
2206 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFMul, in writeBinaryExpression()
2213 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFDiv, in writeBinaryExpression()
2220 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFMod, in writeBinaryExpression()
2227 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, in writeBinaryExpression()
2235 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, in writeBinaryExpression()
2243 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, in writeBinaryExpression()
2251 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, in writeBinaryExpression()
2259 SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, in writeBinaryExpression()
2271 SpvId SPIRVCodeGenerator::writeLogicalAnd(const BinaryExpression& a, OutputStream& out) { in writeLogicalAnd()
2274 SpvId falseConstant = this->writeBoolLiteral(falseLiteral); in writeLogicalAnd()
2275 SpvId lhs = this->writeExpression(*a.fLeft, out); in writeLogicalAnd()
2276 SpvId rhsLabel = this->nextId(); in writeLogicalAnd()
2277 SpvId end = this->nextId(); in writeLogicalAnd()
2278 SpvId lhsBlock = fCurrentBlock; in writeLogicalAnd()
2282 SpvId rhs = this->writeExpression(*a.fRight, out); in writeLogicalAnd()
2283 SpvId rhsBlock = fCurrentBlock; in writeLogicalAnd()
2286 SpvId result = this->nextId(); in writeLogicalAnd()
2292 SpvId SPIRVCodeGenerator::writeLogicalOr(const BinaryExpression& o, OutputStream& out) { in writeLogicalOr()
2295 SpvId trueConstant = this->writeBoolLiteral(trueLiteral); in writeLogicalOr()
2296 SpvId lhs = this->writeExpression(*o.fLeft, out); in writeLogicalOr()
2297 SpvId rhsLabel = this->nextId(); in writeLogicalOr()
2298 SpvId end = this->nextId(); in writeLogicalOr()
2299 SpvId lhsBlock = fCurrentBlock; in writeLogicalOr()
2303 SpvId rhs = this->writeExpression(*o.fRight, out); in writeLogicalOr()
2304 SpvId rhsBlock = fCurrentBlock; in writeLogicalOr()
2307 SpvId result = this->nextId(); in writeLogicalOr()
2313 SpvId SPIRVCodeGenerator::writeTernaryExpression(const TernaryExpression& t, OutputStream& out) { in writeTernaryExpression()
2314 SpvId test = this->writeExpression(*t.fTest, out); in writeTernaryExpression()
2317 SpvId result = this->nextId(); in writeTernaryExpression()
2318 SpvId trueId = this->writeExpression(*t.fIfTrue, out); in writeTernaryExpression()
2319 SpvId falseId = this->writeExpression(*t.fIfFalse, out); in writeTernaryExpression()
2326 SpvId var = this->nextId(); in writeTernaryExpression()
2329 SpvId trueLabel = this->nextId(); in writeTernaryExpression()
2330 SpvId falseLabel = this->nextId(); in writeTernaryExpression()
2331 SpvId end = this->nextId(); in writeTernaryExpression()
2341 SpvId result = this->nextId(); in writeTernaryExpression()
2357 SpvId SPIRVCodeGenerator::writePrefixExpression(const PrefixExpression& p, OutputStream& out) { in writePrefixExpression()
2359 SpvId result = this->nextId(); in writePrefixExpression()
2360 SpvId typeId = this->getType(p.fType); in writePrefixExpression()
2361 SpvId expr = this->writeExpression(*p.fOperand, out); in writePrefixExpression()
2376 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2377 SpvId result = this->writeBinaryOperation(p.fType, p.fType, lv->load(out), one, in writePrefixExpression()
2385 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2386 SpvId result = this->writeBinaryOperation(p.fType, p.fType, lv->load(out), one, in writePrefixExpression()
2394 SpvId result = this->nextId(); in writePrefixExpression()
2400 SpvId result = this->nextId(); in writePrefixExpression()
2410 SpvId SPIRVCodeGenerator::writePostfixExpression(const PostfixExpression& p, OutputStream& out) { in writePostfixExpression()
2412 SpvId result = lv->load(out); in writePostfixExpression()
2413 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePostfixExpression()
2416 SpvId temp = this->writeBinaryOperation(p.fType, p.fType, result, one, SpvOpFAdd, in writePostfixExpression()
2422 SpvId temp = this->writeBinaryOperation(p.fType, p.fType, result, one, SpvOpFSub, in writePostfixExpression()
2432 SpvId SPIRVCodeGenerator::writeBoolLiteral(const BoolLiteral& b) { in writeBoolLiteral()
2450 SpvId SPIRVCodeGenerator::writeIntLiteral(const IntLiteral& i) { in writeIntLiteral()
2454 SpvId result = this->nextId(); in writeIntLiteral()
2455 this->writeInstruction(SpvOpConstant, this->getType(i.fType), result, (SpvId) i.fValue, in writeIntLiteral()
2465 SpvId result = this->nextId(); in writeIntLiteral()
2466 this->writeInstruction(SpvOpConstant, this->getType(i.fType), result, (SpvId) i.fValue, in writeIntLiteral()
2475 SpvId SPIRVCodeGenerator::writeFloatLiteral(const FloatLiteral& f) { in writeFloatLiteral()
2480 SpvId result = this->nextId(); in writeFloatLiteral()
2494 SpvId result = this->nextId(); in writeFloatLiteral()
2507 SpvId SPIRVCodeGenerator::writeFunctionStart(const FunctionDeclaration& f, OutputStream& out) { in writeFunctionStart()
2508 SpvId result = fFunctionMap[&f]; in writeFunctionStart()
2513 SpvId id = this->nextId(); in writeFunctionStart()
2515 SpvId type; in writeFunctionStart()
2522 SpvId SPIRVCodeGenerator::writeFunction(const FunctionDefinition& f, OutputStream& out) { in writeFunction()
2524 SpvId result = this->writeFunctionStart(f.fDeclaration, out); in writeFunction()
2544 void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target) { in writeLayout()
2573 void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target, int member) { in writeLayout()
2622 SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { in writeInterfaceBlock()
2629 SpvId result = this->nextId(); in writeInterfaceBlock()
2632 SkASSERT(fRTHeightStructId == (SpvId) -1); in writeInterfaceBlock()
2633 SkASSERT(fRTHeightFieldIndex == (SpvId) -1); in writeInterfaceBlock()
2640 SpvId typeId; in writeInterfaceBlock()
2659 SpvId ptrType = this->nextId(); in writeInterfaceBlock()
2674 void SPIRVCodeGenerator::writePrecisionModifier(const Modifiers& modifiers, SpvId id) { in writePrecisionModifier()
2728 SpvId id = this->nextId(); in writeGlobalVars()
2730 SpvId type; in writeGlobalVars()
2744 SpvId value = this->writeExpression(*varDecl.fValue, fGlobalInitializersBuffer); in writeGlobalVars()
2771 SpvId id = this->nextId(); in writeVarDeclarations()
2773 SpvId type = this->getPointerType(var->fType, SpvStorageClassFunction); in writeVarDeclarations()
2777 SpvId value = this->writeExpression(*varDecl.fValue, out); in writeVarDeclarations()
2835 SpvId test = this->writeExpression(*stmt.fTest, out); in writeIfStatement()
2836 SpvId ifTrue = this->nextId(); in writeIfStatement()
2837 SpvId ifFalse = this->nextId(); in writeIfStatement()
2839 SpvId end = this->nextId(); in writeIfStatement()
2869 SpvId header = this->nextId(); in writeForStatement()
2870 SpvId start = this->nextId(); in writeForStatement()
2871 SpvId body = this->nextId(); in writeForStatement()
2872 SpvId next = this->nextId(); in writeForStatement()
2874 SpvId end = this->nextId(); in writeForStatement()
2882 SpvId test = this->writeExpression(*f.fTest, out); in writeForStatement()
2909 SpvId header = this->nextId(); in writeWhileStatement()
2910 SpvId start = this->nextId(); in writeWhileStatement()
2911 SpvId body = this->nextId(); in writeWhileStatement()
2913 SpvId end = this->nextId(); in writeWhileStatement()
2920 SpvId test = this->writeExpression(*w.fTest, out); in writeWhileStatement()
2941 SpvId header = this->nextId(); in writeDoStatement()
2942 SpvId start = this->nextId(); in writeDoStatement()
2943 SpvId next = this->nextId(); in writeDoStatement()
2945 SpvId end = this->nextId(); in writeDoStatement()
2957 SpvId test = this->writeExpression(*d.fTest, out); in writeDoStatement()
2965 SpvId value = this->writeExpression(*s.fValue, out); in writeSwitchStatement()
2966 std::vector<SpvId> labels; in writeSwitchStatement()
2967 SpvId end = this->nextId(); in writeSwitchStatement()
2968 SpvId defaultLabel = end; in writeSwitchStatement()
2972 SpvId label = this->nextId(); in writeSwitchStatement()
3015 void SPIRVCodeGenerator::writeGeometryShaderExecutionMode(SpvId entryPoint, OutputStream& out) { in writeGeometryShaderExecutionMode()
3025 SpvId input; in writeGeometryShaderExecutionMode()
3051 SpvId output; in writeGeometryShaderExecutionMode()
3084 std::set<SpvId> interfaceVars; in writeInstructions()
3126 SpvId id = this->writeInterfaceBlock(intf); in writeInstructions()
3162 this->writeOpCode(SpvOpEntryPoint, (SpvId) (3 + (main->fName.fLength + 4) / 4) + in writeInstructions()
3177 SpvId entryPoint = fFunctionMap[main]; in writeInstructions()