Lines Matching refs:fContext
436 if (type == *fContext.fHalf_Type) { in getActualType()
437 return *fContext.fFloat_Type; in getActualType()
439 if (type == *fContext.fShort_Type || type == *fContext.fByte_Type) { in getActualType()
440 return *fContext.fInt_Type; in getActualType()
442 if (type == *fContext.fUShort_Type || type == *fContext.fUByte_Type) { in getActualType()
443 return *fContext.fUInt_Type; in getActualType()
446 if (type.componentType() == *fContext.fHalf_Type) { in getActualType()
447 return fContext.fFloat_Type->toCompound(fContext, type.columns(), type.rows()); in getActualType()
449 if (type.componentType() == *fContext.fShort_Type || in getActualType()
450 type.componentType() == *fContext.fByte_Type) { in getActualType()
451 return fContext.fInt_Type->toCompound(fContext, type.columns(), type.rows()); in getActualType()
453 if (type.componentType() == *fContext.fUShort_Type || in getActualType()
454 type.componentType() == *fContext.fUByte_Type) { in getActualType()
455 return fContext.fUInt_Type->toCompound(fContext, type.columns(), type.rows()); in getActualType()
473 if (type == *fContext.fBool_Type) { in getType()
475 } else if (type == *fContext.fInt_Type) { in getType()
477 } else if (type == *fContext.fUInt_Type) { in getType()
479 } else if (type == *fContext.fFloat_Type) { in getType()
481 } else if (type == *fContext.fDouble_Type) { in getType()
494 this->getType(index_type(fContext, type), layout), in getType()
502 IntLiteral count(fContext, -1, type.columns()); in getType()
529 this->getType(*fContext.fFloat_Type, layout), in getType()
540 if (type == *fContext.fVoid_Type) { in getType()
676 if (std::get<0>(intrinsic->second) == kSpecial_IntrinsicKind || is_float(fContext, type)) { in writeIntrinsicCall()
678 } else if (is_signed(fContext, type)) { in writeIntrinsicCall()
680 } else if (is_unsigned(fContext, type)) { in writeIntrinsicCall()
682 } else if (is_bool(fContext, type)) { in writeIntrinsicCall()
721 if (c.fType != *fContext.fVoid_Type) { in writeIntrinsicCall()
760 this->writeWord(this->getType(a->fType.toCompound(fContext, vectorSize, 1)), out); in vectorize()
782 if (is_float(fContext, type)) { in writeGLSLExtendedInstruction()
784 } else if (is_signed(fContext, type)) { in writeGLSLExtendedInstruction()
786 } else if (is_unsigned(fContext, type)) { in writeGLSLExtendedInstruction()
818 args.emplace_back(new FloatLiteral(fContext, -1, 0.0)); in writeSpecialIntrinsic()
819 args.emplace_back(new FloatLiteral(fContext, -1, 0.0)); in writeSpecialIntrinsic()
820 Constructor ctor(-1, *fContext.fFloat2_Type, std::move(args)); in writeSpecialIntrinsic()
847 if (c.fArguments[1]->fType == *fContext.fFloat2_Type) { in writeSpecialIntrinsic()
850 SkASSERT(c.fArguments[1]->fType == *fContext.fFloat_Type); in writeSpecialIntrinsic()
854 if (c.fArguments[1]->fType == *fContext.fFloat3_Type) { in writeSpecialIntrinsic()
857 SkASSERT(c.fArguments[1]->fType == *fContext.fFloat2_Type); in writeSpecialIntrinsic()
861 if (c.fArguments[1]->fType == *fContext.fFloat4_Type) { in writeSpecialIntrinsic()
864 SkASSERT(c.fArguments[1]->fType == *fContext.fFloat3_Type); in writeSpecialIntrinsic()
884 FloatLiteral lodBias(fContext, -1, -0.5); in writeSpecialIntrinsic()
901 if (is_float(fContext, operandType)) { in writeSpecialIntrinsic()
903 } else if (is_signed(fContext, operandType)) { in writeSpecialIntrinsic()
905 } else if (is_unsigned(fContext, operandType)) { in writeSpecialIntrinsic()
950 finalArgs.emplace_back(new FloatLiteral(fContext, -1, 0)); in writeSpecialIntrinsic()
951 finalArgs.emplace_back(new FloatLiteral(fContext, -1, 1)); in writeSpecialIntrinsic()
1104 FloatLiteral zero(fContext, -1, 0); in writeUniformScaleMatrix()
1110 this->writeWord(this->getType(type.componentType().toCompound(fContext, type.rows(), 1)), in writeUniformScaleMatrix()
1133 SpvId srcColumnType = this->getType(srcType.componentType().toCompound(fContext, in writeMatrixCopy()
1136 SpvId dstColumnType = this->getType(dstType.componentType().toCompound(fContext, in writeMatrixCopy()
1140 if (dstType.componentType() == *fContext.fFloat_Type) { in writeMatrixCopy()
1141 FloatLiteral zero(fContext, -1, 0.0); in writeMatrixCopy()
1143 } else if (dstType.componentType() == *fContext.fInt_Type) { in writeMatrixCopy()
1144 IntLiteral zero(fContext, -1, 0); in writeMatrixCopy()
1233 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, 2, 1)); in writeMatrixConstructor()
1268 this->writeWord(this->getType(c.fType.componentType().toCompound(fContext, rows, in writeMatrixConstructor()
1312 if (dst == *fContext.fFloat_Type || dst == *fContext.fHalf_Type) { in writeVectorConstructor()
1313 if (src == *fContext.fFloat_Type || src == *fContext.fHalf_Type) { in writeVectorConstructor()
1317 } else if (src == *fContext.fInt_Type || in writeVectorConstructor()
1318 src == *fContext.fShort_Type || in writeVectorConstructor()
1319 src == *fContext.fByte_Type) { in writeVectorConstructor()
1321 } else if (src == *fContext.fUInt_Type || in writeVectorConstructor()
1322 src == *fContext.fUShort_Type || in writeVectorConstructor()
1323 src == *fContext.fUByte_Type) { in writeVectorConstructor()
1328 } else if (dst == *fContext.fInt_Type || in writeVectorConstructor()
1329 dst == *fContext.fShort_Type || in writeVectorConstructor()
1330 dst == *fContext.fByte_Type) { in writeVectorConstructor()
1331 if (src == *fContext.fFloat_Type || src == *fContext.fHalf_Type) { in writeVectorConstructor()
1333 } else if (src == *fContext.fInt_Type || in writeVectorConstructor()
1334 src == *fContext.fShort_Type || in writeVectorConstructor()
1335 src == *fContext.fByte_Type) { in writeVectorConstructor()
1339 } else if (src == *fContext.fUInt_Type || in writeVectorConstructor()
1340 src == *fContext.fUShort_Type || in writeVectorConstructor()
1341 src == *fContext.fUByte_Type) { in writeVectorConstructor()
1346 } else if (dst == *fContext.fUInt_Type || in writeVectorConstructor()
1347 dst == *fContext.fUShort_Type || in writeVectorConstructor()
1348 dst == *fContext.fUByte_Type) { in writeVectorConstructor()
1349 if (src == *fContext.fFloat_Type || src == *fContext.fHalf_Type) { in writeVectorConstructor()
1351 } else if (src == *fContext.fInt_Type || in writeVectorConstructor()
1352 src == *fContext.fShort_Type || in writeVectorConstructor()
1353 src == *fContext.fByte_Type) { in writeVectorConstructor()
1355 } else if (src == *fContext.fUInt_Type || in writeVectorConstructor()
1356 src == *fContext.fUShort_Type || in writeVectorConstructor()
1357 src == *fContext.fUByte_Type) { in writeVectorConstructor()
1424 if (c.fType == *fContext.fFloat_Type || c.fType == *fContext.fHalf_Type) { in writeConstructor()
1426 } else if (c.fType == *fContext.fInt_Type || in writeConstructor()
1427 c.fType == *fContext.fShort_Type || in writeConstructor()
1428 c.fType == *fContext.fByte_Type) { in writeConstructor()
1430 } else if (c.fType == *fContext.fUInt_Type || in writeConstructor()
1431 c.fType == *fContext.fUShort_Type || in writeConstructor()
1432 c.fType == *fContext.fUByte_Type) { in writeConstructor()
1498 IntLiteral index(fContext, -1, fieldExpr.fFieldIndex); in getAccessChain()
1652 IntLiteral index(fContext, -1, swizzle.fComponents[0]); in getLValue()
1692 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, ifTrue, in getLValue()
1730 fields.emplace_back(Modifiers(), SKSL_RTHEIGHT_NAME, fContext.fFloat_Type.get()); in writeVariableReference()
1750 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), xId, in writeVariableReference()
1752 IntLiteral fieldIndex(fContext, -1, fRTHeightFieldIndex); in writeVariableReference()
1756 this->writeWord(this->getPointerType(*fContext.fFloat_Type, SpvStorageClassUniform), out); in writeVariableReference()
1761 this->writeInstruction(SpvOpLoad, this->getType(*fContext.fFloat_Type), heightRead, in writeVariableReference()
1764 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), rawYId, in writeVariableReference()
1767 this->writeInstruction(SpvOpFSub, this->getType(*fContext.fFloat_Type), flippedYId, in writeVariableReference()
1769 FloatLiteral zero(fContext, -1, 0.0); in writeVariableReference()
1771 FloatLiteral one(fContext, -1, 1.0); in writeVariableReference()
1773 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), wId, in writeVariableReference()
1777 this->writeWord(this->getType(*fContext.fFloat4_Type), out); in writeVariableReference()
1790 this->writeInstruction(SpvOpLogicalNot, this->getType(*fContext.fBool_Type), inverse, in writeVariableReference()
1838 if (is_float(fContext, operandType)) { in writeBinaryOperation()
1840 } else if (is_signed(fContext, operandType)) { in writeBinaryOperation()
1842 } else if (is_unsigned(fContext, operandType)) { in writeBinaryOperation()
1844 } else if (operandType == *fContext.fBool_Type) { in writeBinaryOperation()
1878 this->writeInstruction(op, this->getType(*fContext.fBool_Type), result, id, out); in foldToBool()
1888 SpvOp_ compareOp = is_float(fContext, operandType) ? floatOperator : intOperator; 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()
1923 SpvOp_ op = is_float(fContext, operandType) ? floatOperator : intOperator; in writeComponentwiseMatrixBinary()
1925 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeComponentwiseMatrixBinary()
2059 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2062 tmpType = &fContext.fBool_Type->toCompound(fContext, in writeBinaryExpression()
2078 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2081 tmpType = &fContext.fBool_Type->toCompound(fContext, in writeBinaryExpression()
2093 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2098 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2102 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2107 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2273 BoolLiteral falseLiteral(fContext, -1, false); in writeLogicalAnd()
2287 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, falseConstant, in writeLogicalAnd()
2294 BoolLiteral trueLiteral(fContext, -1, true); in writeLogicalOr()
2308 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, trueConstant, in writeLogicalOr()
2362 if (is_float(fContext, p.fType)) { in writePrefixExpression()
2364 } else if (is_signed(fContext, p.fType)) { in writePrefixExpression()
2376 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2385 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2393 SkASSERT(p.fOperand->fType == *fContext.fBool_Type); in writePrefixExpression()
2413 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePostfixExpression()
2451 if (i.fType == *fContext.fInt_Type) { in writeIntLiteral()
2462 SkASSERT(i.fType == *fContext.fUInt_Type); in writeIntLiteral()
2476 if (f.fType == *fContext.fFloat_Type || f.fType == *fContext.fHalf_Type) { in writeFloatLiteral()
2491 SkASSERT(f.fType == *fContext.fDouble_Type); in writeFloatLiteral()
2534 if (f.fDeclaration.fReturnType == *fContext.fVoid_Type) { in writeFunction()
2637 … fields.emplace_back(Modifiers(), StringFragment(SKSL_RTHEIGHT_NAME), fContext.fFloat_Type.get()); in writeInterfaceBlock()
3124 intf.fSizes.emplace_back(new IntLiteral(fContext, -1, skInSize)); in writeInstructions()