| 38 | |
| 39 | |
| 40 | void ParserState::AddIntrinsics() |
| 41 | { |
| 42 | SymbolTable& table = *m_symbols; |
| 43 | m_dx9Functions["abs"] = AddFunction( table, "abs", &FunctionDescription1<TypeSameAsArg<0>, DimSameAsArg<0>, TypeSameAsArg<0>, DimSameAsArg<0>> ); |
| 44 | m_dx9Functions["acos"] = AddFunction( table, "acos", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 45 | m_dx9Functions["all"] = AddFunction( table, "all", &FunctionDescription1<TypeIs<OP_BOOL>, DimIs<1, 1>, TypeSameAsArg<0>, DimSameAsArg<0>> ); |
| 46 | m_dx9Functions["AllMemoryBarrier"] = AddFunction( table, "AllMemoryBarrier", &FunctionDescription0<TypeIs<OP_VOID>, DimIs<1, 1>> ); |
| 47 | m_dx9Functions["AllMemoryBarrierWithGroupSync"] = AddFunction( table, "AllMemoryBarrierWithGroupSync", &FunctionDescription0<TypeIs<OP_VOID>, DimIs<1, 1>> ); |
| 48 | m_dx9Functions["any"] = AddFunction( table, "any", &FunctionDescription1<TypeIs<OP_BOOL>, DimIs<1, 1>, TypeSameAsArg<0>, DimSameAsArg<0>> ); |
| 49 | m_dx9Functions["asdouble"] = AddFunction( table, "asdouble", &FunctionDescription2<TypeIs<OP_DOUBLE>, DimIs<1, 1>, TypeIs<OP_UINT>, DimIs<1, 1>, TypeIs<OP_UINT>, DimIs<1, 1>> ); |
| 50 | m_dx9Functions["asfloat"] = AddFunction( table, "asfloat", &FunctionDescription1<TypeIs<OP_FLOAT>, DimIs<2, 1>, TypeIs<OP_UINT>, DimIs<1, 1>> ); |
| 51 | m_dx9Functions["asin"] = AddFunction( table, "asin", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 52 | m_dx9Functions["asint"] = AddFunction( table, "asint", &FunctionDescription1<TypeIs<OP_INT>, DimIs<2, 1>, TypeIs<OP_DOUBLE>, DimIs<1, 1>> ); |
| 53 | m_dx9Functions["asuint"] = AddFunction( table, "asuint", &FunctionDescription3<TypeIs<OP_UINT>, DimIs<1, 1>, TypeIs<OP_DOUBLE>, DimIs<1, 1>, TypeIs<OP_UINT>, DimIs<1, 1>, TypeIs<OP_UINT>, DimIs<1, 1>> ); |
| 54 | m_dx9Functions["atan"] = AddFunction( table, "atan", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 55 | m_dx9Functions["atan2"] = AddFunction( table, "atan2", &FunctionDescription2<TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim> ); |
| 56 | m_dx9Functions["ceil"] = AddFunction( table, "ceil", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 57 | m_dx9Functions["clamp"] = AddFunction( table, "clamp", &FunctionDescription3<CommonArgType, CommonArgDim, CommonArgType, CommonArgDim, CommonArgType, CommonArgDim, CommonArgType, CommonArgDim> ); |
| 58 | m_dx9Functions["clip"] = AddFunction( table, "clip", &FunctionDescription1<TypeIs<OP_VOID>, DimIs<1, 1>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 59 | m_dx9Functions["cos"] = AddFunction( table, "cos", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 60 | |
| 61 | m_dx9Functions["cosh"] = AddFunction( table, "cosh", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 62 | m_dx9Functions["countbits"] = AddFunction( table, "countbits", &FunctionDescription1<TypeIs<OP_UINT>, DimSameAsArg<0>, TypeIs<OP_UINT>, DimSameAsArg<0>> ); |
| 63 | m_dx9Functions["cross"] = AddFunction( table, "cross", &FunctionDescription2<TypeIs<OP_FLOAT>, DimIs<3, 1>, TypeIs<OP_FLOAT>, DimIs<3, 1>, TypeIs<OP_FLOAT>, DimIs<3, 1>> ); |
| 64 | m_dx9Functions["D3DCOLORtoUBYTE4"] = AddFunction( table, "D3DCOLORtoUBYTE4", &FunctionDescription1<TypeIs<OP_INT>, DimIs<4, 1>, TypeIs<OP_FLOAT>, DimIs<4, 1>> ); |
| 65 | m_dx9Functions["ddx"] = AddFunction( table, "ddx", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 66 | m_dx9Functions["ddx_coarse"] = AddFunction( table, "ddx_coarse", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 67 | m_dx9Functions["ddx_fine"] = AddFunction( table, "ddx_fine", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 68 | m_dx9Functions["ddy"] = AddFunction( table, "ddy", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 69 | m_dx9Functions["ddy_coarse"] = AddFunction( table, "ddy_coarse", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 70 | m_dx9Functions["ddy_fine"] = AddFunction( table, "ddy_fine", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 71 | m_dx9Functions["degrees"] = AddFunction( table, "degrees", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 72 | m_dx9Functions["determinant"] = AddFunction( table, "determinant", &FunctionDescription1<TypeIs<OP_FLOAT>, DimIs<1, 1>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 73 | m_dx9Functions["DeviceMemoryBarrier"] = AddFunction( table, "DeviceMemoryBarrier", &FunctionDescription0<TypeIs<OP_VOID>, DimIs<1, 1>> ); |
| 74 | m_dx9Functions["DeviceMemoryBarrierWithGroupSync"] = AddFunction( table, "DeviceMemoryBarrierWithGroupSync", &FunctionDescription0<TypeIs<OP_VOID>, DimIs<1, 1>> ); |
| 75 | m_dx9Functions["distance"] = AddFunction( table, "distance", &FunctionDescription2<TypeIs<OP_FLOAT>, DimIs<1, 1>, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim> ); |
| 76 | m_dx9Functions["dot"] = AddFunction( table, "dot", &FunctionDescription2<TypeIs<OP_FLOAT>, DimIs<1, 1>, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim> ); |
| 77 | m_dx9Functions["dst"] = AddFunction( table, "dst", &FunctionDescription2<TypeIs<OP_FLOAT>, DimIs<1, 1>, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim> ); |
| 78 | m_dx9Functions["EvaluateAttributeAtCentroid"] = AddFunction( table, "EvaluateAttributeAtCentroid", &FunctionDescription1<TypeSameAsArg<0>, DimSameAsArg<0>, TypeSameAsArg<0>, DimSameAsArg<0>> ); |
| 79 | m_dx9Functions["EvaluateAttributeAtSample"] = AddFunction( table, "EvaluateAttributeAtSample", &FunctionDescription1<TypeSameAsArg<0>, DimSameAsArg<0>, TypeSameAsArg<0>, DimSameAsArg<0>> ); |
| 80 | m_dx9Functions["EvaluateAttributeSnapped"] = AddFunction( table, "EvaluateAttributeSnapped", &FunctionDescription1<TypeSameAsArg<0>, DimSameAsArg<0>, TypeSameAsArg<0>, DimSameAsArg<0>> ); |
| 81 | m_dx9Functions["exp"] = AddFunction( table, "exp", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 82 | m_dx9Functions["exp2"] = AddFunction( table, "exp2", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 83 | m_dx9Functions["f16tof32"] = AddFunction( table, "f16tof32", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_UINT>, DimSameAsArg<0>> ); |
| 84 | m_dx9Functions["f32tof16"] = AddFunction( table, "f32tof16", &FunctionDescription1<TypeIs<OP_UINT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 85 | m_dx9Functions["faceforward"] = AddFunction( table, "faceforward", &FunctionDescription3<TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim> ); |
| 86 | |
| 87 | m_dx9Functions["firstbithigh"] = AddFunction( table, "firstbithigh", &FunctionDescription1<TypeIs<OP_INT>, DimSameAsArg<0>, TypeIs<OP_INT>, DimSameAsArg<0>> ); |
| 88 | m_dx9Functions["firstbitlow"] = AddFunction( table, "firstbitlow", &FunctionDescription1<TypeIs<OP_INT>, DimSameAsArg<0>, TypeIs<OP_INT>, DimSameAsArg<0>> ); |
| 89 | m_dx9Functions["floor"] = AddFunction( table, "floor", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 90 | m_dx9Functions["fmod"] = AddFunction( table, "fmod", &FunctionDescription2<TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim, TypeIs<OP_FLOAT>, CommonArgDim> ); |
| 91 | m_dx9Functions["frac"] = AddFunction( table, "frac", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 92 | m_dx9Functions["frexp"] = AddFunction( table, "frexp", &FunctionDescription2<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 93 | m_dx9Functions["fwidth"] = AddFunction( table, "fwidth", &FunctionDescription1<TypeIs<OP_FLOAT>, DimSameAsArg<0>, TypeIs<OP_FLOAT>, DimSameAsArg<0>> ); |
| 94 | m_dx9Functions["GetRenderTargetSampleCount"] = AddFunction( table, "GetRenderTargetSampleCount", &FunctionDescription0<TypeIs<OP_UINT>, DimIs<1, 1>> ); |
| 95 | m_dx9Functions["GetRenderTargetSamplePosition"] = AddFunction( table, "GetRenderTargetSamplePosition", &FunctionDescription1<TypeIs<OP_UINT>, DimIs<1, 1>, TypeIs<OP_INT>, DimIs<1, 1>> ); |
| 96 | m_dx9Functions["GroupMemoryBarrier"] = AddFunction( table, "GroupMemoryBarrier", &FunctionDescription0<TypeIs<OP_VOID>, DimIs<1, 1>> ); |
| 97 | m_dx9Functions["GroupMemoryBarrierWithGroupSync"] = AddFunction( table, "GroupMemoryBarrierWithGroupSync", &FunctionDescription0<TypeIs<OP_VOID>, DimIs<1, 1>> ); |
nothing calls this directly
no test coverage detected