Lines Matching refs:Shader

215 	sw::PixelShader *Shader::getPixelShader() const  in getPixelShader()
220 sw::VertexShader *Shader::getVertexShader() const in getVertexShader()
305 …OutputASM::OutputASM(TParseContext &context, Shader *shaderObject) : TIntermTraverser(true, true, … in OutputASM()
335 Instruction *callMain = emit(sw::Shader::OPCODE_CALL); in output()
336 callMain->dst.type = sw::Shader::PARAMETER_LABEL; in output()
339 emit(sw::Shader::OPCODE_RET); in output()
358 sw::Shader::Opcode OutputASM::getOpcode(sw::Shader::Opcode op, TIntermTyped *in) const in getOpcode()
364 case sw::Shader::OPCODE_NEG: in getOpcode()
369 return sw::Shader::OPCODE_INEG; in getOpcode()
374 case sw::Shader::OPCODE_ABS: in getOpcode()
378 return sw::Shader::OPCODE_IABS; in getOpcode()
383 case sw::Shader::OPCODE_SGN: in getOpcode()
387 return sw::Shader::OPCODE_ISGN; in getOpcode()
392 case sw::Shader::OPCODE_ADD: in getOpcode()
397 return sw::Shader::OPCODE_IADD; in getOpcode()
402 case sw::Shader::OPCODE_SUB: in getOpcode()
407 return sw::Shader::OPCODE_ISUB; in getOpcode()
412 case sw::Shader::OPCODE_MUL: in getOpcode()
417 return sw::Shader::OPCODE_IMUL; in getOpcode()
422 case sw::Shader::OPCODE_DIV: in getOpcode()
426 return sw::Shader::OPCODE_IDIV; in getOpcode()
428 return sw::Shader::OPCODE_UDIV; in getOpcode()
433 case sw::Shader::OPCODE_IMOD: in getOpcode()
434 return baseType == EbtUInt ? sw::Shader::OPCODE_UMOD : op; in getOpcode()
435 case sw::Shader::OPCODE_ISHR: in getOpcode()
436 return baseType == EbtUInt ? sw::Shader::OPCODE_USHR : op; in getOpcode()
437 case sw::Shader::OPCODE_MIN: in getOpcode()
441 return sw::Shader::OPCODE_IMIN; in getOpcode()
443 return sw::Shader::OPCODE_UMIN; in getOpcode()
448 case sw::Shader::OPCODE_MAX: in getOpcode()
452 return sw::Shader::OPCODE_IMAX; in getOpcode()
454 return sw::Shader::OPCODE_UMAX; in getOpcode()
526 emit(sw::Shader::OPCODE_MUL, result, i, left, i, right); in visitBinary()
539 Instruction *dot = emit(sw::Shader::OPCODE_DP(size), result, 0, left, 0, right, i); in visitBinary()
553 Instruction *mul = emit(sw::Shader::OPCODE_MUL, result, i, left, 0, right, i); in visitBinary()
558 Instruction *mad = emit(sw::Shader::OPCODE_MAD, result, i, left, j, right, i, result, i); in visitBinary()
594 Instruction *mov = emit(sw::Shader::OPCODE_MOV, result, 0, left, srcIndex); in visitBinary()
611 Instruction *mov = emit(sw::Shader::OPCODE_MOV, result, index, left, index); in visitBinary()
616 sw::Shader::SourceParameter relativeRegister; in visitBinary()
628 emit(sw::Shader::OPCODE_EXTRACT, result, left, right); in visitBinary()
679 Instruction *mov = emit(sw::Shader::OPCODE_MOV, result, left); in visitBinary()
683 …case EOpAddAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_ADD, result), re… in visitBinary()
684 …case EOpAdd: if(visit == PostVisit) emitBinary(getOpcode(sw::Shader::OPCODE_ADD, result), re… in visitBinary()
685 …case EOpSubAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_SUB, result), re… in visitBinary()
686 …case EOpSub: if(visit == PostVisit) emitBinary(getOpcode(sw::Shader::OPCODE_SUB, result), re… in visitBinary()
687 …case EOpMulAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_MUL, result), re… in visitBinary()
688 …case EOpMul: if(visit == PostVisit) emitBinary(getOpcode(sw::Shader::OPCODE_MUL, result), re… in visitBinary()
689 …case EOpDivAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_DIV, result), re… in visitBinary()
690 …case EOpDiv: if(visit == PostVisit) emitBinary(getOpcode(sw::Shader::OPCODE_DIV, result), re… in visitBinary()
691 …case EOpIModAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_IMOD, … in visitBinary()
692 …case EOpIMod: if(visit == PostVisit) emitBinary(getOpcode(sw::Shader::OPCODE_IMOD, … in visitBinary()
693 …case EOpBitShiftLeftAssign: if(visit == PostVisit) emitAssign(sw::Shader::OPCODE_SHL, result, lef… in visitBinary()
694 …case EOpBitShiftLeft: if(visit == PostVisit) emitBinary(sw::Shader::OPCODE_SHL, result, lef… in visitBinary()
695 …case EOpBitShiftRightAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_ISHR, … in visitBinary()
696 …case EOpBitShiftRight: if(visit == PostVisit) emitBinary(getOpcode(sw::Shader::OPCODE_ISHR, … in visitBinary()
697 …case EOpBitwiseAndAssign: if(visit == PostVisit) emitAssign(sw::Shader::OPCODE_AND, result, lef… in visitBinary()
698 …case EOpBitwiseAnd: if(visit == PostVisit) emitBinary(sw::Shader::OPCODE_AND, result, lef… in visitBinary()
699 …case EOpBitwiseXorAssign: if(visit == PostVisit) emitAssign(sw::Shader::OPCODE_XOR, result, lef… in visitBinary()
700 …case EOpBitwiseXor: if(visit == PostVisit) emitBinary(sw::Shader::OPCODE_XOR, result, lef… in visitBinary()
701 …case EOpBitwiseOrAssign: if(visit == PostVisit) emitAssign(sw::Shader::OPCODE_OR, result, left… in visitBinary()
702 …case EOpBitwiseOr: if(visit == PostVisit) emitBinary(sw::Shader::OPCODE_OR, result, left… in visitBinary()
706 emitBinary(sw::Shader::OPCODE_EQ, result, left, right); in visitBinary()
711 emit(sw::Shader::OPCODE_EQ, &equal, 0, left, index, right, index); in visitBinary()
712 emit(sw::Shader::OPCODE_AND, result, result, &equal); in visitBinary()
719 emitBinary(sw::Shader::OPCODE_NE, result, left, right); in visitBinary()
724 emit(sw::Shader::OPCODE_NE, &notEqual, 0, left, index, right, index); in visitBinary()
725 emit(sw::Shader::OPCODE_OR, result, result, &notEqual); in visitBinary()
729 …case EOpLessThan: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_LT, result, le… in visitBinary()
730 …case EOpGreaterThan: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_GT, result, le… in visitBinary()
731 …case EOpLessThanEqual: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_LE, result, le… in visitBinary()
732 …case EOpGreaterThanEqual: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_GE, result, le… in visitBinary()
733 …case EOpVectorTimesScalarAssign: if(visit == PostVisit) emitAssign(getOpcode(sw::Shader::OPCODE_MU… in visitBinary()
734 …case EOpVectorTimesScalar: if(visit == PostVisit) emit(getOpcode(sw::Shader::OPCODE_MUL, lef… in visitBinary()
742 emit(sw::Shader::OPCODE_MUL, result, i, left, i, right, 0); in visitBinary()
749 emit(sw::Shader::OPCODE_MUL, result, i, left, 0, right, i); in visitBinary()
758 sw::Shader::Opcode dpOpcode = sw::Shader::OPCODE_DP(leftType.getNominalSize()); in visitBinary()
771 Instruction *mul = emit(sw::Shader::OPCODE_MUL, result, left, right); in visitBinary()
777 Instruction *mad = emit(sw::Shader::OPCODE_MAD, result, 0, left, i, right, 0, result); in visitBinary()
790 Instruction *mul = emit(sw::Shader::OPCODE_MUL, result, i, left, 0, right, i); in visitBinary()
795 Instruction *mad = emit(sw::Shader::OPCODE_MAD, result, i, left, j, right, i, result, i); in visitBinary()
806 emit(sw::Shader::OPCODE_OR, result, left, right); in visitBinary()
813 emit(sw::Shader::OPCODE_MOV, result, left); in visitBinary()
814 Instruction *ifnot = emit(sw::Shader::OPCODE_IF, 0, result); in visitBinary()
815 ifnot->src[0].modifier = sw::Shader::MODIFIER_NOT; in visitBinary()
819 emit(sw::Shader::OPCODE_MOV, result, right); in visitBinary()
820 emit(sw::Shader::OPCODE_ENDIF); in visitBinary()
824 …case EOpLogicalXor: if(visit == PostVisit) emit(sw::Shader::OPCODE_XOR, result, left, right… in visitBinary()
830 emit(sw::Shader::OPCODE_AND, result, left, right); in visitBinary()
837 emit(sw::Shader::OPCODE_MOV, result, left); in visitBinary()
838 emit(sw::Shader::OPCODE_IF, 0, result); in visitBinary()
842 emit(sw::Shader::OPCODE_MOV, result, right); in visitBinary()
843 emit(sw::Shader::OPCODE_ENDIF); in visitBinary()
861 sw::Shader::Opcode op = isMov ? sw::Shader::OPCODE_MOV : sw::Shader::OPCODE_NEG; in emitDeterminant()
876 …Instruction *det = emit(sw::Shader::OPCODE_DET2, result, outCol, arg, negate ? col1 : col0, arg, n… in emitDeterminant()
891 …Instruction *det = emit(sw::Shader::OPCODE_DET3, result, outCol, arg, col0, arg, negate ? col2 : c… in emitDeterminant()
898 … Instruction *det = emit(sw::Shader::OPCODE_DET4, result, outCol, arg, 0, arg, 1, arg, 2, arg, 3); in emitDeterminant()
943 sw::Shader::Opcode negOpcode = getOpcode(sw::Shader::OPCODE_NEG, arg); in visitUnary()
950 case EOpVectorLogicalNot: if(visit == PostVisit) emit(sw::Shader::OPCODE_NOT, result, arg); break; in visitUnary()
951 case EOpLogicalNot: if(visit == PostVisit) emit(sw::Shader::OPCODE_NOT, result, arg); break; in visitUnary()
957 sw::Shader::Opcode addOpcode = getOpcode(sw::Shader::OPCODE_ADD, arg); in visitUnary()
971 sw::Shader::Opcode subOpcode = getOpcode(sw::Shader::OPCODE_SUB, arg); in visitUnary()
983 sw::Shader::Opcode addOpcode = getOpcode(sw::Shader::OPCODE_ADD, arg); in visitUnary()
995 sw::Shader::Opcode subOpcode = getOpcode(sw::Shader::OPCODE_SUB, arg); in visitUnary()
1004 …case EOpRadians: if(visit == PostVisit) emit(sw::Shader::OPCODE_MUL, result, arg, &rad); … in visitUnary()
1005 …case EOpDegrees: if(visit == PostVisit) emit(sw::Shader::OPCODE_MUL, result, arg, &deg); … in visitUnary()
1006 case EOpSin: if(visit == PostVisit) emit(sw::Shader::OPCODE_SIN, result, arg); break; in visitUnary()
1007 case EOpCos: if(visit == PostVisit) emit(sw::Shader::OPCODE_COS, result, arg); break; in visitUnary()
1008 case EOpTan: if(visit == PostVisit) emit(sw::Shader::OPCODE_TAN, result, arg); break; in visitUnary()
1009 …case EOpAsin: if(visit == PostVisit) emit(sw::Shader::OPCODE_ASIN, result, arg); break; in visitUnary()
1010 …case EOpAcos: if(visit == PostVisit) emit(sw::Shader::OPCODE_ACOS, result, arg); break; in visitUnary()
1011 …case EOpAtan: if(visit == PostVisit) emit(sw::Shader::OPCODE_ATAN, result, arg); break; in visitUnary()
1012 …case EOpSinh: if(visit == PostVisit) emit(sw::Shader::OPCODE_SINH, result, arg); break; in visitUnary()
1013 …case EOpCosh: if(visit == PostVisit) emit(sw::Shader::OPCODE_COSH, result, arg); break; in visitUnary()
1014 …case EOpTanh: if(visit == PostVisit) emit(sw::Shader::OPCODE_TANH, result, arg); break; in visitUnary()
1015 …case EOpAsinh: if(visit == PostVisit) emit(sw::Shader::OPCODE_ASINH, result, arg); brea… in visitUnary()
1016 …case EOpAcosh: if(visit == PostVisit) emit(sw::Shader::OPCODE_ACOSH, result, arg); brea… in visitUnary()
1017 …case EOpAtanh: if(visit == PostVisit) emit(sw::Shader::OPCODE_ATANH, result, arg); brea… in visitUnary()
1018 case EOpExp: if(visit == PostVisit) emit(sw::Shader::OPCODE_EXP, result, arg); break; in visitUnary()
1019 case EOpLog: if(visit == PostVisit) emit(sw::Shader::OPCODE_LOG, result, arg); break; in visitUnary()
1020 …case EOpExp2: if(visit == PostVisit) emit(sw::Shader::OPCODE_EXP2, result, arg); break; in visitUnary()
1021 …case EOpLog2: if(visit == PostVisit) emit(sw::Shader::OPCODE_LOG2, result, arg); break; in visitUnary()
1022 …case EOpSqrt: if(visit == PostVisit) emit(sw::Shader::OPCODE_SQRT, result, arg); break; in visitUnary()
1023 case EOpInverseSqrt: if(visit == PostVisit) emit(sw::Shader::OPCODE_RSQ, result, arg); break; in visitUnary()
1024 …case EOpAbs: if(visit == PostVisit) emit(getOpcode(sw::Shader::OPCODE_ABS, result), r… in visitUnary()
1025 …case EOpSign: if(visit == PostVisit) emit(getOpcode(sw::Shader::OPCODE_SGN, result), r… in visitUnary()
1026 …case EOpFloor: if(visit == PostVisit) emit(sw::Shader::OPCODE_FLOOR, result, arg); brea… in visitUnary()
1027 …case EOpTrunc: if(visit == PostVisit) emit(sw::Shader::OPCODE_TRUNC, result, arg); brea… in visitUnary()
1028 …case EOpRound: if(visit == PostVisit) emit(sw::Shader::OPCODE_ROUND, result, arg); brea… in visitUnary()
1029 …case EOpRoundEven: if(visit == PostVisit) emit(sw::Shader::OPCODE_ROUNDEVEN, result, arg); … in visitUnary()
1030 …case EOpCeil: if(visit == PostVisit) emit(sw::Shader::OPCODE_CEIL, result, arg, result… in visitUnary()
1031 case EOpFract: if(visit == PostVisit) emit(sw::Shader::OPCODE_FRC, result, arg); break; in visitUnary()
1032 …case EOpIsNan: if(visit == PostVisit) emit(sw::Shader::OPCODE_ISNAN, result, arg); brea… in visitUnary()
1033 …case EOpIsInf: if(visit == PostVisit) emit(sw::Shader::OPCODE_ISINF, result, arg); brea… in visitUnary()
1034 …case EOpLength: if(visit == PostVisit) emit(sw::Shader::OPCODE_LEN(dim(arg)), result, ar… in visitUnary()
1035 …case EOpNormalize: if(visit == PostVisit) emit(sw::Shader::OPCODE_NRM(dim(arg)), result, ar… in visitUnary()
1036 …case EOpDFdx: if(visit == PostVisit) emit(sw::Shader::OPCODE_DFDX, result, arg); break; in visitUnary()
1037 …case EOpDFdy: if(visit == PostVisit) emit(sw::Shader::OPCODE_DFDY, result, arg); break; in visitUnary()
1038 …case EOpFwidth: if(visit == PostVisit) emit(sw::Shader::OPCODE_FWIDTH, result, arg); bre… in visitUnary()
1039 case EOpAny: if(visit == PostVisit) emit(sw::Shader::OPCODE_ANY, result, arg); break; in visitUnary()
1040 case EOpAll: if(visit == PostVisit) emit(sw::Shader::OPCODE_ALL, result, arg); break; in visitUnary()
1041 …case EOpFloatBitsToInt: if(visit == PostVisit) emit(sw::Shader::OPCODE_FLOATBITSTOINT, result, a… in visitUnary()
1042 …case EOpFloatBitsToUint: if(visit == PostVisit) emit(sw::Shader::OPCODE_FLOATBITSTOUINT, result, … in visitUnary()
1043 …case EOpIntBitsToFloat: if(visit == PostVisit) emit(sw::Shader::OPCODE_INTBITSTOFLOAT, result, a… in visitUnary()
1044 …case EOpUintBitsToFloat: if(visit == PostVisit) emit(sw::Shader::OPCODE_UINTBITSTOFLOAT, result, … in visitUnary()
1045 …case EOpPackSnorm2x16: if(visit == PostVisit) emit(sw::Shader::OPCODE_PACKSNORM2x16, result, ar… in visitUnary()
1046 …case EOpPackUnorm2x16: if(visit == PostVisit) emit(sw::Shader::OPCODE_PACKUNORM2x16, result, ar… in visitUnary()
1047 …case EOpPackHalf2x16: if(visit == PostVisit) emit(sw::Shader::OPCODE_PACKHALF2x16, result, arg… in visitUnary()
1048 …case EOpUnpackSnorm2x16: if(visit == PostVisit) emit(sw::Shader::OPCODE_UNPACKSNORM2x16, result, … in visitUnary()
1049 …case EOpUnpackUnorm2x16: if(visit == PostVisit) emit(sw::Shader::OPCODE_UNPACKUNORM2x16, result, … in visitUnary()
1050 …case EOpUnpackHalf2x16: if(visit == PostVisit) emit(sw::Shader::OPCODE_UNPACKHALF2x16, result, a… in visitUnary()
1060 Instruction *mov = emit(sw::Shader::OPCODE_MOV, result, j, arg, i); in visitUnary()
1097 Instruction *div = emit(sw::Shader::OPCODE_DIV, &invDet, &one, &invDet); in visitUnary()
1103 emit(sw::Shader::OPCODE_MUL, result, i, result, i, &invDet); in visitUnary()
1148 Instruction *label = emit(sw::Shader::OPCODE_LABEL); in visitAggregate()
1149 label->dst.type = sw::Shader::PARAMETER_LABEL; in visitAggregate()
1175 emit(sw::Shader::OPCODE_RET); in visitAggregate()
1210 Instruction *call = emit(sw::Shader::OPCODE_CALL); in visitAggregate()
1211 call->dst.type = sw::Shader::PARAMETER_LABEL; in visitAggregate()
1248 emit(sw::Shader::OPCODE_MOV, &coord, &projCoord); in visitAggregate()
1252 Instruction *rcp = emit(sw::Shader::OPCODE_RCPX, &coord, arg[1]); in visitAggregate()
1256 Instruction *mul = emit(sw::Shader::OPCODE_MUL, &coord, arg[1], &coord); in visitAggregate()
1262 emit(sw::Shader::OPCODE_MOV, &coord, arg[1]); in visitAggregate()
1273 …Instruction *tex = emit(textureFunction.offset ? sw::Shader::OPCODE_TEXOFFSET : sw::Shader::OPCODE… in visitAggregate()
1278 … Instruction *bias = emit(sw::Shader::OPCODE_MOV, &coord, arg[textureFunction.offset ? 3 : 2]); in visitAggregate()
1281 …Instruction *tex = emit(textureFunction.offset ? sw::Shader::OPCODE_TEXOFFSET : sw::Shader::OPCODE… in visitAggregate()
1290 Instruction *lod = emit(sw::Shader::OPCODE_MOV, &coord, arg[2]); in visitAggregate()
1293 emit(textureFunction.offset ? sw::Shader::OPCODE_TEXLDLOFFSET : sw::Shader::OPCODE_TEXLDL, in visitAggregate()
1303 … emit(textureFunction.offset ? sw::Shader::OPCODE_TEXELFETCHOFFSET : sw::Shader::OPCODE_TEXELFETCH, in visitAggregate()
1315 emit(textureFunction.offset ? sw::Shader::OPCODE_TEXGRADOFFSET : sw::Shader::OPCODE_TEXGRAD, in visitAggregate()
1322 emit(sw::Shader::OPCODE_TEXSIZE, result, arg[1], arg[0]); in visitAggregate()
1401 Instruction *init = emit(sw::Shader::OPCODE_MOV, result, i, &zero); in visitAggregate()
1465 Instruction *mov = emit(sw::Shader::OPCODE_MOV, result, index + offset, argi, index); in visitAggregate()
1473 …case EOpLessThan: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_LT, result, arg[0], a… in visitAggregate()
1474 …case EOpGreaterThan: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_GT, result, arg[0], a… in visitAggregate()
1475 …case EOpLessThanEqual: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_LE, result, arg[0], a… in visitAggregate()
1476 …case EOpGreaterThanEqual: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_GE, result, arg[0], a… in visitAggregate()
1477 …case EOpVectorEqual: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_EQ, result, arg[0], a… in visitAggregate()
1478 …case EOpVectorNotEqual: if(visit == PostVisit) emitCmp(sw::Shader::CONTROL_NE, result, arg[0], a… in visitAggregate()
1479 …case EOpMod: if(visit == PostVisit) emit(sw::Shader::OPCODE_MOD, result, arg[0], arg[… in visitAggregate()
1484 emit(sw::Shader::OPCODE_TRUNC, arg1, arg[0]); in visitAggregate()
1486 emitBinary(sw::Shader::OPCODE_SUB, result, arg[0], arg1); in visitAggregate()
1489 …case EOpPow: if(visit == PostVisit) emit(sw::Shader::OPCODE_POW, result, arg[0], arg[… in visitAggregate()
1490 …case EOpAtan: if(visit == PostVisit) emit(sw::Shader::OPCODE_ATAN2, result, arg[0], ar… in visitAggregate()
1491 …case EOpMin: if(visit == PostVisit) emit(getOpcode(sw::Shader::OPCODE_MIN, result), r… in visitAggregate()
1492 …case EOpMax: if(visit == PostVisit) emit(getOpcode(sw::Shader::OPCODE_MAX, result), r… in visitAggregate()
1496 emit(getOpcode(sw::Shader::OPCODE_MAX, result), result, arg[0], arg[1]); in visitAggregate()
1497 emit(getOpcode(sw::Shader::OPCODE_MIN, result), result, result, arg[2]); in visitAggregate()
1500 …case EOpMix: if(visit == PostVisit) emit(sw::Shader::OPCODE_LRP, result, arg[2], arg[1], a… in visitAggregate()
1501 …case EOpStep: if(visit == PostVisit) emit(sw::Shader::OPCODE_STEP, result, arg[0], arg[1]);… in visitAggregate()
1502 …case EOpSmoothStep: if(visit == PostVisit) emit(sw::Shader::OPCODE_SMOOTH, result, arg[0], arg[1]… in visitAggregate()
1503 …case EOpDistance: if(visit == PostVisit) emit(sw::Shader::OPCODE_DIST(dim(arg[0])), result, arg… in visitAggregate()
1504 …case EOpDot: if(visit == PostVisit) emit(sw::Shader::OPCODE_DP(dim(arg[0])), result, arg[0… in visitAggregate()
1505 …case EOpCross: if(visit == PostVisit) emit(sw::Shader::OPCODE_CRS, result, arg[0], arg[1]); … in visitAggregate()
1506 …case EOpFaceForward: if(visit == PostVisit) emit(sw::Shader::OPCODE_FORWARD(dim(arg[0])), result, … in visitAggregate()
1507 …case EOpReflect: if(visit == PostVisit) emit(sw::Shader::OPCODE_REFLECT(dim(arg[0])), result, … in visitAggregate()
1508 …case EOpRefract: if(visit == PostVisit) emit(sw::Shader::OPCODE_REFRACT(dim(arg[0])), result, … in visitAggregate()
1519 emit(sw::Shader::OPCODE_MUL, result, i, arg[0], i, arg[1], i); in visitAggregate()
1528 Instruction *mul = emit(sw::Shader::OPCODE_MUL, result, i, arg[0], 0, arg[1]); in visitAggregate()
1574 emit(sw::Shader::OPCODE_SELECT, node, condition, trueBlock, falseBlock); in visitSelection()
1578 emit(sw::Shader::OPCODE_IF, 0, condition); in visitSelection()
1588 emit(sw::Shader::OPCODE_ELSE); in visitSelection()
1593 emit(sw::Shader::OPCODE_ENDIF); in visitSelection()
1619 emit(sw::Shader::OPCODE_IF, 0, condition); in visitSelection()
1628 emit(sw::Shader::OPCODE_ELSE); in visitSelection()
1632 emit(sw::Shader::OPCODE_ENDIF); in visitSelection()
1670 emit(sw::Shader::OPCODE_MOV, &iterate, &True); in visitLoop()
1672 emit(sw::Shader::OPCODE_WHILE, 0, &iterate); // FIXME: Implement real do-while in visitLoop()
1679 emit(sw::Shader::OPCODE_TEST); in visitLoop()
1682 emit(sw::Shader::OPCODE_MOV, &iterate, condition); in visitLoop()
1684 emit(sw::Shader::OPCODE_ENDWHILE); in visitLoop()
1721 emit(sw::Shader::OPCODE_WHILE, 0, condition); in visitLoop()
1728 emit(sw::Shader::OPCODE_TEST); in visitLoop()
1740 emit(sw::Shader::OPCODE_ENDWHILE); in visitLoop()
1756 case EOpKill: if(visit == PostVisit) emit(sw::Shader::OPCODE_DISCARD); break; in visitBranch()
1757 case EOpBreak: if(visit == PostVisit) emit(sw::Shader::OPCODE_BREAK); break; in visitBranch()
1758 case EOpContinue: if(visit == PostVisit) emit(sw::Shader::OPCODE_CONTINUE); break; in visitBranch()
1769 emit(sw::Shader::OPCODE_LEAVE); in visitBranch()
1795 emit(sw::Shader::OPCODE_SWITCH); in visitSwitch()
1813 emit(sw::Shader::OPCODE_ELSE); in visitSwitch()
1818 emitBinary(sw::Shader::OPCODE_EQ, &result, switchValue, condition); in visitSwitch()
1819 emit(sw::Shader::OPCODE_IF, 0, &result); in visitSwitch()
1841 emit(sw::Shader::OPCODE_ELSE); in visitSwitch()
1854 emit(sw::Shader::OPCODE_ENDIF); in visitSwitch()
1857 emit(sw::Shader::OPCODE_ENDSWITCH); in visitSwitch()
1862 …Instruction *OutputASM::emit(sw::Shader::Opcode op, TIntermTyped *dst, TIntermNode *src0, TIntermN… in emit()
1867 …Instruction *OutputASM::emit(sw::Shader::Opcode op, TIntermTyped *dst, int dstIndex, TIntermNode *… in emit()
1903 case EbtInt: return emit(sw::Shader::OPCODE_B2I, dst, dstIndex, src, srcIndex); in emitCast()
1904 case EbtUInt: return emit(sw::Shader::OPCODE_B2I, dst, dstIndex, src, srcIndex); in emitCast()
1905 case EbtFloat: return emit(sw::Shader::OPCODE_B2F, dst, dstIndex, src, srcIndex); in emitCast()
1912 case EbtBool: return emit(sw::Shader::OPCODE_I2B, dst, dstIndex, src, srcIndex); in emitCast()
1913 case EbtFloat: return emit(sw::Shader::OPCODE_I2F, dst, dstIndex, src, srcIndex); in emitCast()
1920 case EbtBool: return emit(sw::Shader::OPCODE_I2B, dst, dstIndex, src, srcIndex); in emitCast()
1921 case EbtFloat: return emit(sw::Shader::OPCODE_U2F, dst, dstIndex, src, srcIndex); in emitCast()
1928 case EbtBool: return emit(sw::Shader::OPCODE_F2B, dst, dstIndex, src, srcIndex); in emitCast()
1929 case EbtInt: return emit(sw::Shader::OPCODE_F2I, dst, dstIndex, src, srcIndex); in emitCast()
1930 case EbtUInt: return emit(sw::Shader::OPCODE_F2U, dst, dstIndex, src, srcIndex); in emitCast()
1942 return emit(sw::Shader::OPCODE_MOV, dst, dstIndex, src, srcIndex); in emitCast()
1945 …void OutputASM::emitBinary(sw::Shader::Opcode op, TIntermTyped *dst, TIntermNode *src0, TIntermNod… in emitBinary()
1953 …void OutputASM::emitAssign(sw::Shader::Opcode op, TIntermTyped *result, TIntermTyped *lhs, TInterm… in emitAssign()
1959 …void OutputASM::emitCmp(sw::Shader::Control cmpOp, TIntermTyped *dst, TIntermNode *left, TIntermNo… in emitCmp()
1961 sw::Shader::Opcode opcode; in emitCmp()
1966 opcode = sw::Shader::OPCODE_ICMP; in emitCmp()
1969 opcode = sw::Shader::OPCODE_UCMP; in emitCmp()
1972 opcode = sw::Shader::OPCODE_CMP; in emitCmp()
2158 void OutputASM::argument(sw::Shader::SourceParameter &parameter, TIntermNode *argument, int index) in argument()
2178 Instruction *instruction = new Instruction(sw::Shader::OPCODE_I2B); in argument()
2179 instruction->dst.type = sw::Shader::PARAMETER_TEMP; in argument()
2181 instruction->src[0].type = sw::Shader::PARAMETER_CONST; in argument()
2206 Instruction *instruction = new Instruction(sw::Shader::OPCODE_MOV); in argument()
2207 instruction->dst.type = sw::Shader::PARAMETER_TEMP; in argument()
2210 instruction->src[0].type = sw::Shader::PARAMETER_CONST; in argument()
2274 Instruction *mov = emit(sw::Shader::OPCODE_MOV, dst, index, src, offset + index); in copy()
2305 Instruction *insert = new Instruction(sw::Shader::OPCODE_INSERT); in assignLvalue()
2322 Instruction *mov = new Instruction(sw::Shader::OPCODE_MOV); in assignLvalue()
2341 …int OutputASM::lvalue(sw::Shader::DestinationParameter &dst, Temporary &address, TIntermTyped *nod… in lvalue()
2393 …if(dst.rel.type == sw::Shader::PARAMETER_VOID) // Use the index register as the relative address… in lvalue()
2397 sw::Shader::SourceParameter relativeRegister; in lvalue()
2411 Instruction *mad = emit(sw::Shader::OPCODE_IMAD, &address, &address, &oldScale, right); in lvalue()
2418 Instruction *mul = emit(sw::Shader::OPCODE_IMUL, &address, &address, &oldScale); in lvalue()
2423 emit(sw::Shader::OPCODE_IMAD, &address, right, &newScale, &address); in lvalue()
2426 dst.rel.type = sw::Shader::PARAMETER_TEMP; in lvalue()
2434 emit(sw::Shader::OPCODE_IADD, &address, &address, right); in lvalue()
2439 emit(sw::Shader::OPCODE_IMAD, &address, right, &newScale, &address); in lvalue()
2508 sw::Shader::ParameterType OutputASM::registerType(TIntermTyped *operand) in registerType()
2512 return sw::Shader::PARAMETER_SAMPLER; in registerType()
2528 return sw::Shader::PARAMETER_TEMP; in registerType()
2533 case EvqTemporary: return sw::Shader::PARAMETER_TEMP; in registerType()
2534 case EvqGlobal: return sw::Shader::PARAMETER_TEMP; in registerType()
2535 …case EvqConstExpr: return sw::Shader::PARAMETER_FLOAT4LITERAL; // All converted to flo… in registerType()
2536 case EvqAttribute: return sw::Shader::PARAMETER_INPUT; in registerType()
2537 case EvqVaryingIn: return sw::Shader::PARAMETER_INPUT; in registerType()
2538 case EvqVaryingOut: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2539 case EvqVertexIn: return sw::Shader::PARAMETER_INPUT; in registerType()
2540 case EvqFragmentOut: return sw::Shader::PARAMETER_COLOROUT; in registerType()
2541 case EvqVertexOut: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2542 case EvqFragmentIn: return sw::Shader::PARAMETER_INPUT; in registerType()
2543 …case EvqInvariantVaryingIn: return sw::Shader::PARAMETER_INPUT; // FIXME: Guarantee invariance… in registerType()
2544 …case EvqInvariantVaryingOut: return sw::Shader::PARAMETER_OUTPUT; // FIXME: Guarantee invariance… in registerType()
2545 case EvqSmooth: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2546 case EvqFlat: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2547 case EvqCentroidOut: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2548 case EvqSmoothIn: return sw::Shader::PARAMETER_INPUT; in registerType()
2549 case EvqFlatIn: return sw::Shader::PARAMETER_INPUT; in registerType()
2550 case EvqCentroidIn: return sw::Shader::PARAMETER_INPUT; in registerType()
2551 case EvqUniform: return sw::Shader::PARAMETER_CONST; in registerType()
2552 case EvqIn: return sw::Shader::PARAMETER_TEMP; in registerType()
2553 case EvqOut: return sw::Shader::PARAMETER_TEMP; in registerType()
2554 case EvqInOut: return sw::Shader::PARAMETER_TEMP; in registerType()
2555 case EvqConstReadOnly: return sw::Shader::PARAMETER_TEMP; in registerType()
2556 case EvqPosition: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2557 case EvqPointSize: return sw::Shader::PARAMETER_OUTPUT; in registerType()
2558 case EvqInstanceID: return sw::Shader::PARAMETER_MISCTYPE; in registerType()
2559 case EvqFragCoord: return sw::Shader::PARAMETER_MISCTYPE; in registerType()
2560 case EvqFrontFacing: return sw::Shader::PARAMETER_MISCTYPE; in registerType()
2561 case EvqPointCoord: return sw::Shader::PARAMETER_INPUT; in registerType()
2562 case EvqFragColor: return sw::Shader::PARAMETER_COLOROUT; in registerType()
2563 case EvqFragData: return sw::Shader::PARAMETER_COLOROUT; in registerType()
2564 case EvqFragDepth: return sw::Shader::PARAMETER_DEPTHOUT; in registerType()
2568 return sw::Shader::PARAMETER_VOID; in registerType()
2772 …if(componentCount >= 1) pixelShader->semantic[var][0] = sw::Shader::Semantic(sw::Shader::USAGE_TEX… in varyingRegister()
2773 …if(componentCount >= 2) pixelShader->semantic[var][1] = sw::Shader::Semantic(sw::Shader::USAGE_TEX… in varyingRegister()
2774 …if(componentCount >= 3) pixelShader->semantic[var][2] = sw::Shader::Semantic(sw::Shader::USAGE_TEX… in varyingRegister()
2775 …if(componentCount >= 4) pixelShader->semantic[var][3] = sw::Shader::Semantic(sw::Shader::USAGE_TEX… in varyingRegister()
2781 …if(componentCount >= 1) pixelShader->semantic[var + i][0] = sw::Shader::Semantic(sw::Shader::USAGE… in varyingRegister()
2782 …if(componentCount >= 2) pixelShader->semantic[var + i][1] = sw::Shader::Semantic(sw::Shader::USAGE… in varyingRegister()
2783 …if(componentCount >= 3) pixelShader->semantic[var + i][2] = sw::Shader::Semantic(sw::Shader::USAGE… in varyingRegister()
2784 …if(componentCount >= 4) pixelShader->semantic[var + i][3] = sw::Shader::Semantic(sw::Shader::USAGE… in varyingRegister()
2799 vertexShader->output[var][0] = sw::Shader::Semantic(sw::Shader::USAGE_POSITION, 0); in varyingRegister()
2800 vertexShader->output[var][1] = sw::Shader::Semantic(sw::Shader::USAGE_POSITION, 0); in varyingRegister()
2801 vertexShader->output[var][2] = sw::Shader::Semantic(sw::Shader::USAGE_POSITION, 0); in varyingRegister()
2802 vertexShader->output[var][3] = sw::Shader::Semantic(sw::Shader::USAGE_POSITION, 0); in varyingRegister()
2808 vertexShader->output[var][0] = sw::Shader::Semantic(sw::Shader::USAGE_PSIZE, 0); in varyingRegister()
2809 vertexShader->output[var][1] = sw::Shader::Semantic(sw::Shader::USAGE_PSIZE, 0); in varyingRegister()
2810 vertexShader->output[var][2] = sw::Shader::Semantic(sw::Shader::USAGE_PSIZE, 0); in varyingRegister()
2811 vertexShader->output[var][3] = sw::Shader::Semantic(sw::Shader::USAGE_PSIZE, 0); in varyingRegister()
2915 vertexShader->input[index + i] = sw::Shader::Semantic(sw::Shader::USAGE_TEXCOORD, index + i); in attributeRegister()