Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 STRINGIFY( | 1 STRINGIFY( |
| 2 | 2 |
| 3 // defines built-in functions supported by SkiaSL | 3 // defines built-in functions supported by SkiaSL |
| 4 | 4 |
| 5 $genType radians($genType degrees); | 5 $genType radians($genType degrees); |
| 6 $genType sin($genType angle); | 6 $genType sin($genType angle); |
| 7 $genType cos($genType angle); | 7 $genType cos($genType angle); |
| 8 $genType tan($genType angle); | 8 $genType tan($genType angle); |
| 9 $genType asin($genType x); | 9 $genType asin($genType x); |
| 10 $genType acos($genType x); | 10 $genType acos($genType x); |
| 11 $genType atan($genType y, $genType x); | 11 $genType atan($genType y, $genType x); |
| 12 $genType atan($genType y_over_x); | 12 $genType atan($genType y_over_x); |
| 13 $genType sinh($genType x); | 13 $genType sinh($genType x); |
| 14 $genType cosh($genType x); | 14 $genType cosh($genType x); |
| 15 $genType tanh($genType x); | 15 $genType tanh($genType x); |
| 16 $genType asinh($genType x); | 16 $genType asinh($genType x); |
| 17 $genType acosh($genType x); | 17 $genType acosh($genType x); |
| 18 $genType atanh($genType x); | 18 $genType atanh($genType x); |
| 19 $genType pow($genType x, $genType y); | 19 $genType pow($genType x, $genType y); |
| 20 $genType exp($genType x); | 20 $genType exp($genType x); |
| 21 $genType log($genType x); | 21 $genType log($genType x); |
| 22 $genType exp2($genType x); | 22 $genType exp2($genType x); |
| 23 $genType log2($genType x); | 23 $genType log2($genType x); |
| 24 $genType sqrt($genType x); | 24 $genType sqrt($genType x); |
| 25 $genDType sqrt($genDType x); | 25 //$genDType sqrt($genDType x); |
|
dogben
2016/10/25 13:56:50
nit: Commenting things out seems a little messy.
| |
| 26 $genType inversesqrt($genType x); | 26 $genType inversesqrt($genType x); |
| 27 $genDType inversesqrt($genDType x); | 27 //$genDType inversesqrt($genDType x); |
| 28 $genType abs($genType x); | 28 $genType abs($genType x); |
| 29 $genIType abs($genIType x); | 29 $genIType abs($genIType x); |
| 30 $genDType abs($genDType x); | 30 //$genDType abs($genDType x); |
| 31 $genType sign($genType x); | 31 $genType sign($genType x); |
| 32 $genIType sign($genIType x); | 32 $genIType sign($genIType x); |
| 33 $genDType sign($genDType x); | 33 //$genDType sign($genDType x); |
| 34 $genType floor($genType x); | 34 $genType floor($genType x); |
| 35 $genDType floor($genDType x); | 35 //$genDType floor($genDType x); |
| 36 $genType trunc($genType x); | 36 $genType trunc($genType x); |
| 37 $genDType trunc($genDType x); | 37 //$genDType trunc($genDType x); |
| 38 $genType round($genType x); | 38 $genType round($genType x); |
| 39 $genDType round($genDType x); | 39 //$genDType round($genDType x); |
| 40 $genType roundEven($genType x); | 40 $genType roundEven($genType x); |
| 41 $genDType roundEven($genDType x); | 41 //$genDType roundEven($genDType x); |
| 42 $genType ceil($genType x); | 42 $genType ceil($genType x); |
| 43 $genDType ceil($genDType x); | 43 //$genDType ceil($genDType x); |
| 44 $genType fract($genType x); | 44 $genType fract($genType x); |
| 45 $genDType fract($genDType x); | 45 //$genDType fract($genDType x); |
| 46 $genType mod($genType x, float y); | 46 $genType mod($genType x, float y); |
| 47 $genType mod($genType x, $genType y); | 47 $genType mod($genType x, $genType y); |
| 48 $genDType mod($genDType x, double y); | 48 //$genDType mod($genDType x, double y); |
| 49 $genDType mod($genDType x, $genDType y); | 49 //$genDType mod($genDType x, $genDType y); |
| 50 $genType modf($genType x, out $genType i); | 50 $genType modf($genType x, out $genType i); |
| 51 $genDType modf($genDType x, out $genDType i); | 51 //$genDType modf($genDType x, out $genDType i); |
| 52 $genType min($genType x, $genType y); | 52 $genType min($genType x, $genType y); |
| 53 $genType min($genType x, float y); | 53 $genType min($genType x, float y); |
| 54 $genDType min($genDType x, $genDType y); | 54 //$genDType min($genDType x, $genDType y); |
| 55 $genDType min($genDType x, double y); | 55 //$genDType min($genDType x, double y); |
| 56 $genIType min($genIType x, $genIType y); | 56 $genIType min($genIType x, $genIType y); |
| 57 $genIType min($genIType x, int y); | 57 $genIType min($genIType x, int y); |
| 58 $genUType min($genUType x, $genUType y); | 58 //$genUType min($genUType x, $genUType y); |
| 59 $genUType min($genUType x, uint y); | 59 //$genUType min($genUType x, uint y); |
| 60 $genType max($genType x, $genType y); | 60 $genType max($genType x, $genType y); |
| 61 $genType max($genType x, float y); | 61 $genType max($genType x, float y); |
| 62 $genDType max($genDType x, $genDType y); | 62 //$genDType max($genDType x, $genDType y); |
| 63 $genDType max($genDType x, double y); | 63 //$genDType max($genDType x, double y); |
| 64 $genIType max($genIType x, $genIType y); | 64 $genIType max($genIType x, $genIType y); |
| 65 $genIType max($genIType x, int y); | 65 $genIType max($genIType x, int y); |
| 66 $genUType max($genUType x, $genUType y); | 66 //$genUType max($genUType x, $genUType y); |
| 67 $genUType max($genUType x, uint y); | 67 //$genUType max($genUType x, uint y); |
| 68 $genType clamp($genType x, $genType minVal, $genType maxVal); | 68 $genType clamp($genType x, $genType minVal, $genType maxVal); |
| 69 $genType clamp($genType x, float minVal, float maxVal); | 69 $genType clamp($genType x, float minVal, float maxVal); |
| 70 $genDType clamp($genDType x, $genDType minVal, $genDType maxVal); | 70 //$genDType clamp($genDType x, $genDType minVal, $genDType maxVal); |
| 71 $genDType clamp($genDType x, double minVal, double maxVal); | 71 //$genDType clamp($genDType x, double minVal, double maxVal); |
| 72 $genIType clamp($genIType x, $genIType minVal, $genIType maxVal); | 72 $genIType clamp($genIType x, $genIType minVal, $genIType maxVal); |
| 73 $genIType clamp($genIType x, int minVal, int maxVal); | 73 $genIType clamp($genIType x, int minVal, int maxVal); |
| 74 $genUType clamp($genUType x, $genUType minVal, $genUType maxVal); | 74 //$genUType clamp($genUType x, $genUType minVal, $genUType maxVal); |
| 75 $genUType clamp($genUType x, uint minVal, uint maxVal); | 75 //$genUType clamp($genUType x, uint minVal, uint maxVal); |
| 76 $genType mix($genType x, $genType y, $genType a); | 76 $genType mix($genType x, $genType y, $genType a); |
| 77 $genType mix($genType x, $genType y, float a); | 77 $genType mix($genType x, $genType y, float a); |
| 78 $genDType mix($genDType x, $genDType y, $genDType a); | 78 //$genDType mix($genDType x, $genDType y, $genDType a); |
| 79 $genDType mix($genDType x, $genDType y, double a); | 79 //$genDType mix($genDType x, $genDType y, double a); |
| 80 $genType mix($genType x, $genType y, $genBType a); | 80 $genType mix($genType x, $genType y, $genBType a); |
| 81 $genDType mix($genDType x, $genDType y, $genBType a); | 81 //$genDType mix($genDType x, $genDType y, $genBType a); |
| 82 $genIType mix($genIType x, $genIType y, $genBType a); | 82 $genIType mix($genIType x, $genIType y, $genBType a); |
| 83 $genUType mix($genUType x, $genUType y, $genBType a); | 83 //$genUType mix($genUType x, $genUType y, $genBType a); |
| 84 $genBType mix($genBType x, $genBType y, $genBType a); | 84 $genBType mix($genBType x, $genBType y, $genBType a); |
| 85 $genType step($genType edge, $genType x); | 85 $genType step($genType edge, $genType x); |
| 86 $genType step(float edge, $genType x); | 86 $genType step(float edge, $genType x); |
| 87 $genDType step($genDType edge, $genDType x); | 87 //$genDType step($genDType edge, $genDType x); |
| 88 $genDType step(double edge, $genDType x); | 88 //$genDType step(double edge, $genDType x); |
| 89 $genType smoothstep($genType edge0, $genType edge1, $genType x); | 89 $genType smoothstep($genType edge0, $genType edge1, $genType x); |
| 90 $genType smoothstep(float edge0, float edge1, $genType x); | 90 $genType smoothstep(float edge0, float edge1, $genType x); |
| 91 $genDType smoothstep($genDType edge0, $genDType edge1, $genDType x); | 91 //$genDType smoothstep($genDType edge0, $genDType edge1, $genDType x); |
| 92 $genDType smoothstep(double edge0, double edge1, $genDType x); | 92 //$genDType smoothstep(double edge0, double edge1, $genDType x); |
| 93 $genBType isnan($genType x); | 93 $genBType isnan($genType x); |
| 94 $genBType isnan($genDType x); | 94 $genBType isnan($genDType x); |
| 95 $genBType isinf($genType x); | 95 $genBType isinf($genType x); |
| 96 $genBType isinf($genDType x); | 96 $genBType isinf($genDType x); |
| 97 $genIType floatBitsToInt($genType value); | 97 $genIType floatBitsToInt($genType value); |
| 98 $genUType floatBitsToUint($genType value); | 98 //$genUType floatBitsToUint($genType value); |
| 99 $genType intBitsToFloat($genIType value); | 99 $genType intBitsToFloat($genIType value); |
| 100 $genType uintBitsToFloat($genUType value); | 100 $genType uintBitsToFloat($genUType value); |
| 101 $genType fma($genType a, $genType b, $genType c); | 101 $genType fma($genType a, $genType b, $genType c); |
| 102 $genDType fma($genDType a, $genDType b, $genDType c); | 102 //$genDType fma($genDType a, $genDType b, $genDType c); |
| 103 $genType frexp($genType x, out $genIType exp); | 103 $genType frexp($genType x, out $genIType exp); |
| 104 $genDType frexp($genDType x, out $genIType exp); | 104 //$genDType frexp($genDType x, out $genIType exp); |
| 105 $genType ldexp($genType x, in $genIType exp); | 105 $genType ldexp($genType x, in $genIType exp); |
| 106 $genDType ldexp($genDType x, in $genIType exp); | 106 //$genDType ldexp($genDType x, in $genIType exp); |
| 107 uint packUnorm2x16(vec2 v); | 107 uint packUnorm2x16(vec2 v); |
| 108 uint packSnorm2x16(vec2 v); | 108 uint packSnorm2x16(vec2 v); |
| 109 uint packUnorm4x8(vec4 v); | 109 uint packUnorm4x8(vec4 v); |
| 110 uint packSnorm4x8(vec4 v); | 110 uint packSnorm4x8(vec4 v); |
| 111 vec2 unpackUnorm2x16(uint p); | 111 vec2 unpackUnorm2x16(uint p); |
| 112 vec2 unpackSnorm2x16(uint p); | 112 vec2 unpackSnorm2x16(uint p); |
| 113 vec4 unpackUnorm4x8(uint p); | 113 vec4 unpackUnorm4x8(uint p); |
| 114 vec4 unpackSnorm4x8(uint p); | 114 vec4 unpackSnorm4x8(uint p); |
| 115 double packDouble2x32(uvec2 v); | 115 //double packDouble2x32(uvec2 v); |
| 116 uvec2 unpackDouble2x32(double v); | 116 uvec2 unpackDouble2x32(double v); |
| 117 uint packHalf2x16(vec2 v); | 117 uint packHalf2x16(vec2 v); |
| 118 vec2 unpackHalf2x16(uint v); | 118 vec2 unpackHalf2x16(uint v); |
| 119 float length($genType x); | 119 float length($genType x); |
| 120 double length($genDType x); | 120 //double length($genDType x); |
| 121 float distance($genType p0, $genType p1); | 121 float distance($genType p0, $genType p1); |
| 122 double distance($genDType p0, $genDType p1); | 122 //double distance($genDType p0, $genDType p1); |
| 123 float dot($genType x, $genType y); | 123 float dot($genType x, $genType y); |
| 124 double dot($genDType x, $genDType y); | 124 //double dot($genDType x, $genDType y); |
| 125 vec3 cross(vec3 x, vec3 y); | 125 vec3 cross(vec3 x, vec3 y); |
| 126 dvec3 cross(dvec3 x, dvec3 y); | 126 //dvec3 cross(dvec3 x, dvec3 y); |
| 127 $genType normalize($genType x); | 127 $genType normalize($genType x); |
| 128 $genDType normalize($genDType x); | 128 //$genDType normalize($genDType x); |
| 129 vec4 ftransform(); | 129 vec4 ftransform(); |
| 130 $genType faceforward($genType N, $genType I, $genType Nref); | 130 $genType faceforward($genType N, $genType I, $genType Nref); |
| 131 $genDType faceforward($genDType N, $genDType I, $genDType Nref); | 131 //$genDType faceforward($genDType N, $genDType I, $genDType Nref); |
| 132 $genType reflect($genType I, $genType N); | 132 $genType reflect($genType I, $genType N); |
| 133 $genDType reflect($genDType I, $genDType N); | 133 //$genDType reflect($genDType I, $genDType N); |
| 134 $genType refract($genType I, $genType N, float eta); | 134 $genType refract($genType I, $genType N, float eta); |
| 135 $genDType refract($genDType I, $genDType N, float eta); | 135 //$genDType refract($genDType I, $genDType N, float eta); |
| 136 $mat matrixCompMult($mat x, $mat y); | 136 $mat matrixCompMult($mat x, $mat y); |
| 137 mat2 outerProduct(vec2 c, vec2 r); | 137 mat2 outerProduct(vec2 c, vec2 r); |
| 138 mat3 outerProduct(vec3 c, vec3 r); | 138 mat3 outerProduct(vec3 c, vec3 r); |
| 139 mat4 outerProduct(vec4 c, vec4 r); | 139 mat4 outerProduct(vec4 c, vec4 r); |
| 140 mat2x3 outerProduct(vec3 c, vec2 r); | 140 mat2x3 outerProduct(vec3 c, vec2 r); |
| 141 mat3x2 outerProduct(vec2 c, vec3 r); | 141 mat3x2 outerProduct(vec2 c, vec3 r); |
| 142 mat2x4 outerProduct(vec4 c, vec2 r); | 142 mat2x4 outerProduct(vec4 c, vec2 r); |
| 143 mat4x2 outerProduct(vec2 c, vec4 r); | 143 mat4x2 outerProduct(vec2 c, vec4 r); |
| 144 mat3x4 outerProduct(vec4 c, vec3 r); | 144 mat3x4 outerProduct(vec4 c, vec3 r); |
| 145 mat4x3 outerProduct(vec3 c, vec4 r); | 145 mat4x3 outerProduct(vec3 c, vec4 r); |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 174 $bvec equal($ivec x, $ivec y); | 174 $bvec equal($ivec x, $ivec y); |
| 175 $bvec equal($uvec x, $uvec y); | 175 $bvec equal($uvec x, $uvec y); |
| 176 $bvec equal($bvec x, $bvec y); | 176 $bvec equal($bvec x, $bvec y); |
| 177 $bvec notEqual($vec x, $vec y); | 177 $bvec notEqual($vec x, $vec y); |
| 178 $bvec notEqual($ivec x, $ivec y); | 178 $bvec notEqual($ivec x, $ivec y); |
| 179 $bvec notEqual($uvec x, $uvec y); | 179 $bvec notEqual($uvec x, $uvec y); |
| 180 $bvec notEqual($bvec x, $bvec y); | 180 $bvec notEqual($bvec x, $bvec y); |
| 181 bool any($bvec x); | 181 bool any($bvec x); |
| 182 bool all($bvec x); | 182 bool all($bvec x); |
| 183 $bvec not($bvec x); | 183 $bvec not($bvec x); |
| 184 $genUType uaddCarry($genUType x, $genUType y, out $genUType carry); | 184 |
| 185 $genUType usubBorrow($genUType x, $genUType y, out $genUType borrow); | 185 /* |
| 186 //$genUType uaddCarry($genUType x, $genUType y, out $genUType carry); | |
| 187 //$genUType usubBorrow($genUType x, $genUType y, out $genUType borrow); | |
| 186 void umulExtended($genUType x, $genUType y, out $genUType msb, out $genUType lsb ); | 188 void umulExtended($genUType x, $genUType y, out $genUType msb, out $genUType lsb ); |
| 187 void imulExtended($genIType x, $genIType y, out $genIType msb, out $genIType lsb ); | 189 void imulExtended($genIType x, $genIType y, out $genIType msb, out $genIType lsb ); |
| 188 $genIType bitfieldExtract($genIType value, int offset, int bits); | 190 $genIType bitfieldExtract($genIType value, int offset, int bits); |
| 189 $genUType bitfieldExtract($genUType value, int offset, int bits); | 191 //$genUType bitfieldExtract($genUType value, int offset, int bits); |
| 190 $genIType bitfieldInsert($genIType base, $genIType insert, int offset, int bits) ; | 192 $genIType bitfieldInsert($genIType base, $genIType insert, int offset, int bits) ; |
| 191 $genUType bitfieldInsert($genUType base, $genUType insert, int offset, int bits) ; | 193 //$genUType bitfieldInsert($genUType base, $genUType insert, int offset, int bit s); |
| 192 $genIType bitfieldReverse($genIType value); | 194 $genIType bitfieldReverse($genIType value); |
| 193 $genUType bitfieldReverse($genUType value); | 195 //$genUType bitfieldReverse($genUType value); |
| 194 $genIType bitCount($genIType value); | 196 $genIType bitCount($genIType value); |
| 195 $genIType bitCount($genUType value); | 197 $genIType bitCount($genUType value); |
| 196 $genIType findLSB($genIType value); | 198 $genIType findLSB($genIType value); |
| 197 $genIType findLSB($genUType value); | 199 $genIType findLSB($genUType value); |
| 198 $genIType findMSB($genIType value); | 200 $genIType findMSB($genIType value); |
| 199 $genIType findMSB($genUType value); | 201 $genIType findMSB($genUType value); |
| 200 int textureSize($gsampler1D sampler, int lod); | 202 int textureSize($gsampler1D sampler, int lod); |
| 201 ivec2 textureSize($gsampler2D sampler, int lod); | 203 ivec2 textureSize($gsampler2D sampler, int lod); |
| 202 ivec3 textureSize($gsampler3D sampler, int lod); | 204 ivec3 textureSize($gsampler3D sampler, int lod); |
| 203 ivec2 textureSize($gsamplerCube sampler, int lod); | 205 ivec2 textureSize($gsamplerCube sampler, int lod); |
| 204 int textureSize(sampler1DShadow sampler, int lod); | 206 int textureSize(sampler1DShadow sampler, int lod); |
| 205 ivec2 textureSize(sampler2DShadow sampler, int lod); | 207 ivec2 textureSize(sampler2DShadow sampler, int lod); |
| 206 ivec2 textureSize(samplerCubeShadow sampler, int lod); | 208 ivec2 textureSize(samplerCubeShadow sampler, int lod); |
| 207 ivec3 textureSize($gsamplerCubeArray sampler, int lod); | 209 ivec3 textureSize($gsamplerCubeArray sampler, int lod); |
| 208 ivec3 textureSize(samplerCubeArrayShadow sampler, int lod); | 210 ivec3 textureSize(samplerCubeArrayShadow sampler, int lod); |
| 211 */ | |
| 209 ivec2 textureSize($gsampler2DRect sampler); | 212 ivec2 textureSize($gsampler2DRect sampler); |
| 213 /* | |
| 210 ivec2 textureSize(sampler2DRectShadow sampler); | 214 ivec2 textureSize(sampler2DRectShadow sampler); |
| 211 ivec2 textureSize($gsampler1DArray sampler, int lod); | 215 ivec2 textureSize($gsampler1DArray sampler, int lod); |
| 212 ivec3 textureSize($gsampler2DArray sampler, int lod); | 216 ivec3 textureSize($gsampler2DArray sampler, int lod); |
| 213 ivec2 textureSize(sampler1DArrayShadow sampler, int lod); | 217 ivec2 textureSize(sampler1DArrayShadow sampler, int lod); |
| 214 ivec3 textureSize(sampler2DArrayShadow sampler, int lod); | 218 ivec3 textureSize(sampler2DArrayShadow sampler, int lod); |
| 215 int textureSize($gsamplerBuffer sampler); | 219 int textureSize($gsamplerBuffer sampler); |
| 216 ivec2 textureSize($gsampler2DMS sampler); | 220 ivec2 textureSize($gsampler2DMS sampler); |
| 217 ivec3 textureSize($gsampler2DMSArray sampler); | 221 ivec3 textureSize($gsampler2DMSArray sampler); |
| 218 vec2 textureQueryLod($gsampler1D sampler, float P); | 222 vec2 textureQueryLod($gsampler1D sampler, float P); |
| 219 vec2 textureQueryLod($gsampler2D sampler, vec2 P); | 223 vec2 textureQueryLod($gsampler2D sampler, vec2 P); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 234 int textureQueryLevels($gsamplerCube sampler); | 238 int textureQueryLevels($gsamplerCube sampler); |
| 235 int textureQueryLevels($gsampler1DArray sampler); | 239 int textureQueryLevels($gsampler1DArray sampler); |
| 236 int textureQueryLevels($gsampler2DArray sampler); | 240 int textureQueryLevels($gsampler2DArray sampler); |
| 237 int textureQueryLevels($gsamplerCubeArray sampler); | 241 int textureQueryLevels($gsamplerCubeArray sampler); |
| 238 int textureQueryLevels(sampler1DShadow sampler); | 242 int textureQueryLevels(sampler1DShadow sampler); |
| 239 int textureQueryLevels(sampler2DShadow sampler); | 243 int textureQueryLevels(sampler2DShadow sampler); |
| 240 int textureQueryLevels(samplerCubeShadow sampler); | 244 int textureQueryLevels(samplerCubeShadow sampler); |
| 241 int textureQueryLevels(sampler1DArrayShadow sampler); | 245 int textureQueryLevels(sampler1DArrayShadow sampler); |
| 242 int textureQueryLevels(sampler2DArrayShadow sampler); | 246 int textureQueryLevels(sampler2DArrayShadow sampler); |
| 243 int textureQueryLevels(samplerCubeArrayShadow sampler); | 247 int textureQueryLevels(samplerCubeArrayShadow sampler); |
| 248 */ | |
| 249 | |
| 244 $gvec4 texture($gsampler1D sampler, float P); | 250 $gvec4 texture($gsampler1D sampler, float P); |
| 245 $gvec4 texture($gsampler1D sampler, float P, float bias); | 251 $gvec4 texture($gsampler1D sampler, float P, float bias); |
| 246 $gvec4 texture($gsampler2D sampler, vec2 P); | 252 $gvec4 texture($gsampler2D sampler, vec2 P); |
| 247 vec4 texture(samplerExternalOES sampler, vec2 P, float bias); | 253 vec4 texture(samplerExternalOES sampler, vec2 P, float bias); |
| 248 vec4 texture(samplerExternalOES sampler, vec2 P); | 254 vec4 texture(samplerExternalOES sampler, vec2 P); |
| 255 | |
| 256 /* | |
| 249 $gvec4 texture($gsampler2D sampler, vec2 P, float bias); | 257 $gvec4 texture($gsampler2D sampler, vec2 P, float bias); |
| 250 $gvec4 texture($gsampler3D sampler, vec3 P); | 258 $gvec4 texture($gsampler3D sampler, vec3 P); |
| 251 $gvec4 texture($gsampler3D sampler, vec3 P, float bias); | 259 $gvec4 texture($gsampler3D sampler, vec3 P, float bias); |
| 252 $gvec4 texture($gsamplerCube sampler, vec3 P); | 260 $gvec4 texture($gsamplerCube sampler, vec3 P); |
| 253 $gvec4 texture($gsamplerCube sampler, vec3 P, float bias); | 261 $gvec4 texture($gsamplerCube sampler, vec3 P, float bias); |
| 254 float texture(sampler1DShadow sampler, vec3 P); | 262 float texture(sampler1DShadow sampler, vec3 P); |
| 255 float texture(sampler1DShadow sampler, vec3 P, float bias); | 263 float texture(sampler1DShadow sampler, vec3 P, float bias); |
| 256 float texture(sampler2DShadow sampler, vec3 P); | 264 float texture(sampler2DShadow sampler, vec3 P); |
| 257 float texture(sampler2DShadow sampler, vec3 P, float bias); | 265 float texture(sampler2DShadow sampler, vec3 P, float bias); |
| 258 float texture(samplerCubeShadow sampler, vec4 P); | 266 float texture(samplerCubeShadow sampler, vec4 P); |
| 259 float texture(samplerCubeShadow sampler, vec4 P, float bias); | 267 float texture(samplerCubeShadow sampler, vec4 P, float bias); |
| 260 $gvec4 texture($gsampler1DArray sampler, vec2 P); | 268 $gvec4 texture($gsampler1DArray sampler, vec2 P); |
| 261 $gvec4 texture($gsampler1DArray sampler, vec2 P, float bias); | 269 $gvec4 texture($gsampler1DArray sampler, vec2 P, float bias); |
| 262 $gvec4 texture($gsampler2DArray sampler, vec3 P); | 270 $gvec4 texture($gsampler2DArray sampler, vec3 P); |
| 263 $gvec4 texture($gsampler2DArray sampler, vec3 P, float bias); | 271 $gvec4 texture($gsampler2DArray sampler, vec3 P, float bias); |
| 264 $gvec4 texture($gsamplerCubeArray sampler, vec4 P); | 272 $gvec4 texture($gsamplerCubeArray sampler, vec4 P); |
| 265 $gvec4 texture($gsamplerCubeArray sampler, vec4 P, float bias); | 273 $gvec4 texture($gsamplerCubeArray sampler, vec4 P, float bias); |
| 266 float texture(sampler1DArrayShadow sampler, vec3 P); | 274 float texture(sampler1DArrayShadow sampler, vec3 P); |
| 267 float texture(sampler1DArrayShadow sampler, vec3 P, float bias); | 275 float texture(sampler1DArrayShadow sampler, vec3 P, float bias); |
| 268 float texture(sampler2DArrayShadow sampler, vec4 P); | 276 float texture(sampler2DArrayShadow sampler, vec4 P); |
| 277 */ | |
| 278 | |
| 269 $gvec4 texture($gsampler2DRect sampler, vec2 P); | 279 $gvec4 texture($gsampler2DRect sampler, vec2 P); |
| 280 | |
| 281 /* | |
| 270 float texture(sampler2DRectShadow sampler, vec3 P); | 282 float texture(sampler2DRectShadow sampler, vec3 P); |
| 271 float texture($gsamplerCubeArrayShadow sampler, vec4 P, float compare); | 283 float texture($gsamplerCubeArrayShadow sampler, vec4 P, float compare); |
| 272 | 284 */ |
| 273 ) | 285 ) |
| 274 | 286 |
| 275 // split into multiple chunks, as MSVC++ complains if a single string is too lon g | 287 // split into multiple chunks, as MSVC++ complains if a single string is too lon g |
| 276 | 288 |
| 277 STRINGIFY( | 289 STRINGIFY( |
| 278 | 290 |
| 279 $gvec4 textureProj($gsampler1D sampler, vec2 P); | 291 $gvec4 textureProj($gsampler1D sampler, vec2 P); |
| 280 $gvec4 textureProj($gsampler1D sampler, vec2 P, float bias); | 292 $gvec4 textureProj($gsampler1D sampler, vec2 P, float bias); |
| 281 $gvec4 textureProj($gsampler1D sampler, vec4 P); | 293 $gvec4 textureProj($gsampler1D sampler, vec4 P); |
| 282 $gvec4 textureProj($gsampler1D sampler, vec4 P, float bias); | 294 $gvec4 textureProj($gsampler1D sampler, vec4 P, float bias); |
| 283 $gvec4 textureProj($gsampler2D sampler, vec3 P); | 295 $gvec4 textureProj($gsampler2D sampler, vec3 P); |
| 284 $gvec4 textureProj($gsampler2D sampler, vec3 P, float bias); | 296 $gvec4 textureProj($gsampler2D sampler, vec3 P, float bias); |
| 285 $gvec4 textureProj($gsampler2D sampler, vec4 P); | 297 $gvec4 textureProj($gsampler2D sampler, vec4 P); |
| 286 $gvec4 textureProj($gsampler2D sampler, vec4 P, float bias); | 298 $gvec4 textureProj($gsampler2D sampler, vec4 P, float bias); |
| 299 /* | |
| 287 $gvec4 textureProj($gsampler3D sampler, vec4 P); | 300 $gvec4 textureProj($gsampler3D sampler, vec4 P); |
| 288 $gvec4 textureProj($gsampler3D sampler, vec4 P, float bias); | 301 $gvec4 textureProj($gsampler3D sampler, vec4 P, float bias); |
| 289 float textureProj(sampler1DShadow sampler, vec4 P); | 302 float textureProj(sampler1DShadow sampler, vec4 P); |
| 290 float textureProj(sampler1DShadow sampler, vec4 P, float bias); | 303 float textureProj(sampler1DShadow sampler, vec4 P, float bias); |
| 291 float textureProj(sampler2DShadow sampler, vec4 P); | 304 float textureProj(sampler2DShadow sampler, vec4 P); |
| 292 float textureProj(sampler2DShadow sampler, vec4 P, float bias); | 305 float textureProj(sampler2DShadow sampler, vec4 P, float bias); |
| 293 $gvec4 textureProj($gsampler2DRect sampler, vec3 P); | 306 $gvec4 textureProj($gsampler2DRect sampler, vec3 P); |
| 294 $gvec4 textureProj($gsampler2DRect sampler, vec4 P); | 307 $gvec4 textureProj($gsampler2DRect sampler, vec4 P); |
| 295 float textureProj(sampler2DRectShadow sampler, vec4 P); | 308 float textureProj(sampler2DRectShadow sampler, vec4 P); |
| 296 $gvec4 textureLod($gsampler1D sampler, float P, float lod); | 309 $gvec4 textureLod($gsampler1D sampler, float P, float lod); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 vec4 textureGather(sampler2DRectShadow sampler, vec2 P, float refZ); | 451 vec4 textureGather(sampler2DRectShadow sampler, vec2 P, float refZ); |
| 439 $gvec4 textureGatherOffset($gsampler2D sampler, vec2 P, ivec2 offset); | 452 $gvec4 textureGatherOffset($gsampler2D sampler, vec2 P, ivec2 offset); |
| 440 $gvec4 textureGatherOffset($gsampler2D sampler, vec2 P, ivec2 offset, int comp); | 453 $gvec4 textureGatherOffset($gsampler2D sampler, vec2 P, ivec2 offset, int comp); |
| 441 $gvec4 textureGatherOffset($gsampler2DArray sampler, vec3 P, ivec2 offset); | 454 $gvec4 textureGatherOffset($gsampler2DArray sampler, vec3 P, ivec2 offset); |
| 442 $gvec4 textureGatherOffset($gsampler2DArray sampler, vec3 P, ivec2 offset, int c omp); | 455 $gvec4 textureGatherOffset($gsampler2DArray sampler, vec3 P, ivec2 offset, int c omp); |
| 443 $gvec4 textureGatherOffset($gsampler2DRect sampler, vec2 P, ivec2 offset); | 456 $gvec4 textureGatherOffset($gsampler2DRect sampler, vec2 P, ivec2 offset); |
| 444 $gvec4 textureGatherOffset($gsampler2DRect sampler, vec2 P, ivec2 offset, int co mp); | 457 $gvec4 textureGatherOffset($gsampler2DRect sampler, vec2 P, ivec2 offset, int co mp); |
| 445 vec4 textureGatherOffset(sampler2DShadow sampler, vec2 P, float refZ, ivec2 offs et); | 458 vec4 textureGatherOffset(sampler2DShadow sampler, vec2 P, float refZ, ivec2 offs et); |
| 446 vec4 textureGatherOffset(sampler2DArrayShadow sampler, vec3 P, float refZ, ivec2 offset); | 459 vec4 textureGatherOffset(sampler2DArrayShadow sampler, vec3 P, float refZ, ivec2 offset); |
| 447 vec4 textureGatherOffset(sampler2DRectShadow sampler, vec2 P, float refZ, ivec2 offset); | 460 vec4 textureGatherOffset(sampler2DRectShadow sampler, vec2 P, float refZ, ivec2 offset); |
| 448 /* | |
| 449 $gvec4 textureGatherOffsets($gsampler2D sampler, vec2 P, ivec2 offsets[4]); | 461 $gvec4 textureGatherOffsets($gsampler2D sampler, vec2 P, ivec2 offsets[4]); |
| 450 $gvec4 textureGatherOffsets($gsampler2D sampler, vec2 P, ivec2 offsets[4], int c omp); | 462 $gvec4 textureGatherOffsets($gsampler2D sampler, vec2 P, ivec2 offsets[4], int c omp); |
| 451 $gvec4 textureGatherOffsets($gsampler2DArray sampler, vec3 P, ivec2 offsets[4]); | 463 $gvec4 textureGatherOffsets($gsampler2DArray sampler, vec3 P, ivec2 offsets[4]); |
| 452 $gvec4 textureGatherOffsets($gsampler2DArray sampler, vec3 P, ivec2 offsets[4], int comp); | 464 $gvec4 textureGatherOffsets($gsampler2DArray sampler, vec3 P, ivec2 offsets[4], int comp); |
| 453 $gvec4 textureGatherOffsets($gsampler2DRect sampler, vec2 P, ivec2 offsets[4]); | 465 $gvec4 textureGatherOffsets($gsampler2DRect sampler, vec2 P, ivec2 offsets[4]); |
| 454 $gvec4 textureGatherOffsets($gsampler2DRect sampler, vec2 P, ivec2 offsets[4], i nt comp); | 466 $gvec4 textureGatherOffsets($gsampler2DRect sampler, vec2 P, ivec2 offsets[4], i nt comp); |
| 455 vec4 textureGatherOffsets(sampler2DShadow sampler, vec2 P, float refZ, ivec2 off sets[4]); | 467 vec4 textureGatherOffsets(sampler2DShadow sampler, vec2 P, float refZ, ivec2 off sets[4]); |
| 456 vec4 textureGatherOffsets(sampler2DArrayShadow sampler, vec3 P, float refZ, ivec 2 offsets[4]); | 468 vec4 textureGatherOffsets(sampler2DArrayShadow sampler, vec3 P, float refZ, ivec 2 offsets[4]); |
| 457 vec4 textureGatherOffsets(sampler2DRectShadow sampler, vec2 P, float refZ, ivec2 offsets[4]); | 469 vec4 textureGatherOffsets(sampler2DRectShadow sampler, vec2 P, float refZ, ivec2 offsets[4]); |
| 458 */ | 470 */ |
| 459 vec4 texture1D(sampler1D sampler, float coord); | 471 vec4 texture1D(sampler1D sampler, float coord); |
| 460 vec4 texture1D(sampler1D sampler, float coord, float bias); | 472 vec4 texture1D(sampler1D sampler, float coord, float bias); |
| 473 /* | |
| 461 vec4 texture1DProj(sampler1D sampler, vec2 coord); | 474 vec4 texture1DProj(sampler1D sampler, vec2 coord); |
| 462 vec4 texture1DProj(sampler1D sampler, vec2 coord, float bias); | 475 vec4 texture1DProj(sampler1D sampler, vec2 coord, float bias); |
| 463 vec4 texture1DProj(sampler1D sampler, vec4 coord); | 476 vec4 texture1DProj(sampler1D sampler, vec4 coord); |
| 464 vec4 texture1DProj(sampler1D sampler, vec4 coord, float bias); | 477 vec4 texture1DProj(sampler1D sampler, vec4 coord, float bias); |
| 465 vec4 texture1DLod(sampler1D sampler, float coord, float lod); | 478 vec4 texture1DLod(sampler1D sampler, float coord, float lod); |
| 466 vec4 texture1DProjLod(sampler1D sampler, vec2 coord, float lod); | 479 vec4 texture1DProjLod(sampler1D sampler, vec2 coord, float lod); |
| 467 vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod); | 480 vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod); |
| 481 */ | |
| 468 vec4 texture2D(sampler2D sampler, vec2 coord); | 482 vec4 texture2D(sampler2D sampler, vec2 coord); |
| 469 vec4 texture2D(samplerExternalOES sampler, vec2 coord); | 483 vec4 texture2D(samplerExternalOES sampler, vec2 coord); |
| 470 vec4 texture2D(sampler2D sampler, vec2 coord, float bias); | 484 vec4 texture2D(sampler2D sampler, vec2 coord, float bias); |
| 485 /* | |
| 471 vec4 texture2DProj(sampler2D sampler, vec3 coord); | 486 vec4 texture2DProj(sampler2D sampler, vec3 coord); |
| 472 vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias); | 487 vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias); |
| 473 vec4 texture2DProj(sampler2D sampler, vec4 coord); | 488 vec4 texture2DProj(sampler2D sampler, vec4 coord); |
| 474 vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias); | 489 vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias); |
| 475 vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod); | 490 vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod); |
| 476 vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod); | 491 vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod); |
| 477 vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod); | 492 vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod); |
| 478 vec4 texture3D(sampler3D sampler, vec3 coord); | 493 vec4 texture3D(sampler3D sampler, vec3 coord); |
| 479 vec4 texture3D(sampler3D sampler, vec3 coord, float bias); | 494 vec4 texture3D(sampler3D sampler, vec3 coord, float bias); |
| 480 vec4 texture3DProj(sampler3D sampler, vec4 coord); | 495 vec4 texture3DProj(sampler3D sampler, vec4 coord); |
| 481 vec4 texture3DProj(sampler3D sampler, vec4 coord, float bias); | 496 vec4 texture3DProj(sampler3D sampler, vec4 coord, float bias); |
| 482 vec4 texture3DLod(sampler3D sampler, vec3 coord, float lod); | 497 vec4 texture3DLod(sampler3D sampler, vec3 coord, float lod); |
| 483 vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod); | 498 vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod); |
| 484 vec4 textureCube(samplerCube sampler, vec3 coord); | 499 vec4 textureCube(samplerCube sampler, vec3 coord); |
| 485 vec4 textureCube(samplerCube sampler, vec3 coord, float bias); | 500 vec4 textureCube(samplerCube sampler, vec3 coord, float bias); |
| 486 vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod); | 501 vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod); |
| 487 vec4 shadow1D(sampler1DShadow sampler, vec3 coord); | 502 vec4 shadow1D(sampler1DShadow sampler, vec3 coord); |
| 488 vec4 shadow1D(sampler1DShadow sampler, vec3 coord, float bias); | 503 vec4 shadow1D(sampler1DShadow sampler, vec3 coord, float bias); |
| 489 vec4 shadow2D(sampler2DShadow sampler, vec3 coord); | 504 vec4 shadow2D(sampler2DShadow sampler, vec3 coord); |
| 490 vec4 shadow2D(sampler2DShadow sampler, vec3 coord, float bias); | 505 vec4 shadow2D(sampler2DShadow sampler, vec3 coord, float bias); |
| 491 vec4 shadow1DProj(sampler1DShadow sampler, vec4 coord); | 506 vec4 shadow1DProj(sampler1DShadow sampler, vec4 coord); |
| 492 vec4 shadow1DProj(sampler1DShadow sampler, vec4 coord, float bias); | 507 vec4 shadow1DProj(sampler1DShadow sampler, vec4 coord, float bias); |
| 493 vec4 shadow2DProj(sampler2DShadow sampler, vec4 coord); | 508 vec4 shadow2DProj(sampler2DShadow sampler, vec4 coord); |
| 494 vec4 shadow2DProj(sampler2DShadow sampler, vec4 coord, float bias); | 509 vec4 shadow2DProj(sampler2DShadow sampler, vec4 coord, float bias); |
| 495 vec4 shadow1DLod(sampler1DShadow sampler, vec3 coord, float lod); | 510 vec4 shadow1DLod(sampler1DShadow sampler, vec3 coord, float lod); |
| 496 vec4 shadow2DLod(sampler2DShadow sampler, vec3 coord, float lod); | 511 vec4 shadow2DLod(sampler2DShadow sampler, vec3 coord, float lod); |
| 497 vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod); | 512 vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod); |
| 498 vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod); | 513 vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod); |
| 499 /* | |
| 500 uint atomicCounterIncrement(atomic_uint c); | 514 uint atomicCounterIncrement(atomic_uint c); |
| 501 uint atomicCounter(atomic_uint c); | 515 uint atomicCounter(atomic_uint c); |
| 502 uint atomicAdd(inout uint mem, uint data); | 516 uint atomicAdd(inout uint mem, uint data); |
| 503 int atomicAdd(inout int mem, int data); | 517 int atomicAdd(inout int mem, int data); |
| 504 uint atomicMin(inout uint mem, uint data); | 518 uint atomicMin(inout uint mem, uint data); |
| 505 int atomicMin(inout int mem, int data); | 519 int atomicMin(inout int mem, int data); |
| 506 uint atomicMax(inout uint mem, uint data); | 520 uint atomicMax(inout uint mem, uint data); |
| 507 int atomicMax(inout int mem, int data); | 521 int atomicMax(inout int mem, int data); |
| 508 uint atomicAnd(inout uint mem, uint data); | 522 uint atomicAnd(inout uint mem, uint data); |
| 509 int atomicAnd(inout int mem, int data); | 523 int atomicAnd(inout int mem, int data); |
| 510 uint atomicOr(inout uint mem, uint data); | 524 uint atomicOr(inout uint mem, uint data); |
| 511 int atomicOr(inout int mem, int data); | 525 int atomicOr(inout int mem, int data); |
| 512 uint atomicXor(inout uint mem, uint data); | 526 uint atomicXor(inout uint mem, uint data); |
| 513 int atomicXor(inout int mem, int data); | 527 int atomicXor(inout int mem, int data); |
| 514 uint atomicExchange(inout uint mem, uint data); | 528 uint atomicExchange(inout uint mem, uint data); |
| 515 int atomicExchange(inout int mem, int data); | 529 int atomicExchange(inout int mem, int data); |
| 516 uint atomicCompSwap(inout uint mem, uint compare, uint data); | 530 uint atomicCompSwap(inout uint mem, uint compare, uint data); |
| 517 int atomicCompSwap(inout int mem, int compare, int data); | 531 int atomicCompSwap(inout int mem, int compare, int data); |
| 518 */ | 532 */ |
| 519 // section 8.12 Image Functions will go here if and when we add support for them | 533 // section 8.12 Image Functions will go here if and when we add support for them |
| 520 | 534 |
| 521 $genType dFdx($genType p); | 535 $genType dFdx($genType p); |
| 522 $genType dFdy($genType p); | 536 $genType dFdy($genType p); |
| 537 | |
| 538 /* | |
| 523 $genType fwidth($genType p); | 539 $genType fwidth($genType p); |
| 524 $genType fwidthCoarse($genType p); | 540 $genType fwidthCoarse($genType p); |
| 525 $genType fwidthFine($genType p); | 541 $genType fwidthFine($genType p); |
| 526 float interpolateAtSample(float interpolant, int sample); | 542 float interpolateAtSample(float interpolant, int sample); |
| 527 vec2 interpolateAtSample(vec2 interpolant, int sample); | 543 vec2 interpolateAtSample(vec2 interpolant, int sample); |
| 528 vec3 interpolateAtSample(vec3 interpolant, int sample); | 544 vec3 interpolateAtSample(vec3 interpolant, int sample); |
| 529 vec4 interpolateAtSample(vec4 interpolant, int sample); | 545 vec4 interpolateAtSample(vec4 interpolant, int sample); |
| 530 float interpolateAtOffset(float interpolant, vec2 offset); | 546 float interpolateAtOffset(float interpolant, vec2 offset); |
| 531 vec2 interpolateAtOffset(vec2 interpolant, vec2 offset); | 547 vec2 interpolateAtOffset(vec2 interpolant, vec2 offset); |
| 532 vec3 interpolateAtOffset(vec3 interpolant, vec2 offset); | 548 vec3 interpolateAtOffset(vec3 interpolant, vec2 offset); |
| 533 vec4 interpolateAtOffset(vec4 interpolant, vec2 offset); | 549 vec4 interpolateAtOffset(vec4 interpolant, vec2 offset); |
| 534 void EmitStreamVertex(int stream); | 550 void EmitStreamVertex(int stream); |
| 535 void EndStreamPrimitive(int stream); | 551 void EndStreamPrimitive(int stream); |
| 536 void EmitVertex(); | 552 void EmitVertex(); |
| 537 void EndPrimitive(); | 553 void EndPrimitive(); |
| 538 void barrier(); | 554 void barrier(); |
| 539 void memoryBarrier(); | 555 void memoryBarrier(); |
| 540 void memoryBarrierAtomicCounter(); | 556 void memoryBarrierAtomicCounter(); |
| 541 void memoryBarrierBuffer(); | 557 void memoryBarrierBuffer(); |
| 542 void memoryBarrierShared(); | 558 void memoryBarrierShared(); |
| 543 void memoryBarrierImage(); | 559 void memoryBarrierImage(); |
| 544 void groupMemoryBarrier(); | 560 void groupMemoryBarrier(); |
| 561 */ | |
| 545 | 562 |
| 546 ) | 563 ) |
| 547 | 564 |
| OLD | NEW |