• Home
  • Raw
  • Download

Lines Matching refs:fContext

441         return *fContext.fFloat_Type;  in getActualType()
444 return *fContext.fInt_Type; in getActualType()
447 return *fContext.fUInt_Type; in getActualType()
450 if (type.componentType() == *fContext.fHalf_Type) { in getActualType()
451 return fContext.fFloat_Type->toCompound(fContext, type.columns(), type.rows()); in getActualType()
453 if (type.componentType() == *fContext.fShort_Type || in getActualType()
454 type.componentType() == *fContext.fByte_Type) { in getActualType()
455 return fContext.fInt_Type->toCompound(fContext, type.columns(), type.rows()); in getActualType()
457 if (type.componentType() == *fContext.fUShort_Type || in getActualType()
458 type.componentType() == *fContext.fUByte_Type) { in getActualType()
459 return fContext.fUInt_Type->toCompound(fContext, type.columns(), type.rows()); in getActualType()
477 if (type == *fContext.fBool_Type) { in getType()
479 } else if (type == *fContext.fInt_Type || type == *fContext.fShort_Type || in getType()
480 type == *fContext.fIntLiteral_Type) { in getType()
482 } else if (type == *fContext.fUInt_Type || type == *fContext.fUShort_Type) { in getType()
484 } else if (type == *fContext.fFloat_Type || type == *fContext.fHalf_Type || in getType()
485 type == *fContext.fFloatLiteral_Type) { in getType()
487 } else if (type == *fContext.fDouble_Type) { in getType()
500 this->getType(index_type(fContext, type), layout), in getType()
508 IntLiteral count(fContext, -1, type.columns()); in getType()
535 this->getType(*fContext.fFloat_Type, layout), in getType()
546 if (type == *fContext.fVoid_Type) { in getType()
682 if (std::get<0>(intrinsic->second) == kSpecial_IntrinsicKind || is_float(fContext, type)) { in writeIntrinsicCall()
684 } else if (is_signed(fContext, type)) { in writeIntrinsicCall()
686 } else if (is_unsigned(fContext, type)) { in writeIntrinsicCall()
688 } else if (is_bool(fContext, type)) { in writeIntrinsicCall()
727 if (c.fType != *fContext.fVoid_Type) { in writeIntrinsicCall()
766 this->writeWord(this->getType(a->fType.toCompound(fContext, vectorSize, 1)), out); in vectorize()
789 if (is_float(fContext, type)) { in writeGLSLExtendedInstruction()
791 } else if (is_signed(fContext, type)) { in writeGLSLExtendedInstruction()
793 } else if (is_unsigned(fContext, type)) { in writeGLSLExtendedInstruction()
825 args.emplace_back(new FloatLiteral(fContext, -1, 0.0)); in writeSpecialIntrinsic()
826 args.emplace_back(new FloatLiteral(fContext, -1, 0.0)); in writeSpecialIntrinsic()
827 Constructor ctor(-1, *fContext.fFloat2_Type, std::move(args)); in writeSpecialIntrinsic()
854 if (c.fArguments[1]->fType == *fContext.fFloat2_Type) { in writeSpecialIntrinsic()
857 SkASSERT(c.fArguments[1]->fType == *fContext.fFloat_Type); in writeSpecialIntrinsic()
861 if (c.fArguments[1]->fType == *fContext.fFloat3_Type) { in writeSpecialIntrinsic()
864 SkASSERT(c.fArguments[1]->fType == *fContext.fFloat2_Type); in writeSpecialIntrinsic()
868 if (c.fArguments[1]->fType == *fContext.fFloat4_Type) { in writeSpecialIntrinsic()
871 SkASSERT(c.fArguments[1]->fType == *fContext.fFloat3_Type); in writeSpecialIntrinsic()
891 FloatLiteral lodBias(fContext, -1, -0.5); in writeSpecialIntrinsic()
908 if (is_float(fContext, operandType)) { in writeSpecialIntrinsic()
910 } else if (is_signed(fContext, operandType)) { in writeSpecialIntrinsic()
912 } else if (is_unsigned(fContext, operandType)) { in writeSpecialIntrinsic()
972 finalArgs.emplace_back(new FloatLiteral(fContext, -1, 0)); in writeSpecialIntrinsic()
973 finalArgs.emplace_back(new FloatLiteral(fContext, -1, 1)); in writeSpecialIntrinsic()
1127 FloatLiteral zero(fContext, -1, 0); in writeUniformScaleMatrix()
1133 this->writeWord(this->getType(type.componentType().toCompound(fContext, type.rows(), 1)), in writeUniformScaleMatrix()
1158 SpvId srcColumnType = this->getType(srcType.componentType().toCompound(fContext, in writeMatrixCopy()
1161 SpvId dstColumnType = this->getType(dstType.componentType().toCompound(fContext, in writeMatrixCopy()
1165 if (dstType.componentType() == *fContext.fFloat_Type) { in writeMatrixCopy()
1166 FloatLiteral zero(fContext, -1, 0.0); in writeMatrixCopy()
1168 } else if (dstType.componentType() == *fContext.fInt_Type) { in writeMatrixCopy()
1169 IntLiteral zero(fContext, -1, 0); in writeMatrixCopy()
1286 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, 2, 1)); in writeMatrixConstructor()
1294 SpvId columnType = this->getType(c.fType.componentType().toCompound(fContext, rows, 1)); in writeMatrixConstructor()
1353 if (dst == *fContext.fFloat_Type || dst == *fContext.fHalf_Type) { in writeVectorConstructor()
1354 if (src == *fContext.fFloat_Type || src == *fContext.fHalf_Type) { in writeVectorConstructor()
1358 } else if (src == *fContext.fInt_Type || in writeVectorConstructor()
1359 src == *fContext.fShort_Type || in writeVectorConstructor()
1360 src == *fContext.fByte_Type) { in writeVectorConstructor()
1362 } else if (src == *fContext.fUInt_Type || in writeVectorConstructor()
1363 src == *fContext.fUShort_Type || in writeVectorConstructor()
1364 src == *fContext.fUByte_Type) { in writeVectorConstructor()
1369 } else if (dst == *fContext.fInt_Type || in writeVectorConstructor()
1370 dst == *fContext.fShort_Type || in writeVectorConstructor()
1371 dst == *fContext.fByte_Type) { in writeVectorConstructor()
1372 if (src == *fContext.fFloat_Type || src == *fContext.fHalf_Type) { in writeVectorConstructor()
1374 } else if (src == *fContext.fInt_Type || in writeVectorConstructor()
1375 src == *fContext.fShort_Type || in writeVectorConstructor()
1376 src == *fContext.fByte_Type) { in writeVectorConstructor()
1380 } else if (src == *fContext.fUInt_Type || in writeVectorConstructor()
1381 src == *fContext.fUShort_Type || in writeVectorConstructor()
1382 src == *fContext.fUByte_Type) { in writeVectorConstructor()
1387 } else if (dst == *fContext.fUInt_Type || in writeVectorConstructor()
1388 dst == *fContext.fUShort_Type || in writeVectorConstructor()
1389 dst == *fContext.fUByte_Type) { in writeVectorConstructor()
1390 if (src == *fContext.fFloat_Type || src == *fContext.fHalf_Type) { in writeVectorConstructor()
1392 } else if (src == *fContext.fInt_Type || in writeVectorConstructor()
1393 src == *fContext.fShort_Type || in writeVectorConstructor()
1394 src == *fContext.fByte_Type) { in writeVectorConstructor()
1396 } else if (src == *fContext.fUInt_Type || in writeVectorConstructor()
1397 src == *fContext.fUShort_Type || in writeVectorConstructor()
1398 src == *fContext.fUByte_Type) { in writeVectorConstructor()
1465 if (c.fType == *fContext.fFloat_Type || c.fType == *fContext.fHalf_Type) { in writeConstructor()
1467 } else if (c.fType == *fContext.fInt_Type || in writeConstructor()
1468 c.fType == *fContext.fShort_Type || in writeConstructor()
1469 c.fType == *fContext.fByte_Type) { in writeConstructor()
1471 } else if (c.fType == *fContext.fUInt_Type || in writeConstructor()
1472 c.fType == *fContext.fUShort_Type || in writeConstructor()
1473 c.fType == *fContext.fUByte_Type) { in writeConstructor()
1539 IntLiteral index(fContext, -1, fieldExpr.fFieldIndex); in getAccessChain()
1706 IntLiteral index(fContext, -1, swizzle.fComponents[0]); in getLValue()
1748 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, ifTrue, in getLValue()
1789 fields.emplace_back(Modifiers(), SKSL_RTHEIGHT_NAME, fContext.fFloat_Type.get()); in writeVariableReference()
1809 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), xId, in writeVariableReference()
1811 IntLiteral fieldIndex(fContext, -1, fRTHeightFieldIndex); in writeVariableReference()
1815 this->writeWord(this->getPointerType(*fContext.fFloat_Type, SpvStorageClassUniform), out); 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()
1828 FloatLiteral zero(fContext, -1, 0.0); in writeVariableReference()
1830 FloatLiteral one(fContext, -1, 1.0); in writeVariableReference()
1832 this->writeInstruction(SpvOpCompositeExtract, this->getType(*fContext.fFloat_Type), wId, in writeVariableReference()
1836 this->writeWord(this->getType(*fContext.fFloat4_Type), out); in writeVariableReference()
1849 this->writeInstruction(SpvOpLogicalNot, this->getType(*fContext.fBool_Type), inverse, in writeVariableReference()
1888 FloatLiteral zero(fContext, -1, 0); in writeSwizzle()
1890 FloatLiteral one(fContext, -1, 1); in writeSwizzle()
1892 SpvId type = this->getType(*fContext.fFloat2_Type); in writeSwizzle()
1923 if (is_float(fContext, operandType)) { in writeBinaryOperation()
1925 } else if (is_signed(fContext, operandType)) { in writeBinaryOperation()
1927 } else if (is_unsigned(fContext, operandType)) { in writeBinaryOperation()
1929 } else if (operandType == *fContext.fBool_Type) { in writeBinaryOperation()
1946 this->writeInstruction(op, this->getType(*fContext.fBool_Type), result, id, out); in foldToBool()
1956 SpvOp_ compareOp = is_float(fContext, operandType) ? floatOperator : intOperator; 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()
1991 SpvOp_ op = is_float(fContext, operandType) ? floatOperator : intOperator; in writeComponentwiseMatrixBinary()
1993 SpvId columnType = this->getType(operandType.componentType().toCompound(fContext, in writeComponentwiseMatrixBinary()
2037 SpvId one = this->writeExpression(*create_literal_1(fContext, rightType), out); in writeBinaryExpression()
2117 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2120 tmpType = &fContext.fBool_Type->toCompound(fContext, in writeBinaryExpression()
2136 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2139 tmpType = &fContext.fBool_Type->toCompound(fContext, in writeBinaryExpression()
2151 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2156 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2160 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2165 SkASSERT(resultType == *fContext.fBool_Type); in writeBinaryExpression()
2265 BoolLiteral falseLiteral(fContext, -1, false); in writeLogicalAnd()
2279 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, falseConstant, in writeLogicalAnd()
2286 BoolLiteral trueLiteral(fContext, -1, true); in writeLogicalOr()
2300 this->writeInstruction(SpvOpPhi, this->getType(*fContext.fBool_Type), result, trueConstant, in writeLogicalOr()
2344 if (is_float(fContext, p.fType)) { in writePrefixExpression()
2346 } else if (is_signed(fContext, p.fType)) { in writePrefixExpression()
2359 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2368 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePrefixExpression()
2376 SkASSERT(p.fOperand->fType == *fContext.fBool_Type); in writePrefixExpression()
2396 SpvId one = this->writeExpression(*create_literal_1(fContext, p.fType), out); in writePostfixExpression()
2435 if (i.fType == *fContext.fInt_Type) { in writeIntLiteral()
2437 } else if (i.fType == *fContext.fUInt_Type) { in writeIntLiteral()
2439 } else if (i.fType == *fContext.fShort_Type) { in writeIntLiteral()
2441 } else if (i.fType == *fContext.fUShort_Type) { in writeIntLiteral()
2457 if (f.fType != *fContext.fDouble_Type) { in writeFloatLiteral()
2459 if (f.fType == *fContext.fHalf_Type) { in writeFloatLiteral()
2522 if (f.fDeclaration.fReturnType == *fContext.fVoid_Type) { in writeFunction()
2625 … fields.emplace_back(Modifiers(), StringFragment(SKSL_RTHEIGHT_NAME), fContext.fFloat_Type.get()); in writeInterfaceBlock()
3115 intf.fSizes.emplace_back(new IntLiteral(fContext, -1, skInSize)); in writeInstructions()