| STRINGIFY( |
| |
| // defines built-in functions supported by SkiaSL |
| |
| $genType radians($genType degrees); |
| $genType sin($genType angle); |
| $genType cos($genType angle); |
| $genType tan($genType angle); |
| $genType asin($genType x); |
| $genType acos($genType x); |
| $genType atan($genType y, $genType x); |
| $genType atan($genType y_over_x); |
| $genType sinh($genType x); |
| $genType cosh($genType x); |
| $genType tanh($genType x); |
| $genType asinh($genType x); |
| $genType acosh($genType x); |
| $genType atanh($genType x); |
| $genType pow($genType x, $genType y); |
| $genType exp($genType x); |
| $genType log($genType x); |
| $genType exp2($genType x); |
| $genType log2($genType x); |
| $genType sqrt($genType x); |
| //$genDType sqrt($genDType x); |
| $genType inversesqrt($genType x); |
| //$genDType inversesqrt($genDType x); |
| $genType abs($genType x); |
| $genIType abs($genIType x); |
| //$genDType abs($genDType x); |
| $genType sign($genType x); |
| $genIType sign($genIType x); |
| //$genDType sign($genDType x); |
| $genType floor($genType x); |
| //$genDType floor($genDType x); |
| $genType trunc($genType x); |
| //$genDType trunc($genDType x); |
| $genType round($genType x); |
| //$genDType round($genDType x); |
| $genType roundEven($genType x); |
| //$genDType roundEven($genDType x); |
| $genType ceil($genType x); |
| //$genDType ceil($genDType x); |
| $genType fract($genType x); |
| //$genDType fract($genDType x); |
| $genType mod($genType x, float y); |
| $genType mod($genType x, $genType y); |
| //$genDType mod($genDType x, double y); |
| //$genDType mod($genDType x, $genDType y); |
| $genType modf($genType x, out $genType i); |
| //$genDType modf($genDType x, out $genDType i); |
| $genType min($genType x, $genType y); |
| $genType min($genType x, float y); |
| //$genDType min($genDType x, $genDType y); |
| //$genDType min($genDType x, double y); |
| $genIType min($genIType x, $genIType y); |
| $genIType min($genIType x, int y); |
| //$genUType min($genUType x, $genUType y); |
| //$genUType min($genUType x, uint y); |
| $genType max($genType x, $genType y); |
| $genType max($genType x, float y); |
| //$genDType max($genDType x, $genDType y); |
| //$genDType max($genDType x, double y); |
| $genIType max($genIType x, $genIType y); |
| $genIType max($genIType x, int y); |
| //$genUType max($genUType x, $genUType y); |
| //$genUType max($genUType x, uint y); |
| $genType clamp($genType x, $genType minVal, $genType maxVal); |
| $genType clamp($genType x, float minVal, float maxVal); |
| //$genDType clamp($genDType x, $genDType minVal, $genDType maxVal); |
| //$genDType clamp($genDType x, double minVal, double maxVal); |
| $genIType clamp($genIType x, $genIType minVal, $genIType maxVal); |
| $genIType clamp($genIType x, int minVal, int maxVal); |
| //$genUType clamp($genUType x, $genUType minVal, $genUType maxVal); |
| //$genUType clamp($genUType x, uint minVal, uint maxVal); |
| $genType mix($genType x, $genType y, $genType a); |
| $genType mix($genType x, $genType y, float a); |
| //$genDType mix($genDType x, $genDType y, $genDType a); |
| //$genDType mix($genDType x, $genDType y, double a); |
| $genType mix($genType x, $genType y, $genBType a); |
| //$genDType mix($genDType x, $genDType y, $genBType a); |
| $genIType mix($genIType x, $genIType y, $genBType a); |
| //$genUType mix($genUType x, $genUType y, $genBType a); |
| $genBType mix($genBType x, $genBType y, $genBType a); |
| $genType step($genType edge, $genType x); |
| $genType step(float edge, $genType x); |
| //$genDType step($genDType edge, $genDType x); |
| //$genDType step(double edge, $genDType x); |
| $genType smoothstep($genType edge0, $genType edge1, $genType x); |
| $genType smoothstep(float edge0, float edge1, $genType x); |
| //$genDType smoothstep($genDType edge0, $genDType edge1, $genDType x); |
| //$genDType smoothstep(double edge0, double edge1, $genDType x); |
| $genBType isnan($genType x); |
| $genBType isnan($genDType x); |
| $genBType isinf($genType x); |
| $genBType isinf($genDType x); |
| $genIType floatBitsToInt($genType value); |
| //$genUType floatBitsToUint($genType value); |
| $genType intBitsToFloat($genIType value); |
| $genType uintBitsToFloat($genUType value); |
| $genType fma($genType a, $genType b, $genType c); |
| //$genDType fma($genDType a, $genDType b, $genDType c); |
| $genType frexp($genType x, out $genIType exp); |
| //$genDType frexp($genDType x, out $genIType exp); |
| $genType ldexp($genType x, in $genIType exp); |
| //$genDType ldexp($genDType x, in $genIType exp); |
| uint packUnorm2x16(vec2 v); |
| uint packSnorm2x16(vec2 v); |
| uint packUnorm4x8(vec4 v); |
| uint packSnorm4x8(vec4 v); |
| vec2 unpackUnorm2x16(uint p); |
| vec2 unpackSnorm2x16(uint p); |
| vec4 unpackUnorm4x8(uint p); |
| vec4 unpackSnorm4x8(uint p); |
| //double packDouble2x32(uvec2 v); |
| uvec2 unpackDouble2x32(double v); |
| uint packHalf2x16(vec2 v); |
| vec2 unpackHalf2x16(uint v); |
| float length($genType x); |
| //double length($genDType x); |
| float distance($genType p0, $genType p1); |
| //double distance($genDType p0, $genDType p1); |
| float dot($genType x, $genType y); |
| //double dot($genDType x, $genDType y); |
| vec3 cross(vec3 x, vec3 y); |
| //dvec3 cross(dvec3 x, dvec3 y); |
| $genType normalize($genType x); |
| //$genDType normalize($genDType x); |
| vec4 ftransform(); |
| $genType faceforward($genType N, $genType I, $genType Nref); |
| //$genDType faceforward($genDType N, $genDType I, $genDType Nref); |
| $genType reflect($genType I, $genType N); |
| //$genDType reflect($genDType I, $genDType N); |
| $genType refract($genType I, $genType N, float eta); |
| //$genDType refract($genDType I, $genDType N, float eta); |
| $mat matrixCompMult($mat x, $mat y); |
| mat2 outerProduct(vec2 c, vec2 r); |
| mat3 outerProduct(vec3 c, vec3 r); |
| mat4 outerProduct(vec4 c, vec4 r); |
| mat2x3 outerProduct(vec3 c, vec2 r); |
| mat3x2 outerProduct(vec2 c, vec3 r); |
| mat2x4 outerProduct(vec4 c, vec2 r); |
| mat4x2 outerProduct(vec2 c, vec4 r); |
| mat3x4 outerProduct(vec4 c, vec3 r); |
| mat4x3 outerProduct(vec3 c, vec4 r); |
| mat2 transpose(mat2 m); |
| mat3 transpose(mat3 m); |
| mat4 transpose(mat4 m); |
| mat2x3 transpose(mat3x2 m); |
| mat3x2 transpose(mat2x3 m); |
| mat2x4 transpose(mat4x2 m); |
| mat4x2 transpose(mat2x4 m); |
| mat3x4 transpose(mat4x3 m); |
| mat4x3 transpose(mat3x4 m); |
| float determinant(mat2 m); |
| float determinant(mat3 m); |
| float determinant(mat4 m); |
| mat2 inverse(mat2 m); |
| mat3 inverse(mat3 m); |
| mat4 inverse(mat4 m); |
| $bvec lessThan($vec x, $vec y); |
| $bvec lessThan($ivec x, $ivec y); |
| $bvec lessThan($uvec x, $uvec y); |
| $bvec lessThanEqual($vec x, $vec y); |
| $bvec lessThanEqual($ivec x, $ivec y); |
| $bvec lessThanEqual($uvec x, $uvec y); |
| $bvec greaterThan($vec x, $vec y); |
| $bvec greaterThan($ivec x, $ivec y); |
| $bvec greaterThan($uvec x, $uvec y); |
| $bvec greaterThanEqual($vec x, $vec y); |
| $bvec greaterThanEqual($ivec x, $ivec y); |
| $bvec greaterThanEqual($uvec x, $uvec y); |
| $bvec equal($vec x, $vec y); |
| $bvec equal($ivec x, $ivec y); |
| $bvec equal($uvec x, $uvec y); |
| $bvec equal($bvec x, $bvec y); |
| $bvec notEqual($vec x, $vec y); |
| $bvec notEqual($ivec x, $ivec y); |
| $bvec notEqual($uvec x, $uvec y); |
| $bvec notEqual($bvec x, $bvec y); |
| bool any($bvec x); |
| bool all($bvec x); |
| $bvec not($bvec x); |
| |
| $genIType bitCount($genIType value); |
| $genIType bitCount($genUType value); |
| $genIType findLSB($genIType value); |
| $genIType findLSB($genUType value); |
| $genIType findMSB($genIType value); |
| $genIType findMSB($genUType value); |
| |
| /* |
| //$genUType uaddCarry($genUType x, $genUType y, out $genUType carry); |
| //$genUType usubBorrow($genUType x, $genUType y, out $genUType borrow); |
| void umulExtended($genUType x, $genUType y, out $genUType msb, out $genUType lsb); |
| void imulExtended($genIType x, $genIType y, out $genIType msb, out $genIType lsb); |
| $genIType bitfieldExtract($genIType value, int offset, int bits); |
| //$genUType bitfieldExtract($genUType value, int offset, int bits); |
| $genIType bitfieldInsert($genIType base, $genIType insert, int offset, int bits); |
| //$genUType bitfieldInsert($genUType base, $genUType insert, int offset, int bits); |
| $genIType bitfieldReverse($genIType value); |
| //$genUType bitfieldReverse($genUType value); |
| int textureSize($gsampler1D sampler, int lod); |
| ivec2 textureSize($gsampler2D sampler, int lod); |
| ivec3 textureSize($gsampler3D sampler, int lod); |
| ivec2 textureSize($gsamplerCube sampler, int lod); |
| int textureSize(sampler1DShadow sampler, int lod); |
| ivec2 textureSize(sampler2DShadow sampler, int lod); |
| ivec2 textureSize(samplerCubeShadow sampler, int lod); |
| ivec3 textureSize($gsamplerCubeArray sampler, int lod); |
| ivec3 textureSize(samplerCubeArrayShadow sampler, int lod); |
| */ |
| ivec2 textureSize($gsampler2DRect sampler); |
| /* |
| ivec2 textureSize(sampler2DRectShadow sampler); |
| ivec2 textureSize($gsampler1DArray sampler, int lod); |
| ivec3 textureSize($gsampler2DArray sampler, int lod); |
| ivec2 textureSize(sampler1DArrayShadow sampler, int lod); |
| ivec3 textureSize(sampler2DArrayShadow sampler, int lod); |
| int textureSize($gsamplerBuffer sampler); |
| ivec2 textureSize($gsampler2DMS sampler); |
| ivec3 textureSize($gsampler2DMSArray sampler); |
| vec2 textureQueryLod($gsampler1D sampler, float P); |
| vec2 textureQueryLod($gsampler2D sampler, vec2 P); |
| vec2 textureQueryLod($gsampler3D sampler, vec3 P); |
| vec2 textureQueryLod($gsamplerCube sampler, vec3 P); |
| vec2 textureQueryLod($gsampler1DArray sampler, float P); |
| vec2 textureQueryLod($gsampler2DArray sampler, vec2 P); |
| vec2 textureQueryLod($gsamplerCubeArray sampler, vec3 P); |
| vec2 textureQueryLod(sampler1DShadow sampler, float P); |
| vec2 textureQueryLod(sampler2DShadow sampler, vec2 P); |
| vec2 textureQueryLod(samplerCubeShadow sampler, vec3 P); |
| vec2 textureQueryLod(sampler1DArrayShadow sampler, float P); |
| vec2 textureQueryLod(sampler2DArrayShadow sampler, vec2 P); |
| vec2 textureQueryLod(samplerCubeArrayShadow sampler, vec3 P); |
| int textureQueryLevels($gsampler1D sampler); |
| int textureQueryLevels($gsampler2D sampler); |
| int textureQueryLevels($gsampler3D sampler); |
| int textureQueryLevels($gsamplerCube sampler); |
| int textureQueryLevels($gsampler1DArray sampler); |
| int textureQueryLevels($gsampler2DArray sampler); |
| int textureQueryLevels($gsamplerCubeArray sampler); |
| int textureQueryLevels(sampler1DShadow sampler); |
| int textureQueryLevels(sampler2DShadow sampler); |
| int textureQueryLevels(samplerCubeShadow sampler); |
| int textureQueryLevels(sampler1DArrayShadow sampler); |
| int textureQueryLevels(sampler2DArrayShadow sampler); |
| int textureQueryLevels(samplerCubeArrayShadow sampler); |
| */ |
| |
| $gvec4 texture($gsampler1D sampler, float P); |
| $gvec4 texture($gsampler1D sampler, float P, float bias); |
| $gvec4 texture($gsampler2D sampler, vec2 P); |
| // The above currently only expand to handle the float/fixed case. So we also declare this integer |
| // version of texture(). |
| ivec4 texture(isampler2D sampler, vec2 P); |
| vec4 texture(samplerExternalOES sampler, vec2 P, float bias); |
| vec4 texture(samplerExternalOES sampler, vec2 P); |
| |
| /* |
| $gvec4 texture($gsampler2D sampler, vec2 P, float bias); |
| $gvec4 texture($gsampler3D sampler, vec3 P); |
| $gvec4 texture($gsampler3D sampler, vec3 P, float bias); |
| $gvec4 texture($gsamplerCube sampler, vec3 P); |
| $gvec4 texture($gsamplerCube sampler, vec3 P, float bias); |
| float texture(sampler1DShadow sampler, vec3 P); |
| float texture(sampler1DShadow sampler, vec3 P, float bias); |
| float texture(sampler2DShadow sampler, vec3 P); |
| float texture(sampler2DShadow sampler, vec3 P, float bias); |
| float texture(samplerCubeShadow sampler, vec4 P); |
| float texture(samplerCubeShadow sampler, vec4 P, float bias); |
| $gvec4 texture($gsampler1DArray sampler, vec2 P); |
| $gvec4 texture($gsampler1DArray sampler, vec2 P, float bias); |
| $gvec4 texture($gsampler2DArray sampler, vec3 P); |
| $gvec4 texture($gsampler2DArray sampler, vec3 P, float bias); |
| $gvec4 texture($gsamplerCubeArray sampler, vec4 P); |
| $gvec4 texture($gsamplerCubeArray sampler, vec4 P, float bias); |
| float texture(sampler1DArrayShadow sampler, vec3 P); |
| float texture(sampler1DArrayShadow sampler, vec3 P, float bias); |
| float texture(sampler2DArrayShadow sampler, vec4 P); |
| */ |
| |
| $gvec4 texture($gsampler2DRect sampler, vec2 P); |
| |
| /* |
| float texture(sampler2DRectShadow sampler, vec3 P); |
| float texture($gsamplerCubeArrayShadow sampler, vec4 P, float compare); |
| */ |
| |
| // Currently we do not support the generic types of loading subpassInput so we have some explicit |
| // versions that we currently use |
| vec4 subpassLoad(subpassInput subpass); |
| vec4 subpassLoad(subpassInputMS subpass, int sample); |
| /* |
| $gvec4 subpassLoad(gsubpassInput subpass); |
| $gvec4 subpassLoad(gsubpassInputMS subpass, int sample); |
| */ |
| ) |
| |
| // split into multiple chunks, as MSVC++ complains if a single string is too long |
| |
| STRINGIFY( |
| |
| $gvec4 texture($gsampler1D sampler, vec2 P); |
| $gvec4 texture($gsampler1D sampler, vec2 P, float bias); |
| $gvec4 texture($gsampler2D sampler, vec3 P); |
| $gvec4 texture($gsampler2D sampler, vec3 P, float bias); |
| /* |
| $gvec4 textureProj($gsampler3D sampler, vec4 P); |
| $gvec4 textureProj($gsampler3D sampler, vec4 P, float bias); |
| float textureProj(sampler1DShadow sampler, vec4 P); |
| float textureProj(sampler1DShadow sampler, vec4 P, float bias); |
| float textureProj(sampler2DShadow sampler, vec4 P); |
| float textureProj(sampler2DShadow sampler, vec4 P, float bias); |
| $gvec4 textureProj($gsampler2DRect sampler, vec3 P); |
| $gvec4 textureProj($gsampler2DRect sampler, vec4 P); |
| float textureProj(sampler2DRectShadow sampler, vec4 P); |
| $gvec4 textureLod($gsampler1D sampler, float P, float lod); |
| $gvec4 textureLod($gsampler2D sampler, vec2 P, float lod); |
| $gvec4 textureLod($gsampler3D sampler, vec3 P, float lod); |
| $gvec4 textureLod($gsamplerCube sampler, vec3 P, float lod); |
| float textureLod(sampler1DShadow sampler, vec3 P, float lod); |
| float textureLod(sampler2DShadow sampler, vec3 P, float lod); |
| $gvec4 textureLod($gsampler1DArray sampler, vec2 P, float lod); |
| $gvec4 textureLod($gsampler2DArray sampler, vec3 P, float lod); |
| float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod); |
| $gvec4 textureLod($gsamplerCubeArray sampler, vec4 P, float lod); |
| $gvec4 textureOffset($gsampler1D sampler, float P, int offset); |
| $gvec4 textureOffset($gsampler1D sampler, float P, int offset, float bias); |
| $gvec4 textureOffset($gsampler2D sampler, vec2 P, ivec2 offset); |
| $gvec4 textureOffset($gsampler2D sampler, vec2 P, ivec2 offset, float bias); |
| $gvec4 textureOffset($gsampler3D sampler, vec3 P, ivec3 offset); |
| $gvec4 textureOffset($gsampler3D sampler, vec3 P, ivec3 offset, float bias); |
| $gvec4 textureOffset($gsampler2DRect sampler, vec2 P, ivec2 offset); |
| float textureOffset(sampler2DRectShadow sampler, vec3 P, ivec2 offset); |
| float textureOffset(sampler1DShadow sampler, vec3 P, int offset); |
| float textureOffset(sampler1DShadow sampler, vec3 P, int offset, float bias); |
| float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset); |
| float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset, float bias); |
| $gvec4 textureOffset($gsampler1DArray sampler, vec2 P, int offset); |
| $gvec4 textureOffset($gsampler1DArray sampler, vec2 P, int offset, float bias); |
| $gvec4 textureOffset($gsampler2DArray sampler, vec3 P, ivec2 offset); |
| $gvec4 textureOffset($gsampler2DArray sampler, vec3 P, ivec2 offset, float bias); |
| float textureOffset(sampler1DArrayShadow sampler, vec3 P, int offset); |
| float textureOffset(sampler1DArrayShadow sampler, vec3 P, int offset, float bias); |
| float textureOffset(sampler2DArrayShadow sampler, vec4 P, ivec2 offset); |
| */ |
| $gvec4 texelFetch($gsampler1D sampler, int P, int lod); |
| $gvec4 texelFetch($gsampler2D sampler, ivec2 P, int lod); |
| $gvec4 texelFetch($gsamplerBuffer sampler, int P); |
| $gvec4 texelFetch($gsampler2DRect sampler, ivec2 P); |
| /* |
| $gvec4 texelFetch($gsampler3D sampler, ivec3 P, int lod); |
| $gvec4 texelFetch($gsampler1DArray sampler, ivec2 P, int lod); |
| $gvec4 texelFetch($gsampler2DArray sampler, ivec3 P, int lod); |
| $gvec4 texelFetch($gsampler2DMS sampler, ivec2 P, int sample); |
| $gvec4 texelFetch($gsampler2DMSArray sampler, ivec3 P, int sample); |
| $gvec4 texelFetchOffset($gsampler1D sampler, int P, int lod, int offset); |
| $gvec4 texelFetchOffset($gsampler2D sampler, ivec2 P, int lod, ivec2 offset); |
| $gvec4 texelFetchOffset($gsampler3D sampler, ivec3 P, int lod, ivec3 offset); |
| $gvec4 texelFetchOffset($gsampler2DRect sampler, ivec2 P, ivec2 offset); |
| $gvec4 texelFetchOffset($gsampler1DArray sampler, ivec2 P, int lod, int offset); |
| $gvec4 texelFetchOffset($gsampler2DArray sampler, ivec3 P, int lod, ivec2 offset); |
| $gvec4 textureProjOffset($gsampler1D sampler, vec2 P, int offset); |
| $gvec4 textureProjOffset($gsampler1D sampler, vec2 P, int offset, float bias); |
| $gvec4 textureProjOffset($gsampler1D sampler, vec4 P, int offset); |
| $gvec4 textureProjOffset($gsampler1D sampler, vec4 P, int offset, float bias); |
| $gvec4 textureProjOffset($gsampler2D sampler, vec3 P, ivec2 offset); |
| $gvec4 textureProjOffset($gsampler2D sampler, vec3 P, ivec2 offset, float bias); |
| $gvec4 textureProjOffset($gsampler2D sampler, vec4 P, ivec2 offset); |
| $gvec4 textureProjOffset($gsampler2D sampler, vec4 P, ivec2 offset, float bias); |
| $gvec4 textureProjOffset($gsampler3D sampler, vec4 P, ivec3 offset); |
| $gvec4 textureProjOffset($gsampler3D sampler, vec4 P, ivec3 offset, float bias); |
| $gvec4 textureProjOffset($gsampler2DRect sampler, vec3 P, ivec2 offset); |
| $gvec4 textureProjOffset($gsampler2DRect sampler, vec4 P, ivec2 offset); |
| float textureProjOffset(sampler2DRectShadow sampler, vec4 P, ivec2 offset); |
| float textureProjOffset(sampler1DShadow sampler, vec4 P, int offset); |
| float textureProjOffset(sampler1DShadow sampler, vec4 P, int offset, float bias); |
| float textureProjOffset(sampler2DShadow sampler, vec4 P, ivec2 offset); |
| float textureProjOffset(sampler2DShadow sampler, vec4 P, ivec2 offset, float bias); |
| $gvec4 textureLodOffset($gsampler1D sampler, float P, float lod, int offset); |
| $gvec4 textureLodOffset($gsampler2D sampler, vec2 P, float lod, ivec2 offset); |
| $gvec4 textureLodOffset($gsampler3D sampler, vec3 P, float lod, ivec3 offset); |
| float textureLodOffset(sampler1DShadow sampler, vec3 P, float lod, int offset); |
| float textureLodOffset(sampler2DShadow sampler, vec3 P, float lod, ivec2 offset); |
| $gvec4 textureLodOffset($gsampler1DArray sampler, vec2 P, float lod, int offset); |
| $gvec4 textureLodOffset($gsampler2DArray sampler, vec3 P, float lod, ivec2 offset); |
| float textureLodOffset(sampler1DArrayShadow sampler, vec3 P, float lod, int offset); |
| $gvec4 textureProjLod($gsampler1D sampler, vec2 P, float lod); |
| $gvec4 textureProjLod($gsampler1D sampler, vec4 P, float lod); |
| $gvec4 textureProjLod($gsampler2D sampler, vec3 P, float lod); |
| $gvec4 textureProjLod($gsampler2D sampler, vec4 P, float lod); |
| $gvec4 textureProjLod($gsampler3D sampler, vec4 P, float lod); |
| float textureProjLod(sampler1DShadow sampler, vec4 P, float lod); |
| float textureProjLod(sampler2DShadow sampler, vec4 P, float lod); |
| $gvec4 textureProjLodOffset($gsampler1D sampler, vec2 P, float lod, int offset); |
| $gvec4 textureProjLodOffset($gsampler1D sampler, vec4 P, float lod, int offset); |
| $gvec4 textureProjLodOffset($gsampler2D sampler, vec3 P, float lod, ivec2 offset); |
| $gvec4 textureProjLodOffset($gsampler2D sampler, vec4 P, float lod, ivec2 offset); |
| $gvec4 textureProjLodOffset($gsampler3D sampler, vec4 P, float lod, ivec3 offset); |
| float textureProjLodOffset(sampler1DShadow sampler, vec4 P, float lod, int offset); |
| float textureProjLodOffset(sampler2DShadow sampler, vec4 P, float lod, ivec2 offset); |
| $gvec4 textureGrad($gsampler1D sampler, float P, float dPdx, float dPdy); |
| $gvec4 textureGrad($gsampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy); |
| $gvec4 textureGrad($gsampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy); |
| $gvec4 textureGrad($gsamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy); |
| $gvec4 textureGrad($gsampler2DRect sampler, vec2 P, vec2 dPdx, vec2 dPdy); |
| float textureGrad(sampler2DRectShadow sampler, vec3 P, vec2 dPdx, vec2 dPdy); |
| float textureGrad(sampler1DShadow sampler, vec3 P, float dPdx, float dPdy); |
| float textureGrad(sampler2DShadow sampler, vec3 P, vec2 dPdx, vec2 dPdy); |
| float textureGrad(samplerCubeShadow sampler, vec4 P, vec3 dPdx, vec3 dPdy); |
| $gvec4 textureGrad($gsampler1DArray sampler, vec2 P, float dPdx, float dPdy); |
| $gvec4 textureGrad($gsampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy); |
| float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy); |
| float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy); |
| $gvec4 textureGrad($gsamplerCubeArray sampler, vec4 P, vec3 dPdx, vec3 dPdy); |
| $gvec4 textureGradOffset($gsampler1D sampler, float P, float dPdx, float dPdy, int offset); |
| $gvec4 textureGradOffset($gsampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureGradOffset($gsampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy, ivec3 offset); |
| $gvec4 textureGradOffset($gsampler2DRect sampler, vec2 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| float textureGradOffset(sampler2DRectShadow sampler, vec3 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| float textureGradOffset(sampler1DShadow sampler, vec3 P, float dPdx, float dPdy, int offset ); |
| float textureGradOffset(sampler2DShadow sampler, vec3 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureGradOffset($gsampler1DArray sampler, vec2 P, float dPdx, float dPdy, int offset); |
| $gvec4 textureGradOffset($gsampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| float textureGradOffset(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy, int offset); |
| float textureGradOffset(sampler2DArrayShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureProjGrad($gsampler1D sampler, vec2 P, float dPdx, float dPdy); |
| $gvec4 textureProjGrad($gsampler1D sampler, vec4 P, float dPdx, float dPdy); |
| $gvec4 textureProjGrad($gsampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy); |
| $gvec4 textureProjGrad($gsampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy); |
| $gvec4 textureProjGrad($gsampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy); |
| $gvec4 textureProjGrad($gsampler2DRect sampler, vec3 P, vec2 dPdx, vec2 dPdy); |
| $gvec4 textureProjGrad($gsampler2DRect sampler, vec4 P, vec2 dPdx, vec2 dPdy); |
| float textureProjGrad(sampler2DRectShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy); |
| float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy); |
| float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy); |
| $gvec4 textureProjGradOffset($gsampler1D sampler, vec2 P, float dPdx, float dPdy, int offset); |
| $gvec4 textureProjGradOffset($gsampler1D sampler, vec4 P, float dPdx, float dPdy, int offset); |
| $gvec4 textureProjGradOffset($gsampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureProjGradOffset($gsampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureProjGradOffset($gsampler2DRect sampler, vec3 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureProjGradOffset($gsampler2DRect sampler, vec4 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| float textureProjGradOffset(sampler2DRectShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureProjGradOffset($gsampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy, ivec3 offset); |
| float textureProjGradOffset(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy, int offset); |
| float textureProjGradOffset(sampler2DShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy, ivec2 offset); |
| $gvec4 textureGather($gsampler2D sampler, vec2 P); |
| $gvec4 textureGather($gsampler2D sampler, vec2 P, int comp); |
| $gvec4 textureGather($gsampler2DArray sampler, vec3 P); |
| $gvec4 textureGather($gsampler2DArray sampler, vec3 P, int comp); |
| $gvec4 textureGather($gsamplerCube sampler, vec3 P); |
| $gvec4 textureGather($gsamplerCube sampler, vec3 P, int comp); |
| $gvec4 textureGather($gsamplerCubeArray sampler, vec4 P); |
| $gvec4 textureGather($gsamplerCubeArray sampler, vec4 P, int comp); |
| $gvec4 textureGather($gsampler2DRect sampler, vec2 P); |
| $gvec4 textureGather($gsampler2DRect sampler, vec2 P, int comp); |
| vec4 textureGather(sampler2DShadow sampler, vec2 P, float refZ); |
| vec4 textureGather(sampler2DArrayShadow sampler, vec3 P, float refZ); |
| vec4 textureGather(samplerCubeShadow sampler, vec3 P, float refZ); |
| vec4 textureGather(samplerCubeArrayShadow sampler, vec4 P, float refZ); |
| vec4 textureGather(sampler2DRectShadow sampler, vec2 P, float refZ); |
| $gvec4 textureGatherOffset($gsampler2D sampler, vec2 P, ivec2 offset); |
| $gvec4 textureGatherOffset($gsampler2D sampler, vec2 P, ivec2 offset, int comp); |
| $gvec4 textureGatherOffset($gsampler2DArray sampler, vec3 P, ivec2 offset); |
| $gvec4 textureGatherOffset($gsampler2DArray sampler, vec3 P, ivec2 offset, int comp); |
| $gvec4 textureGatherOffset($gsampler2DRect sampler, vec2 P, ivec2 offset); |
| $gvec4 textureGatherOffset($gsampler2DRect sampler, vec2 P, ivec2 offset, int comp); |
| vec4 textureGatherOffset(sampler2DShadow sampler, vec2 P, float refZ, ivec2 offset); |
| vec4 textureGatherOffset(sampler2DArrayShadow sampler, vec3 P, float refZ, ivec2 offset); |
| vec4 textureGatherOffset(sampler2DRectShadow sampler, vec2 P, float refZ, ivec2 offset); |
| $gvec4 textureGatherOffsets($gsampler2D sampler, vec2 P, ivec2 offsets[4]); |
| $gvec4 textureGatherOffsets($gsampler2D sampler, vec2 P, ivec2 offsets[4], int comp); |
| $gvec4 textureGatherOffsets($gsampler2DArray sampler, vec3 P, ivec2 offsets[4]); |
| $gvec4 textureGatherOffsets($gsampler2DArray sampler, vec3 P, ivec2 offsets[4], int comp); |
| $gvec4 textureGatherOffsets($gsampler2DRect sampler, vec2 P, ivec2 offsets[4]); |
| $gvec4 textureGatherOffsets($gsampler2DRect sampler, vec2 P, ivec2 offsets[4], int comp); |
| vec4 textureGatherOffsets(sampler2DShadow sampler, vec2 P, float refZ, ivec2 offsets[4]); |
| vec4 textureGatherOffsets(sampler2DArrayShadow sampler, vec3 P, float refZ, ivec2 offsets[4]); |
| vec4 textureGatherOffsets(sampler2DRectShadow sampler, vec2 P, float refZ, ivec2 offsets[4]); |
| uint atomicCounterIncrement(atomic_uint c); |
| uint atomicCounter(atomic_uint c); |
| uint atomicAdd(inout uint mem, uint data); |
| int atomicAdd(inout int mem, int data); |
| uint atomicMin(inout uint mem, uint data); |
| int atomicMin(inout int mem, int data); |
| uint atomicMax(inout uint mem, uint data); |
| int atomicMax(inout int mem, int data); |
| uint atomicAnd(inout uint mem, uint data); |
| int atomicAnd(inout int mem, int data); |
| uint atomicOr(inout uint mem, uint data); |
| int atomicOr(inout int mem, int data); |
| uint atomicXor(inout uint mem, uint data); |
| int atomicXor(inout int mem, int data); |
| uint atomicExchange(inout uint mem, uint data); |
| int atomicExchange(inout int mem, int data); |
| uint atomicCompSwap(inout uint mem, uint compare, uint data); |
| int atomicCompSwap(inout int mem, int compare, int data); |
| */ |
| // section 8.12 Additional Image Functions will go here if and when we add |
| // support for them |
| vec4 imageLoad(image2D image, ivec2 P); |
| ivec4 imageLoad(iimage2D image, ivec2 P); |
| $genType dFdx($genType p); |
| $genType dFdy($genType p); |
| float interpolateAtSample(float interpolant, int sample); |
| vec2 interpolateAtSample(vec2 interpolant, int sample); |
| vec3 interpolateAtSample(vec3 interpolant, int sample); |
| vec4 interpolateAtSample(vec4 interpolant, int sample); |
| float interpolateAtOffset(float interpolant, vec2 offset); |
| vec2 interpolateAtOffset(vec2 interpolant, vec2 offset); |
| vec3 interpolateAtOffset(vec3 interpolant, vec2 offset); |
| vec4 interpolateAtOffset(vec4 interpolant, vec2 offset); |
| |
| /* |
| $genType fwidth($genType p); |
| $genType fwidthCoarse($genType p); |
| $genType fwidthFine($genType p); |
| void EmitStreamVertex(int stream); |
| void EndStreamPrimitive(int stream); |
| void EmitVertex(); |
| void EndPrimitive(); |
| void barrier(); |
| void memoryBarrier(); |
| void memoryBarrierAtomicCounter(); |
| void memoryBarrierBuffer(); |
| void memoryBarrierShared(); |
| void memoryBarrierImage(); |
| void groupMemoryBarrier(); |
| */ |
| |
| ) |
| |