Lines Matching refs:writeInstruction
233 this->writeInstruction(SpvOpLabel, label, out); in writeLabel()
236 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, OutputStream& out) { in writeInstruction() function in SkSL::SPIRVCodeGenerator
240 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, OutputStream& out) { in writeInstruction() function in SkSL::SPIRVCodeGenerator
262 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, StringFragment string, OutputStream& out) { in writeInstruction() function in SkSL::SPIRVCodeGenerator
268 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, StringFragment string, in writeInstruction() function in SkSL::SPIRVCodeGenerator
275 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
283 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
290 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
298 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
307 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
318 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
330 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
343 void SPIRVCodeGenerator::writeInstruction(SpvOp_ opCode, int32_t word1, int32_t word2, in writeInstruction() function in SkSL::SPIRVCodeGenerator
361 this->writeInstruction(SpvOpCapability, (SpvId) i, out); in writeCapabilities()
365 this->writeInstruction(SpvOpCapability, SpvCapabilityGeometry, out); in writeCapabilities()
368 this->writeInstruction(SpvOpCapability, SpvCapabilityShader, out); in writeCapabilities()
378 this->writeInstruction(SpvOpName, resultId, type.name().c_str(), fNameBuffer); in writeStruct()
414 this->writeInstruction(SpvOpMemberName, resultId, i, field.fName, fNameBuffer); in writeStruct()
417 this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, SpvDecorationOffset, in writeStruct()
421 this->writeInstruction(SpvOpMemberDecorate, resultId, i, SpvDecorationColMajor, in writeStruct()
423 this->writeInstruction(SpvOpMemberDecorate, resultId, i, SpvDecorationMatrixStride, in writeStruct()
428 this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, in writeStruct()
478 this->writeInstruction(SpvOpTypeBool, result, fConstantBuffer); in getType()
481 this->writeInstruction(SpvOpTypeInt, result, 32, 1, fConstantBuffer); in getType()
483 this->writeInstruction(SpvOpTypeInt, result, 32, 0, fConstantBuffer); in getType()
486 this->writeInstruction(SpvOpTypeFloat, result, 32, fConstantBuffer); in getType()
488 this->writeInstruction(SpvOpTypeFloat, result, 64, fConstantBuffer); in getType()
494 this->writeInstruction(SpvOpTypeVector, result, in getType()
499 this->writeInstruction(SpvOpTypeMatrix, result, in getType()
509 this->writeInstruction(SpvOpTypeArray, result, in getType()
512 this->writeInstruction(SpvOpDecorate, result, SpvDecorationArrayStride, in getType()
517 this->writeInstruction(SpvOpTypeRuntimeArray, result, in getType()
520 this->writeInstruction(SpvOpDecorate, result, SpvDecorationArrayStride, in getType()
534 this->writeInstruction(SpvOpTypeImage, image, in getType()
541 this->writeInstruction(SpvOpTypeSampledImage, result, image, fConstantBuffer); in getType()
547 this->writeInstruction(SpvOpTypeVoid, result, fConstantBuffer); in getType()
634 this->writeInstruction(SpvOpTypePointer, result, storageClass, in getPointerType()
830 this->writeInstruction(SpvOpImageRead, in writeSpecialIntrinsic()
839 this->writeInstruction(SpvOpImageRead, in writeSpecialIntrinsic()
884 this->writeInstruction(op, type, result, sampler, uv, in writeSpecialIntrinsic()
892 this->writeInstruction(op, type, result, sampler, uv, in writeSpecialIntrinsic()
897 this->writeInstruction(op, type, result, sampler, uv, in writeSpecialIntrinsic()
934 this->writeInstruction(SpvOpFNegate, this->getType(c.fType), flipped, result, out); in writeSpecialIntrinsic()
1016 this->writeInstruction(SpvOpVariable, in writeFunctionCall()
1022 this->writeInstruction(SpvOpStore, tmpVar, tmpValueId, out); in writeFunctionCall()
1037 this->writeInstruction(SpvOpLoad, getType(*std::get<1>(tuple)), load, std::get<0>(tuple), in writeFunctionCall()
1080 this->writeInstruction(SpvOpConvertSToF, this->getType(c.fType), result, parameter, in writeFloatConstructor()
1084 this->writeInstruction(SpvOpConvertUToF, this->getType(c.fType), result, parameter, in writeFloatConstructor()
1097 this->writeInstruction(SpvOpConvertFToS, this->getType(c.fType), result, parameter, in writeIntConstructor()
1102 this->writeInstruction(SpvOpBitcast, this->getType(c.fType), result, parameter, in writeIntConstructor()
1115 this->writeInstruction(SpvOpConvertFToU, this->getType(c.fType), result, parameter, in writeUIntConstructor()
1119 this->writeInstruction(SpvOpBitcast, this->getType(c.fType), result, parameter, in writeUIntConstructor()
1180 this->writeInstruction(SpvOpCompositeExtract, srcColumnType, srcColumn, src, i, out); in writeMatrixCopy()
1284 … this->writeInstruction(SpvOpCompositeExtract, componentType, v[i], arguments[0], i, out); in writeMatrixConstructor()
1288 this->writeInstruction(SpvOpCompositeConstruct, columnType, column1, v[0], v[1], out); in writeMatrixConstructor()
1290 this->writeInstruction(SpvOpCompositeConstruct, columnType, column2, v[2], v[3], out); in writeMatrixConstructor()
1291 this->writeInstruction(SpvOpCompositeConstruct, this->getType(c.fType), result, column1, in writeMatrixConstructor()
1314 this->writeInstruction(SpvOpCompositeExtract, componentType, swizzle, in writeMatrixConstructor()
1408 this->writeInstruction(SpvOpCompositeExtract, this->getType(src), swizzle, vec, j, in writeVectorConstructor()
1412 this->writeInstruction(op, this->getType(dst), cast, swizzle, out); in writeVectorConstructor()
1567 fGen.writeInstruction(SpvOpLoad, fType, result, fPointer, out); in load()
1573 fGen.writeInstruction(SpvOpStore, fPointer, value, out); in store()
1601 fGen.writeInstruction(SpvOpLoad, fGen.getType(fBaseType), base, fVecPointer, out); in load()
1628 fGen.writeInstruction(SpvOpLoad, fGen.getType(fBaseType), base, fVecPointer, out); in store()
1652 fGen.writeInstruction(SpvOpStore, fVecPointer, shuffle, out); in store()
1708 this->writeInstruction(SpvOpAccessChain, in getLValue()
1736 this->writeInstruction(SpvOpSelectionMerge, end, SpvSelectionControlMaskNone, out); in getLValue()
1737 this->writeInstruction(SpvOpBranchConditional, test, ifTrueLabel, ifFalseLabel, out); in getLValue()
1741 this->writeInstruction(SpvOpBranch, end, out); in getLValue()
1746 this->writeInstruction(SpvOpBranch, end, out); in getLValue()
1748 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, ifTrue, in getLValue()
1763 this->writeInstruction(SpvOpVariable, type, result, SpvStorageClassFunction, in getLValue()
1765 this->writeInstruction(SpvOpStore, result, this->writeExpression(expr, out), out); in getLValue()
1779 this->writeInstruction(SpvOpLoad, this->getType(ref.fVariable.fType), result, var, out); in writeVariableReference()
1809 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), xId, in writeVariableReference()
1820 this->writeInstruction(SpvOpLoad, this->getType(*fContext.fFloat_Type), heightRead, in writeVariableReference()
1823 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), rawYId, in writeVariableReference()
1826 this->writeInstruction(SpvOpFSub, this->getType(*fContext.fFloat_Type), flippedYId, in writeVariableReference()
1832 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), wId, in writeVariableReference()
1849 this->writeInstruction(SpvOpLogicalNot, this->getType(*fContext.fBool_Type), inverse, in writeVariableReference()
1861 this->writeInstruction(SpvOpVectorExtractDynamic, this->getType(expr.fType), result, base, in writeIndexExpression()
1877 this->writeInstruction(SpvOpCompositeExtract, this->getType(swizzle.fType), result, base, in writeSwizzle()
1924 this->writeInstruction(ifFloat, this->getType(resultType), result, lhs, rhs, out); in writeBinaryOperation()
1926 this->writeInstruction(ifInt, this->getType(resultType), result, lhs, rhs, out); in writeBinaryOperation()
1928 this->writeInstruction(ifUInt, this->getType(resultType), result, lhs, rhs, out); in writeBinaryOperation()
1930 this->writeInstruction(ifBool, this->getType(resultType), result, lhs, rhs, out); in writeBinaryOperation()
1936 this->writeInstruction(SpvOpDecorate, result, SpvDecorationRelaxedPrecision, in writeBinaryOperation()
1946 this->writeInstruction(op, this->getType(*fContext.fBool_Type), result, id, out); in foldToBool()
1968 this->writeInstruction(SpvOpCompositeExtract, columnType, columnL, lhs, i, out); in writeMatrixComparison()
1970 this->writeInstruction(SpvOpCompositeExtract, columnType, columnR, rhs, i, out); in writeMatrixComparison()
1972 this->writeInstruction(compareOp, bvecType, compare, columnL, columnR, out); in writeMatrixComparison()
1974 this->writeInstruction(vectorMergeOperator, boolType, merge, compare, out); in writeMatrixComparison()
1977 this->writeInstruction(mergeOperator, boolType, next, result, merge, out); in writeMatrixComparison()
1999 this->writeInstruction(SpvOpCompositeExtract, columnType, columnL, lhs, i, out); in writeComponentwiseMatrixBinary()
2001 this->writeInstruction(SpvOpCompositeExtract, columnType, columnR, rhs, i, out); in writeComponentwiseMatrixBinary()
2003 this->writeInstruction(op, columnType, columns[i], columnL, columnR, out); in writeComponentwiseMatrixBinary()
2039 this->writeInstruction(SpvOpFDiv, this->getType(rightType), inverse, one, rhs, out); in writeBinaryExpression()
2045 this->writeInstruction(SpvOpVectorTimesScalar, this->getType(resultType), in writeBinaryExpression()
2063 this->writeInstruction(SpvOpVectorTimesScalar, this->getType(resultType), in writeBinaryExpression()
2089 this->writeInstruction(spvop, this->getType(resultType), result, lhs, rhs, out); in writeBinaryExpression()
2094 this->writeInstruction(SpvOpVectorTimesMatrix, this->getType(resultType), result, in writeBinaryExpression()
2098 this->writeInstruction(SpvOpMatrixTimesScalar, this->getType(resultType), result, in writeBinaryExpression()
2192 this->writeInstruction(SpvOpMatrixTimesMatrix, this->getType(resultType), result, in writeBinaryExpression()
2271 this->writeInstruction(SpvOpSelectionMerge, end, SpvSelectionControlMaskNone, out); in writeLogicalAnd()
2272 this->writeInstruction(SpvOpBranchConditional, lhs, rhsLabel, end, out); in writeLogicalAnd()
2276 this->writeInstruction(SpvOpBranch, end, out); in writeLogicalAnd()
2279 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, falseConstant, in writeLogicalAnd()
2292 this->writeInstruction(SpvOpSelectionMerge, end, SpvSelectionControlMaskNone, out); in writeLogicalOr()
2293 this->writeInstruction(SpvOpBranchConditional, lhs, end, rhsLabel, out); in writeLogicalOr()
2297 this->writeInstruction(SpvOpBranch, end, out); in writeLogicalOr()
2300 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, trueConstant, in writeLogicalOr()
2312 this->writeInstruction(SpvOpSelect, this->getType(t.fType), result, test, trueId, falseId, in writeTernaryExpression()
2319 this->writeInstruction(SpvOpVariable, this->getPointerType(t.fType, SpvStorageClassFunction), in writeTernaryExpression()
2324 this->writeInstruction(SpvOpSelectionMerge, end, SpvSelectionControlMaskNone, out); in writeTernaryExpression()
2325 this->writeInstruction(SpvOpBranchConditional, test, trueLabel, falseLabel, out); in writeTernaryExpression()
2327 this->writeInstruction(SpvOpStore, var, this->writeExpression(*t.fIfTrue, out), out); in writeTernaryExpression()
2328 this->writeInstruction(SpvOpBranch, end, out); in writeTernaryExpression()
2330 this->writeInstruction(SpvOpStore, var, this->writeExpression(*t.fIfFalse, out), out); in writeTernaryExpression()
2331 this->writeInstruction(SpvOpBranch, end, out); in writeTernaryExpression()
2334 this->writeInstruction(SpvOpLoad, this->getType(t.fType), result, var, out); in writeTernaryExpression()
2345 this->writeInstruction(SpvOpFNegate, typeId, result, expr, out); in writePrefixExpression()
2347 this->writeInstruction(SpvOpSNegate, typeId, result, expr, out); in writePrefixExpression()
2378 this->writeInstruction(SpvOpLogicalNot, this->getType(p.fOperand->fType), result, in writePrefixExpression()
2384 this->writeInstruction(SpvOpNot, this->getType(p.fOperand->fType), result, in writePrefixExpression()
2419 this->writeInstruction(SpvOpConstantTrue, this->getType(b.fType), fBoolTrue, in writeBoolLiteral()
2426 this->writeInstruction(SpvOpConstantFalse, this->getType(b.fType), fBoolFalse, in writeBoolLiteral()
2448 this->writeInstruction(SpvOpConstant, this->getType(i.fType), result, (SpvId) i.fValue, in writeIntLiteral()
2472 this->writeInstruction(SpvOpConstant, this->getType(f.fType), result, bits, in writeFloatLiteral()
2486 this->writeInstruction(SpvOpConstant, this->getType(f.fType), result, in writeFloatLiteral()
2497 this->writeInstruction(SpvOpFunction, this->getType(f.fReturnType), result, in writeFunctionStart()
2499 this->writeInstruction(SpvOpName, result, f.fName, fNameBuffer); in writeFunctionStart()
2505 this->writeInstruction(SpvOpFunctionParameter, type, id, out); in writeFunctionStart()
2523 this->writeInstruction(SpvOpReturn, out); in writeFunction()
2525 this->writeInstruction(SpvOpUnreachable, out); in writeFunction()
2528 this->writeInstruction(SpvOpFunctionEnd, out); in writeFunction()
2534 this->writeInstruction(SpvOpDecorate, target, SpvDecorationLocation, layout.fLocation, in writeLayout()
2538 this->writeInstruction(SpvOpDecorate, target, SpvDecorationBinding, layout.fBinding, in writeLayout()
2542 this->writeInstruction(SpvOpDecorate, target, SpvDecorationIndex, layout.fIndex, in writeLayout()
2546 this->writeInstruction(SpvOpDecorate, target, SpvDecorationDescriptorSet, layout.fSet, in writeLayout()
2550 this->writeInstruction(SpvOpDecorate, target, SpvDecorationInputAttachmentIndex, in writeLayout()
2556 this->writeInstruction(SpvOpDecorate, target, SpvDecorationBuiltIn, layout.fBuiltin, in writeLayout()
2563 this->writeInstruction(SpvOpMemberDecorate, target, member, SpvDecorationLocation, in writeLayout()
2567 this->writeInstruction(SpvOpMemberDecorate, target, member, SpvDecorationBinding, in writeLayout()
2571 this->writeInstruction(SpvOpMemberDecorate, target, member, SpvDecorationIndex, in writeLayout()
2575 this->writeInstruction(SpvOpMemberDecorate, target, member, SpvDecorationDescriptorSet, in writeLayout()
2579 this->writeInstruction(SpvOpDecorate, target, member, SpvDecorationInputAttachmentIndex, in writeLayout()
2583 this->writeInstruction(SpvOpMemberDecorate, target, member, SpvDecorationBuiltIn, in writeLayout()
2642 this->writeInstruction(SpvOpDecorate, typeId, SpvDecorationBufferBlock, fDecorationBuffer); in writeInterfaceBlock()
2644 this->writeInstruction(SpvOpDecorate, typeId, SpvDecorationBlock, fDecorationBuffer); in writeInterfaceBlock()
2648 this->writeInstruction(SpvOpTypePointer, ptrType, storageClass, typeId, fConstantBuffer); in writeInterfaceBlock()
2649 this->writeInstruction(SpvOpVariable, ptrType, result, storageClass, fConstantBuffer); in writeInterfaceBlock()
2668 this->writeInstruction(SpvOpDecorate, id, SpvDecorationRelaxedPrecision, fDecorationBuffer); in writePrecisionModifier()
2729 this->writeInstruction(SpvOpVariable, type, id, storageClass, fConstantBuffer); in writeGlobalVars()
2730 this->writeInstruction(SpvOpName, id, var->fName, fNameBuffer); in writeGlobalVars()
2736 this->writeInstruction(SpvOpStore, id, value, fGlobalInitializersBuffer); in writeGlobalVars()
2741 this->writeInstruction(SpvOpDecorate, id, SpvDecorationFlat, fDecorationBuffer); in writeGlobalVars()
2744 this->writeInstruction(SpvOpDecorate, id, SpvDecorationNoPerspective, in writeGlobalVars()
2765 this->writeInstruction(SpvOpVariable, type, id, SpvStorageClassFunction, fVariableBuffer); in writeVarDeclarations()
2766 this->writeInstruction(SpvOpName, id, var->fName, fNameBuffer); in writeVarDeclarations()
2769 this->writeInstruction(SpvOpStore, id, value, out); in writeVarDeclarations()
2806 this->writeInstruction(SpvOpBranch, fBreakTarget.top(), out); in writeStatement()
2809 this->writeInstruction(SpvOpBranch, fContinueTarget.top(), out); in writeStatement()
2812 this->writeInstruction(SpvOpKill, out); in writeStatement()
2831 this->writeInstruction(SpvOpSelectionMerge, end, SpvSelectionControlMaskNone, out); in writeIfStatement()
2832 this->writeInstruction(SpvOpBranchConditional, test, ifTrue, ifFalse, out); in writeIfStatement()
2836 this->writeInstruction(SpvOpBranch, end, out); in writeIfStatement()
2841 this->writeInstruction(SpvOpBranch, end, out); in writeIfStatement()
2845 this->writeInstruction(SpvOpSelectionMerge, ifFalse, SpvSelectionControlMaskNone, out); in writeIfStatement()
2846 this->writeInstruction(SpvOpBranchConditional, test, ifTrue, ifFalse, out); in writeIfStatement()
2850 this->writeInstruction(SpvOpBranch, ifFalse, out); in writeIfStatement()
2867 this->writeInstruction(SpvOpBranch, header, out); in writeForStatement()
2869 this->writeInstruction(SpvOpLoopMerge, end, next, SpvLoopControlMaskNone, out); in writeForStatement()
2870 this->writeInstruction(SpvOpBranch, start, out); in writeForStatement()
2874 this->writeInstruction(SpvOpBranchConditional, test, body, end, out); in writeForStatement()
2879 this->writeInstruction(SpvOpBranch, next, out); in writeForStatement()
2885 this->writeInstruction(SpvOpBranch, header, out); in writeForStatement()
2906 this->writeInstruction(SpvOpBranch, header, out); in writeWhileStatement()
2908 this->writeInstruction(SpvOpLoopMerge, end, start, SpvLoopControlMaskNone, out); in writeWhileStatement()
2909 this->writeInstruction(SpvOpBranch, start, out); in writeWhileStatement()
2912 this->writeInstruction(SpvOpBranchConditional, test, body, end, out); in writeWhileStatement()
2916 this->writeInstruction(SpvOpBranch, start, out); in writeWhileStatement()
2938 this->writeInstruction(SpvOpBranch, header, out); in writeDoStatement()
2940 this->writeInstruction(SpvOpLoopMerge, end, start, SpvLoopControlMaskNone, out); in writeDoStatement()
2941 this->writeInstruction(SpvOpBranch, start, out); in writeDoStatement()
2945 this->writeInstruction(SpvOpBranch, next, out); in writeDoStatement()
2949 this->writeInstruction(SpvOpBranchConditional, test, start, end, out); in writeDoStatement()
2972 this->writeInstruction(SpvOpSelectionMerge, end, SpvSelectionControlMaskNone, out); in writeSwitchStatement()
2990 this->writeInstruction(SpvOpBranch, labels[i + 1], out); in writeSwitchStatement()
2999 this->writeInstruction(SpvOpReturnValue, this->writeExpression(*r.fExpression, out), in writeReturnStatement()
3002 this->writeInstruction(SpvOpReturn, out); in writeReturnStatement()
3039 this->writeInstruction(SpvOpExecutionMode, entryPoint, input, out); in writeGeometryShaderExecutionMode()
3058 this->writeInstruction(SpvOpExecutionMode, entryPoint, output, out); in writeGeometryShaderExecutionMode()
3061 this->writeInstruction(SpvOpExecutionMode, entryPoint, in writeGeometryShaderExecutionMode()
3068 this->writeInstruction(SpvOpExecutionMode, entryPoint, SpvExecutionModeInvocations, in writeGeometryShaderExecutionMode()
3151 this->writeInstruction(SpvOpExtInstImport, fGLSLExtendedInstructions, "GLSL.std.450", out); in writeInstructions()
3152 this->writeInstruction(SpvOpMemoryModel, SpvAddressingModelLogical, SpvMemoryModelGLSL450, out); in writeInstructions()
3178 this->writeInstruction(SpvOpExecutionMode, in writeInstructions()
3185 this->writeInstruction(SpvOpSourceExtension, ((Extension&) e).fName.c_str(), out); in writeInstructions()