• Home
  • Raw
  • Download

Lines Matching refs:SpvId

231 void SPIRVCodeGenerator::writeLabel(SpvId label, OutputStream& out) {  in writeLabel()
361 this->writeInstruction(SpvOpCapability, (SpvId) i, out); in writeCapabilities()
372 SpvId SPIRVCodeGenerator::nextId() { in nextId()
377 SpvId resultId) { in writeStruct()
381 std::vector<SpvId> types; in writeStruct()
387 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(*field.fType), in writeStruct()
428 this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, in writeStruct()
465 SpvId SPIRVCodeGenerator::getType(const Type& type) { in getType()
469 SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layout) { in getType()
474 SpvId result = this->nextId(); in getType()
527 SpvId image = result; in getType()
558 SpvId SPIRVCodeGenerator::getImageType(const Type& type) { in getImageType()
566 SpvId SPIRVCodeGenerator::getFunctionType(const FunctionDeclaration& function) { in getFunctionType()
577 SpvId result = this->nextId(); in getFunctionType()
579 SpvId returnType = this->getType(function.fReturnType); in getFunctionType()
580 std::vector<SpvId> parameterTypes; in getFunctionType()
614 for (SpvId id : parameterTypes) { in getFunctionType()
623 SpvId SPIRVCodeGenerator::getPointerType(const Type& type, SpvStorageClass_ storageClass) { in getPointerType()
627 SpvId SPIRVCodeGenerator::getPointerType(const Type& rawType, const MemoryLayout& layout, in getPointerType()
633 SpvId result = this->nextId(); in getPointerType()
642 SpvId SPIRVCodeGenerator::writeExpression(const Expression& expr, OutputStream& out) { in writeExpression()
676 SpvId SPIRVCodeGenerator::writeIntrinsicCall(const FunctionCall& c, OutputStream& out) { in writeIntrinsicCall()
698 SpvId result = this->nextId(); in writeIntrinsicCall()
699 std::vector<SpvId> arguments; in writeIntrinsicCall()
712 for (SpvId id : arguments) { in writeIntrinsicCall()
718 SpvId result = this->nextId(); in writeIntrinsicCall()
719 std::vector<SpvId> arguments; in writeIntrinsicCall()
734 for (SpvId id : arguments) { in writeIntrinsicCall()
746 std::vector<SpvId> SPIRVCodeGenerator::vectorize( in vectorize()
760 std::vector<SpvId> result; in vectorize()
762 SpvId raw = this->writeExpression(*a, out); in vectorize()
764 SpvId vector = this->nextId(); in vectorize()
780 void SPIRVCodeGenerator::writeGLSLExtendedInstruction(const Type& type, SpvId id, SpvId floatInst, in writeGLSLExtendedInstruction()
781 SpvId signedInst, SpvId unsignedInst, in writeGLSLExtendedInstruction()
782 const std::vector<SpvId>& args, in writeGLSLExtendedInstruction()
798 for (SpvId a : args) { in writeGLSLExtendedInstruction()
803 SpvId SPIRVCodeGenerator::writeSpecialIntrinsic(const FunctionCall& c, SpecialIntrinsic kind, in writeSpecialIntrinsic()
805 SpvId result = this->nextId(); in writeSpecialIntrinsic()
808 std::vector<SpvId> arguments; in writeSpecialIntrinsic()
817 for (SpvId id : arguments) { in writeSpecialIntrinsic()
823 SpvId img = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
828 SpvId coords = this->writeConstantVector(ctor); in writeSpecialIntrinsic()
838 SpvId sample = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
880 SpvId type = this->getType(c.fType); in writeSpecialIntrinsic()
881 SpvId sampler = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
882 SpvId uv = this->writeExpression(*c.fArguments[1], out); in writeSpecialIntrinsic()
904 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
926 SpvId fn = this->writeExpression(*c.fArguments[0], out); in writeSpecialIntrinsic()
933 SpvId flipped = this->nextId(); in writeSpecialIntrinsic()
941 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
948 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
955 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
962 std::vector<SpvId> args = this->vectorize(c.fArguments, out); in writeSpecialIntrinsic()
974 std::vector<SpvId> spvArgs = this->vectorize(finalArgs, out); in writeSpecialIntrinsic()
983 SpvId SPIRVCodeGenerator::writeFunctionCall(const FunctionCall& c, OutputStream& out) { in writeFunctionCall()
989 std::vector<std::tuple<SpvId, const Type*, std::unique_ptr<LValue>>> lvalues; in writeFunctionCall()
990 std::vector<SpvId> arguments; in writeFunctionCall()
994 SpvId tmpVar; in writeFunctionCall()
996 SpvId tmpValueId; in writeFunctionCall()
999 SpvId ptr = lv->getPointer(); in writeFunctionCall()
1025 SpvId result = this->nextId(); in writeFunctionCall()
1030 for (SpvId id : arguments) { in writeFunctionCall()
1036 SpvId load = this->nextId(); in writeFunctionCall()
1045 SpvId SPIRVCodeGenerator::writeConstantVector(const Constructor& c) { in writeConstantVector()
1047 SpvId result = this->nextId(); in writeConstantVector()
1048 std::vector<SpvId> arguments; in writeConstantVector()
1052 SpvId type = this->getType(c.fType); in writeConstantVector()
1066 for (SpvId id : arguments) { in writeConstantVector()
1073 SpvId SPIRVCodeGenerator::writeFloatConstructor(const Constructor& c, OutputStream& out) { in writeFloatConstructor()
1077 SpvId result = this->nextId(); in writeFloatConstructor()
1078 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeFloatConstructor()
1090 SpvId SPIRVCodeGenerator::writeIntConstructor(const Constructor& c, OutputStream& out) { in writeIntConstructor()
1094 SpvId result = this->nextId(); in writeIntConstructor()
1095 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeIntConstructor()
1108 SpvId SPIRVCodeGenerator::writeUIntConstructor(const Constructor& c, OutputStream& out) { in writeUIntConstructor()
1112 SpvId result = this->nextId(); in writeUIntConstructor()
1113 SpvId parameter = this->writeExpression(*c.fArguments[0], out); in writeUIntConstructor()
1125 void SPIRVCodeGenerator::writeUniformScaleMatrix(SpvId id, SpvId diagonal, const Type& type, in writeUniformScaleMatrix()
1128 SpvId zeroId = this->writeFloatLiteral(zero); in writeUniformScaleMatrix()
1129 std::vector<SpvId> columnIds; in writeUniformScaleMatrix()
1135 SpvId columnId = this->nextId(); in writeUniformScaleMatrix()
1147 for (SpvId id : columnIds) { in writeUniformScaleMatrix()
1153 void SPIRVCodeGenerator::writeMatrixCopy(SpvId id, SpvId src, const Type& srcType, in writeMatrixCopy()
1158 SpvId srcColumnType = this->getType(srcType.componentType().toCompound(fContext, in writeMatrixCopy()
1161 SpvId dstColumnType = this->getType(dstType.componentType().toCompound(fContext, in writeMatrixCopy()
1164 SpvId zeroId; in writeMatrixCopy()
1174 SpvId zeroColumn = 0; in writeMatrixCopy()
1175 SpvId columns[4]; in writeMatrixCopy()
1179 SpvId srcColumn = this->nextId(); in writeMatrixCopy()
1182 SpvId dstColumn; in writeMatrixCopy()
1239 void SPIRVCodeGenerator::addColumnEntry(SpvId columnType, Precision precision, in addColumnEntry()
1240 std::vector<SpvId>* currentColumn, in addColumnEntry()
1241 std::vector<SpvId>* columnIds, in addColumnEntry()
1242 int* currentCount, int rows, SpvId entry, in addColumnEntry()
1251 SpvId columnId = this->nextId(); in addColumnEntry()
1254 for (SpvId id : *currentColumn) { in addColumnEntry()
1262 SpvId SPIRVCodeGenerator::writeMatrixConstructor(const Constructor& c, OutputStream& out) { in writeMatrixConstructor()
1266 std::vector<SpvId> arguments; in writeMatrixConstructor()
1270 SpvId result = this->nextId(); in writeMatrixConstructor()
1280 SpvId componentType = this->getType(c.fType.componentType()); in writeMatrixConstructor()
1281 SpvId v[4]; in writeMatrixConstructor()
1286 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, 2, 1)); in writeMatrixConstructor()
1287 SpvId column1 = this->nextId(); in writeMatrixConstructor()
1289 SpvId column2 = this->nextId(); in writeMatrixConstructor()
1294 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, rows, 1)); in writeMatrixConstructor()
1295 std::vector<SpvId> columnIds; in writeMatrixConstructor()
1297 std::vector<SpvId> currentColumn; in writeMatrixConstructor()
1311 SpvId componentType = this->getType(c.fArguments[i]->fType.componentType()); in writeMatrixConstructor()
1313 SpvId swizzle = this->nextId(); in writeMatrixConstructor()
1326 for (SpvId id : columnIds) { in writeMatrixConstructor()
1334 SpvId SPIRVCodeGenerator::writeVectorConstructor(const Constructor& c, OutputStream& out) { in writeVectorConstructor()
1341 std::vector<SpvId> arguments; in writeVectorConstructor()
1349 SpvId vec = this->writeExpression(*c.fArguments[i], out); in writeVectorConstructor()
1407 SpvId swizzle = this->nextId(); in writeVectorConstructor()
1411 SpvId cast = this->nextId(); in writeVectorConstructor()
1422 SpvId result = this->nextId(); in writeVectorConstructor()
1435 for (SpvId id : arguments) { in writeVectorConstructor()
1442 SpvId SPIRVCodeGenerator::writeArrayConstructor(const Constructor& c, OutputStream& out) { in writeArrayConstructor()
1446 std::vector<SpvId> arguments; in writeArrayConstructor()
1450 SpvId result = this->nextId(); in writeArrayConstructor()
1454 for (SpvId id : arguments) { in writeArrayConstructor()
1460 SpvId SPIRVCodeGenerator::writeConstructor(const Constructor& c, OutputStream& out) { in writeConstructor()
1527 std::vector<SpvId> SPIRVCodeGenerator::getAccessChain(const Expression& expr, OutputStream& out) { in getAccessChain()
1528 std::vector<SpvId> chain; in getAccessChain()
1544 SpvId id = this->getLValue(expr, out)->getPointer(); in getAccessChain()
1554 PointerLValue(SPIRVCodeGenerator& gen, SpvId pointer, SpvId type, in PointerLValue()
1561 virtual SpvId getPointer() override { in getPointer()
1565 virtual SpvId load(OutputStream& out) override { in load()
1566 SpvId result = fGen.nextId(); in load()
1572 virtual void store(SpvId value, OutputStream& out) override { in store()
1578 const SpvId fPointer;
1579 const SpvId fType;
1585 SwizzleLValue(SPIRVCodeGenerator& gen, SpvId vecPointer, const std::vector<int>& components, in SwizzleLValue()
1595 virtual SpvId getPointer() override { in getPointer()
1599 virtual SpvId load(OutputStream& out) override { in load()
1600 SpvId base = fGen.nextId(); in load()
1603 SpvId result = fGen.nextId(); in load()
1616 virtual void store(SpvId value, OutputStream& out) override { in store()
1627 SpvId base = fGen.nextId(); in store()
1629 SpvId shuffle = fGen.nextId(); in store()
1657 const SpvId fVecPointer;
1669 SpvId type; in getLValue()
1686 std::vector<SpvId> chain = this->getAccessChain(expr, out); in getLValue()
1687 SpvId member = this->nextId(); in getLValue()
1688 this->writeOpCode(SpvOpAccessChain, (SpvId) (3 + chain.size()), out); in getLValue()
1691 for (SpvId idx : chain) { in getLValue()
1703 SpvId base = this->getLValue(*swizzle.fBase, out)->getPointer(); in getLValue()
1707 SpvId member = this->nextId(); in getLValue()
1732 SpvId test = this->writeExpression(*t.fTest, out); in getLValue()
1733 SpvId end = this->nextId(); in getLValue()
1734 SpvId ifTrueLabel = this->nextId(); in getLValue()
1735 SpvId ifFalseLabel = this->nextId(); in getLValue()
1739 SpvId ifTrue = this->getLValue(*t.fIfTrue, out)->getPointer(); in getLValue()
1743 SpvId ifFalse = this->getLValue(*t.fIfFalse, out)->getPointer(); in getLValue()
1747 SpvId result = this->nextId(); in getLValue()
1761 SpvId result = this->nextId(); in getLValue()
1762 SpvId type = this->getPointerType(expr.fType, SpvStorageClassFunction); in getLValue()
1774 SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, OutputStream& out) { in writeVariableReference()
1775 SpvId result = this->nextId(); in writeVariableReference()
1778 SpvId var = entry->second; in writeVariableReference()
1784 if (fRTHeightStructId == (SpvId) -1) { in writeVariableReference()
1787 SkASSERT(fRTHeightFieldIndex == (SpvId) -1); in writeVariableReference()
1806 SkASSERT(fRTHeightFieldIndex != (SpvId) -1); in writeVariableReference()
1808 SpvId xId = this->nextId(); in writeVariableReference()
1812 SpvId fieldIndexId = this->writeIntLiteral(fieldIndex); in writeVariableReference()
1813 SpvId heightPtr = this->nextId(); in writeVariableReference()
1819 SpvId heightRead = this->nextId(); in writeVariableReference()
1822 SpvId rawYId = this->nextId(); in writeVariableReference()
1825 SpvId flippedYId = this->nextId(); in writeVariableReference()
1829 SpvId zeroId = writeFloatLiteral(zero); in writeVariableReference()
1831 SpvId wId = this->nextId(); in writeVariableReference()
1834 SpvId flipped = this->nextId(); in writeVariableReference()
1848 SpvId inverse = this->nextId(); in writeVariableReference()
1856 SpvId SPIRVCodeGenerator::writeIndexExpression(const IndexExpression& expr, OutputStream& out) { in writeIndexExpression()
1858 SpvId base = this->writeExpression(*expr.fBase, out); in writeIndexExpression()
1859 SpvId index = this->writeExpression(*expr.fIndex, out); in writeIndexExpression()
1860 SpvId result = this->nextId(); in writeIndexExpression()
1868 SpvId SPIRVCodeGenerator::writeFieldAccess(const FieldAccess& f, OutputStream& out) { in writeFieldAccess()
1872 SpvId SPIRVCodeGenerator::writeSwizzle(const Swizzle& swizzle, OutputStream& out) { in writeSwizzle()
1873 SpvId base = this->writeExpression(*swizzle.fBase, out); in writeSwizzle()
1874 SpvId result = this->nextId(); in writeSwizzle()
1884 SpvId other; in writeSwizzle()
1889 SpvId zeroId = this->writeFloatLiteral(zero); in writeSwizzle()
1891 SpvId oneId = this->writeFloatLiteral(one); in writeSwizzle()
1892 SpvId type = this->getType(*fContext.fFloat2_Type); in writeSwizzle()
1918 SpvId SPIRVCodeGenerator::writeBinaryOperation(const Type& resultType, in writeBinaryOperation()
1919 const Type& operandType, SpvId lhs, in writeBinaryOperation()
1920 SpvId rhs, SpvOp_ ifFloat, SpvOp_ ifInt, in writeBinaryOperation()
1922 SpvId result = this->nextId(); in writeBinaryOperation()
1942 SpvId SPIRVCodeGenerator::foldToBool(SpvId id, const Type& operandType, SpvOp op, in foldToBool()
1945 SpvId result = this->nextId(); in foldToBool()
1952 SpvId SPIRVCodeGenerator::writeMatrixComparison(const Type& operandType, SpvId lhs, SpvId rhs, in writeMatrixComparison()
1958 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeMatrixComparison()
1961 SpvId bvecType = this->getType(fContext.fBool_Type->toCompound(fContext, in writeMatrixComparison()
1964 SpvId boolType = this->getType(*fContext.fBool_Type); in writeMatrixComparison()
1965 SpvId result = 0; in writeMatrixComparison()
1967 SpvId columnL = this->nextId(); in writeMatrixComparison()
1969 SpvId columnR = this->nextId(); in writeMatrixComparison()
1971 SpvId compare = this->nextId(); in writeMatrixComparison()
1973 SpvId merge = this->nextId(); in writeMatrixComparison()
1976 SpvId next = this->nextId(); in writeMatrixComparison()
1987 SpvId SPIRVCodeGenerator::writeComponentwiseMatrixBinary(const Type& operandType, SpvId lhs, in writeComponentwiseMatrixBinary()
1988 SpvId rhs, SpvOp_ floatOperator, in writeComponentwiseMatrixBinary()
1993 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeComponentwiseMatrixBinary()
1996 SpvId columns[4]; in writeComponentwiseMatrixBinary()
1998 SpvId columnL = this->nextId(); in writeComponentwiseMatrixBinary()
2000 SpvId columnR = this->nextId(); in writeComponentwiseMatrixBinary()
2005 SpvId result = this->nextId(); in writeComponentwiseMatrixBinary()
2026 SpvId SPIRVCodeGenerator::writeBinaryExpression(const Type& leftType, SpvId lhs, Token::Kind op, in writeBinaryExpression()
2027 const Type& rightType, SpvId rhs, in writeBinaryExpression()
2037 SpvId one = this->writeExpression(*create_literal_1(fContext, rightType), out); in writeBinaryExpression()
2038 SpvId inverse = this->nextId(); in writeBinaryExpression()
2044 SpvId result = this->nextId(); in writeBinaryExpression()
2050 SpvId vec = this->nextId(); in writeBinaryExpression()
2062 SpvId result = this->nextId(); in writeBinaryExpression()
2068 SpvId vec = this->nextId(); in writeBinaryExpression()
2088 SpvId result = this->nextId(); in writeBinaryExpression()
2092 SpvId result = this->nextId(); in writeBinaryExpression()
2191 SpvId result = this->nextId(); in writeBinaryExpression()
2229 SpvId SPIRVCodeGenerator::writeBinaryExpression(const BinaryExpression& b, OutputStream& out) { in writeBinaryExpression()
2233 SpvId rhs = this->writeExpression(*b.fRight, out); in writeBinaryExpression()
2246 SpvId lhs; in writeBinaryExpression()
2254 SpvId rhs = this->writeExpression(*b.fRight, out); in writeBinaryExpression()
2255 SpvId result = this->writeBinaryExpression(b.fLeft->fType, lhs, remove_assignment(b.fOperator), in writeBinaryExpression()
2263 SpvId SPIRVCodeGenerator::writeLogicalAnd(const BinaryExpression& a, OutputStream& out) { in writeLogicalAnd()
2266 SpvId falseConstant = this->writeBoolLiteral(falseLiteral); in writeLogicalAnd()
2267 SpvId lhs = this->writeExpression(*a.fLeft, out); in writeLogicalAnd()
2268 SpvId rhsLabel = this->nextId(); in writeLogicalAnd()
2269 SpvId end = this->nextId(); in writeLogicalAnd()
2270 SpvId lhsBlock = fCurrentBlock; in writeLogicalAnd()
2274 SpvId rhs = this->writeExpression(*a.fRight, out); in writeLogicalAnd()
2275 SpvId rhsBlock = fCurrentBlock; in writeLogicalAnd()
2278 SpvId result = this->nextId(); in writeLogicalAnd()
2284 SpvId SPIRVCodeGenerator::writeLogicalOr(const BinaryExpression& o, OutputStream& out) { in writeLogicalOr()
2287 SpvId trueConstant = this->writeBoolLiteral(trueLiteral); in writeLogicalOr()
2288 SpvId lhs = this->writeExpression(*o.fLeft, out); in writeLogicalOr()
2289 SpvId rhsLabel = this->nextId(); in writeLogicalOr()
2290 SpvId end = this->nextId(); in writeLogicalOr()
2291 SpvId lhsBlock = fCurrentBlock; in writeLogicalOr()
2295 SpvId rhs = this->writeExpression(*o.fRight, out); in writeLogicalOr()
2296 SpvId rhsBlock = fCurrentBlock; in writeLogicalOr()
2299 SpvId result = this->nextId(); in writeLogicalOr()
2305 SpvId SPIRVCodeGenerator::writeTernaryExpression(const TernaryExpression& t, OutputStream& out) { in writeTernaryExpression()
2306 SpvId test = this->writeExpression(*t.fTest, out); in writeTernaryExpression()
2309 SpvId result = this->nextId(); in writeTernaryExpression()
2310 SpvId trueId = this->writeExpression(*t.fIfTrue, out); in writeTernaryExpression()
2311 SpvId falseId = this->writeExpression(*t.fIfFalse, out); in writeTernaryExpression()
2318 SpvId var = this->nextId(); in writeTernaryExpression()
2321 SpvId trueLabel = this->nextId(); in writeTernaryExpression()
2322 SpvId falseLabel = this->nextId(); in writeTernaryExpression()
2323 SpvId end = this->nextId(); in writeTernaryExpression()
2333 SpvId result = this->nextId(); in writeTernaryExpression()
2339 SpvId SPIRVCodeGenerator::writePrefixExpression(const PrefixExpression& p, OutputStream& out) { in writePrefixExpression()
2341 SpvId result = this->nextId(); in writePrefixExpression()
2342 SpvId typeId = this->getType(p.fType); in writePrefixExpression()
2343 SpvId expr = this->writeExpression(*p.fOperand, out); in writePrefixExpression()
2359 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2360 SpvId result = this->writeBinaryOperation(p.fType, p.fType, lv->load(out), one, in writePrefixExpression()
2368 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2369 SpvId result = this->writeBinaryOperation(p.fType, p.fType, lv->load(out), one, in writePrefixExpression()
2377 SpvId result = this->nextId(); in writePrefixExpression()
2383 SpvId result = this->nextId(); in writePrefixExpression()
2393 SpvId SPIRVCodeGenerator::writePostfixExpression(const PostfixExpression& p, OutputStream& out) { in writePostfixExpression()
2395 SpvId result = lv->load(out); in writePostfixExpression()
2396 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePostfixExpression()
2399 SpvId temp = this->writeBinaryOperation(p.fType, p.fType, result, one, SpvOpFAdd, in writePostfixExpression()
2405 SpvId temp = this->writeBinaryOperation(p.fType, p.fType, result, one, SpvOpFSub, in writePostfixExpression()
2415 SpvId SPIRVCodeGenerator::writeBoolLiteral(const BoolLiteral& b) { in writeBoolLiteral()
2433 SpvId SPIRVCodeGenerator::writeIntLiteral(const IntLiteral& i) { in writeIntLiteral()
2447 SpvId result = this->nextId(); in writeIntLiteral()
2448 this->writeInstruction(SpvOpConstant, this->getType(i.fType), result, (SpvId) i.fValue, in writeIntLiteral()
2456 SpvId SPIRVCodeGenerator::writeFloatLiteral(const FloatLiteral& f) { in writeFloatLiteral()
2468 SpvId result = this->nextId(); in writeFloatLiteral()
2482 SpvId result = this->nextId(); in writeFloatLiteral()
2495 SpvId SPIRVCodeGenerator::writeFunctionStart(const FunctionDeclaration& f, OutputStream& out) { in writeFunctionStart()
2496 SpvId result = fFunctionMap[&f]; in writeFunctionStart()
2501 SpvId id = this->nextId(); in writeFunctionStart()
2503 SpvId type; in writeFunctionStart()
2510 SpvId SPIRVCodeGenerator::writeFunction(const FunctionDefinition& f, OutputStream& out) { in writeFunction()
2512 SpvId result = this->writeFunctionStart(f.fDeclaration, out); in writeFunction()
2532 void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target) { in writeLayout()
2561 void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target, int member) { in writeLayout()
2610 SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { in writeInterfaceBlock()
2617 SpvId result = this->nextId(); in writeInterfaceBlock()
2620 SkASSERT(fRTHeightStructId == (SpvId) -1); in writeInterfaceBlock()
2621 SkASSERT(fRTHeightFieldIndex == (SpvId) -1); in writeInterfaceBlock()
2628 SpvId typeId; in writeInterfaceBlock()
2647 SpvId ptrType = this->nextId(); in writeInterfaceBlock()
2662 void SPIRVCodeGenerator::writePrecisionModifier(const Type& type, SpvId id) { in writePrecisionModifier()
2666 void SPIRVCodeGenerator::writePrecisionModifier(Precision precision, SpvId id) { in writePrecisionModifier()
2719 SpvId id = this->nextId(); in writeGlobalVars()
2721 SpvId type; in writeGlobalVars()
2735 SpvId value = this->writeExpression(*varDecl.fValue, fGlobalInitializersBuffer); in writeGlobalVars()
2762 SpvId id = this->nextId(); in writeVarDeclarations()
2764 SpvId type = this->getPointerType(var->fType, SpvStorageClassFunction); in writeVarDeclarations()
2768 SpvId value = this->writeExpression(*varDecl.fValue, out); in writeVarDeclarations()
2826 SpvId test = this->writeExpression(*stmt.fTest, out); in writeIfStatement()
2827 SpvId ifTrue = this->nextId(); in writeIfStatement()
2828 SpvId ifFalse = this->nextId(); in writeIfStatement()
2830 SpvId end = this->nextId(); in writeIfStatement()
2860 SpvId header = this->nextId(); in writeForStatement()
2861 SpvId start = this->nextId(); in writeForStatement()
2862 SpvId body = this->nextId(); in writeForStatement()
2863 SpvId next = this->nextId(); in writeForStatement()
2865 SpvId end = this->nextId(); in writeForStatement()
2873 SpvId test = this->writeExpression(*f.fTest, out); in writeForStatement()
2900 SpvId header = this->nextId(); in writeWhileStatement()
2901 SpvId start = this->nextId(); in writeWhileStatement()
2902 SpvId body = this->nextId(); in writeWhileStatement()
2904 SpvId end = this->nextId(); in writeWhileStatement()
2911 SpvId test = this->writeExpression(*w.fTest, out); in writeWhileStatement()
2932 SpvId header = this->nextId(); in writeDoStatement()
2933 SpvId start = this->nextId(); in writeDoStatement()
2934 SpvId next = this->nextId(); in writeDoStatement()
2936 SpvId end = this->nextId(); in writeDoStatement()
2948 SpvId test = this->writeExpression(*d.fTest, out); in writeDoStatement()
2956 SpvId value = this->writeExpression(*s.fValue, out); in writeSwitchStatement()
2957 std::vector<SpvId> labels; in writeSwitchStatement()
2958 SpvId end = this->nextId(); in writeSwitchStatement()
2959 SpvId defaultLabel = end; in writeSwitchStatement()
2963 SpvId label = this->nextId(); in writeSwitchStatement()
3006 void SPIRVCodeGenerator::writeGeometryShaderExecutionMode(SpvId entryPoint, OutputStream& out) { in writeGeometryShaderExecutionMode()
3016 SpvId input; in writeGeometryShaderExecutionMode()
3042 SpvId output; in writeGeometryShaderExecutionMode()
3075 std::set<SpvId> interfaceVars; in writeInstructions()
3117 SpvId id = this->writeInterfaceBlock(intf); in writeInstructions()
3153 this->writeOpCode(SpvOpEntryPoint, (SpvId) (3 + (main->fName.fLength + 4) / 4) + in writeInstructions()
3168 SpvId entryPoint = fFunctionMap[main]; in writeInstructions()