1// The format of this file: 2// C++ style single-line comments are supported. 3// Leading whitespace is only for formatting and doesn't have semantic meaning. 4// 5// Grouping: 6// Groups of functions are denoted by "GROUP BEGIN" and "GROUP END". Groups can be nested. 7// Groups can have metadata related to the group itself. This is given at the end of the GROUP 8// BEGIN line in JSON object format. 9// Example: 10// GROUP BEGIN <group name> {"shader_type": "FRAGMENT"} 11// GROUP END <group name> 12// 13// Defaults: 14// Default metadata for functions can be set with "DEFAULT METADATA" followed by metadata in JSON 15// object format. The metadata is applied to all following functions regardless of grouping until 16// another "DEFAULT METADATA" line is encountered, or until the end of a top-level group. 17// Example: 18// DEFAULT METADATA {"opSuffix": "ComponentWise"} 19// 20// Supported function metadata properties are: 21// "essl_level" 22// string, one of COMMON_BUILTINS, ESSL1_BUILTINS, ESSL3_BUILTINS and ESSL3_1_BUILTINS, 23// ESSL3_2_BUILTINS. 24// "glsl_level" 25// string, one of COMMON_BUILTINS, COMMON_BUILTINS, GLSL1_2_BUILTINS, GLSL1_3_BUILTINS, 26// GLSL1_4_BUILTINS, GLSL1_5_BUILTINS, GLSL3_3_BUILTINS, GLSL4_BUILTINS, GLSL4_1_BUILTINS, 27// GLSL4_2_BUILTINS, GLSL4_3_BUILTINS, GLSL4_4_BUILTINS, GLSL4_5_BUILTINS, and 28// GLSL4_6_BUILTINS. 29// "opSuffix" 30// (optional) string, suffix to add to EOp code. The op is derived from the function name, 31// and this suffix is applied to disambiguate between functions of the same name but in 32// different groups. 33// "suffix" 34// string, suffix that is used to disambiguate C++ variable names created based on the 35// function name from C++ keywords, or disambiguate two functions with the same name. 36// "essl_extension" 37// string, ESSL extension where the function is defined. 38// "essl_extension_becomes_core_in" 39// string, ESSL level where functions from this extension have become core. 40// "glsl_extension" 41// string, GLSL extension where the function is defined. 42// "hasSideEffects" 43// boolean, can be used to mark a function as having side effects. Functions with an out or 44// inout parameter are automatically treated as having side effects. 45// TODO: Since the removal of the CallBuiltInFunction operator, all functions that were 46// previously given that operator have been marked as having side effect to preserve the 47// prior behavior. Many of these functions don't actually have side effects, and can be 48// cleaned up. http://anglebug.com/6061 49// TODO: dFdx, dFdy and fwidth were explicitly marked as having side-effects by Olli. They 50// don't actually have side effects, and it may have been done to work around a bug. Try 51// and clean these up. http://anglebug.com/6061 52// 53// Function declarations: 54// Lines that declare functions are in a similar format as in the GLSL spec: 55// <return type> <function name>(<param type>, ...); 56// Parameter types can have "out" or "inout" qualifiers. 57 58GROUP BEGIN Math {"queryFunction": true} 59 GROUP BEGIN Trigonometric 60 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 61 genType radians(genType); 62 genType degrees(genType); 63 genType sin(genType); 64 genType cos(genType); 65 genType tan(genType); 66 genType asin(genType); 67 genType acos(genType); 68 genType atan(genType, genType); 69 genType atan(genType); 70 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 71 genType sinh(genType); 72 genType cosh(genType); 73 genType tanh(genType); 74 genType asinh(genType); 75 genType acosh(genType); 76 genType atanh(genType); 77 GROUP END Trigonometric 78 79 GROUP BEGIN Exponential 80 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 81 genType pow(genType, genType); 82 genType exp(genType); 83 genType log(genType); 84 genType exp2(genType); 85 genType log2(genType); 86 genType sqrt(genType); 87 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 88 genDType sqrt(genDType); 89 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 90 genType inversesqrt(genType); 91 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 92 genDType inversesqrt(genDType); 93 GROUP END Exponential 94 95 GROUP BEGIN Common 96 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 97 genType abs(genType); 98 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 99 genIType abs(genIType); 100 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 101 genDType abs(genDType); 102 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 103 genType sign(genType); 104 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 105 genIType sign(genIType); 106 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 107 genDType sign(genDType); 108 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 109 genType floor(genType); 110 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 111 genDType floor(genDType); 112 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 113 genType trunc(genType); 114 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 115 genDType trunc(genDType); 116 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 117 genType round(genType); 118 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 119 genDType round(genDType); 120 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 121 genType roundEven(genType); 122 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 123 genDType roundEven(genDType); 124 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 125 genType ceil(genType); 126 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 127 genDType ceil(genDType); 128 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 129 genType fract(genType); 130 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 131 genDType fract(genDType); 132 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 133 genType mod(genType, float); 134 genType mod(genType, genType); 135 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 136 genDType mod(genDType, double); 137 genDType mod(genDType, genDType); 138 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 139 genType min(genType, float); 140 genType min(genType, genType); 141 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 142 genDType min(genDType, genDType); 143 genDType min(genDType, double); 144 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 145 genIType min(genIType, genIType); 146 genIType min(genIType, int); 147 genUType min(genUType, genUType); 148 genUType min(genUType, uint); 149 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 150 genType max(genType, float); 151 genType max(genType, genType); 152 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 153 genDType max(genDType, genDType); 154 genDType max(genDType, double); 155 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 156 genIType max(genIType, genIType); 157 genIType max(genIType, int); 158 genUType max(genUType, genUType); 159 genUType max(genUType, uint); 160 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 161 genType clamp(genType, float, float); 162 genType clamp(genType, genType, genType); 163 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 164 genDType clamp(genDType, double, double); 165 genDType clamp(genDType, genDType, genDType); 166 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 167 genIType clamp(genIType, int, int); 168 genIType clamp(genIType, genIType, genIType); 169 genUType clamp(genUType, uint, uint); 170 genUType clamp(genUType, genUType, genUType); 171 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 172 genType mix(genType, genType, float); 173 genType mix(genType, genType, genType); 174 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 175 genDType mix(genDType, genDType, double); 176 genDType mix(genDType, genDType, genDType); 177 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 178 genType mix(genType, genType, genBType); 179 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 180 genDType mix(genDType, genDType, genBType); 181 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_5_BUILTINS"} 182 genIType mix(genIType, genIType, genBType); 183 genUType mix(genUType, genUType, genBType); 184 genBType mix(genBType, genBType, genBType); 185 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 186 genType step(genType, genType); 187 genType step(float, genType); 188 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 189 genDType step(genDType, genDType); 190 genDType step(double, genDType); 191 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 192 genDType smoothstep(genDType, genDType, genDType); 193 genDType smoothstep(double, double, genDType); 194 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 195 genType smoothstep(genType, genType, genType); 196 genType smoothstep(float, float, genType); 197 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 198 genType modf(genType, out genType); 199 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 200 genDType modf(genDType, out genDType); 201 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 202 genBType isnan(genType); 203 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 204 genBType isnan(genDType); 205 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS"} 206 genBType isinf(genType); 207 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 208 genBType isinf(genDType); 209 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL3_3_BUILTINS"} 210 genIType floatBitsToInt(genType); 211 genUType floatBitsToUint(genType); 212 genType intBitsToFloat(genIType); 213 genType uintBitsToFloat(genUType); 214 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS"} 215 genType fma(genType, genType, genType); 216 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "essl_extension": "EXT_gpu_shader5", "suffix": "Ext"} 217 genType fma(genType, genType, genType); 218 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 219 genType fma(genDType, genDType, genDType); 220 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS"} 221 genType frexp(genType, out genIType); 222 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 223 genDType frexp(genDType, out genIType); 224 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS"} 225 genType ldexp(genType, genIType); 226 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 227 genDType ldexp(genDType, genIType); 228 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL4_2_BUILTINS"} 229 uint packSnorm2x16(vec2); 230 uint packHalf2x16(vec2); 231 vec2 unpackSnorm2x16(uint); 232 vec2 unpackHalf2x16(uint); 233 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL4_BUILTINS"} 234 uint packUnorm2x16(vec2); 235 vec2 unpackUnorm2x16(uint); 236 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS"} 237 uint packUnorm4x8(vec4); 238 uint packSnorm4x8(vec4); 239 vec4 unpackUnorm4x8(uint); 240 vec4 unpackSnorm4x8(uint); 241 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 242 double packDouble2x32(uvec2); 243 uvec2 unpackDouble2x32(double); 244 GROUP END Common 245 246 GROUP BEGIN Geometric 247 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 248 float length(genType); 249 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 250 double length(genDType); 251 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 252 float distance(genType, genType); 253 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 254 double distance(genDType, genDType); 255 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 256 float dot(genType, genType); 257 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 258 double dot(genDType, genDType); 259 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 260 vec3 cross(vec3, vec3); 261 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 262 dvec3 cross(dvec3, dvec3); 263 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 264 genType normalize(genType); 265 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 266 genDType normalize(genDType); 267 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 268 genType faceforward(genType, genType, genType); 269 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 270 genDType faceforward(genDType, genDType, genDType); 271 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 272 genType reflect(genType, genType); 273 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 274 genDType reflect(genDType, genDType); 275 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 276 genType refract(genType, genType, float); 277 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS"} 278 genDType refract(genDType, genDType, float); 279 GROUP END Geometric 280 281 GROUP BEGIN GeometricVS {"shader_type": "VERTEX"} 282 DEFAULT METADATA {"glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 283 vec4 ftransform(); 284 GROUP END GeometricVS 285 286 GROUP BEGIN Matrix 287 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 288 mat2 matrixCompMult(mat2, mat2); 289 mat3 matrixCompMult(mat3, mat3); 290 mat4 matrixCompMult(mat4, mat4); 291 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS"} 292 mat2x3 matrixCompMult(mat2x3, mat2x3); 293 mat3x2 matrixCompMult(mat3x2, mat3x2); 294 mat2x4 matrixCompMult(mat2x4, mat2x4); 295 mat4x2 matrixCompMult(mat4x2, mat4x2); 296 mat3x4 matrixCompMult(mat3x4, mat3x4); 297 mat4x3 matrixCompMult(mat4x3, mat4x3); 298 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_2_BUILTINS"} 299 mat2 outerProduct(vec2, vec2); 300 mat3 outerProduct(vec3, vec3); 301 mat4 outerProduct(vec4, vec4); 302 mat2x3 outerProduct(vec3, vec2); 303 mat3x2 outerProduct(vec2, vec3); 304 mat2x4 outerProduct(vec4, vec2); 305 mat4x2 outerProduct(vec2, vec4); 306 mat3x4 outerProduct(vec4, vec3); 307 mat4x3 outerProduct(vec3, vec4); 308 mat2 transpose(mat2); 309 mat3 transpose(mat3); 310 mat4 transpose(mat4); 311 mat2x3 transpose(mat3x2); 312 mat3x2 transpose(mat2x3); 313 mat2x4 transpose(mat4x2); 314 mat4x2 transpose(mat2x4); 315 mat3x4 transpose(mat4x3); 316 mat4x3 transpose(mat3x4); 317 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS"} 318 float determinant(mat2); 319 float determinant(mat3); 320 float determinant(mat4); 321 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_4_BUILTINS"} 322 mat2 inverse(mat2); 323 mat3 inverse(mat3); 324 mat4 inverse(mat4); 325 GROUP END Matrix 326 327 GROUP BEGIN Vector 328 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 329 bvec lessThan(vec, vec); 330 bvec lessThan(ivec, ivec); 331 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "opSuffix": "ComponentWise"} 332 bvec lessThan(uvec, uvec); 333 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 334 bvec lessThanEqual(vec, vec); 335 bvec lessThanEqual(ivec, ivec); 336 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "opSuffix": "ComponentWise"} 337 bvec lessThanEqual(uvec, uvec); 338 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 339 bvec greaterThan(vec, vec); 340 bvec greaterThan(ivec, ivec); 341 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "opSuffix": "ComponentWise"} 342 bvec greaterThan(uvec, uvec); 343 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 344 bvec greaterThanEqual(vec, vec); 345 bvec greaterThanEqual(ivec, ivec); 346 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "opSuffix": "ComponentWise"} 347 bvec greaterThanEqual(uvec, uvec); 348 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 349 bvec equal(vec, vec); 350 bvec equal(ivec, ivec); 351 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "opSuffix": "ComponentWise"} 352 bvec equal(uvec, uvec); 353 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 354 bvec equal(bvec, bvec); 355 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 356 bvec notEqual(vec, vec); 357 bvec notEqual(ivec, ivec); 358 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "opSuffix": "ComponentWise"} 359 bvec notEqual(uvec, uvec); 360 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise"} 361 bvec notEqual(bvec, bvec); 362 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS"} 363 bool any(bvec); 364 bool all(bvec); 365 DEFAULT METADATA {"essl_level": "COMMON_BUILTINS", "glsl_level": "COMMON_BUILTINS", "opSuffix": "ComponentWise", "suffix": "Func"} 366 bvec not(bvec); 367 GROUP END Vector 368 369 GROUP BEGIN Integer 370 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS"} 371 genIType bitfieldExtract(genIType, int, int); 372 genUType bitfieldExtract(genUType, int, int); 373 genIType bitfieldInsert(genIType, genIType, int, int); 374 genUType bitfieldInsert(genUType, genUType, int, int); 375 genIType bitfieldReverse(genIType); 376 genUType bitfieldReverse(genUType); 377 genIType bitCount(genIType); 378 genIType bitCount(genUType); 379 genIType findLSB(genIType); 380 genIType findLSB(genUType); 381 genIType findMSB(genIType); 382 genIType findMSB(genUType); 383 genUType uaddCarry(genUType, genUType, out genUType); 384 genUType usubBorrow(genUType, genUType, out genUType); 385 void umulExtended(genUType, genUType, out genUType, out genUType); 386 void imulExtended(genIType, genIType, out genIType, out genIType); 387 GROUP END Integer 388GROUP END Math 389 390GROUP BEGIN Texture {"queryFunction": true} 391 GROUP BEGIN FirstVersions 392 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 393 vec4 texture2D(sampler2D, vec2); 394 vec4 texture2DProj(sampler2D, vec3); 395 vec4 texture2DProj(sampler2D, vec4); 396 vec4 textureCube(samplerCube, vec3); 397 DEFAULT METADATA {"glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 398 vec4 texture1D(sampler1D, float); 399 vec4 texture1DProj(sampler1D, vec2); 400 vec4 texture1DProj(sampler1D, vec4); 401 vec4 texture3D(sampler3D, vec3); 402 vec4 texture3DProj(sampler3D, vec4); 403 vec4 shadow1D(sampler1DShadow, vec3); 404 vec4 shadow1DProj(sampler1DShadow, vec4); 405 vec4 shadow2D(sampler2DShadow, vec3); 406 vec4 shadow2DProj(sampler2DShadow, vec4); 407 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_3D"} 408 vec4 texture3D(sampler3D, vec3); 409 vec4 texture3DProj(sampler3D, vec4); 410 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_shadow_samplers"} 411 float shadow2DEXT(sampler2DShadow, vec3); 412 float shadow2DProjEXT(sampler2DShadow, vec4); 413 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "essl_extension": "OES_EGL_image_external, NV_EGL_stream_consumer_external", "hasSideEffects": "true"} 414 vec4 texture2D(samplerExternalOES, vec2); 415 vec4 texture2DProj(samplerExternalOES, vec3); 416 vec4 texture2DProj(samplerExternalOES, vec4); 417 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "ARB_texture_rectangle"} 418 vec4 texture2DRect(sampler2DRect, vec2); 419 vec4 texture2DRectProj(sampler2DRect, vec3); 420 vec4 texture2DRectProj(sampler2DRect, vec4); 421 // The *Grad* variants are new to both vertex and fragment shaders; the fragment 422 // shader specific pieces are added separately below. 423 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_shader_texture_lod"} 424 vec4 texture2DGradEXT(sampler2D, vec2, vec2, vec2); 425 vec4 texture2DProjGradEXT(sampler2D, vec3, vec2, vec2); 426 vec4 texture2DProjGradEXT(sampler2D, vec4, vec2, vec2); 427 vec4 textureCubeGradEXT(samplerCube, vec3, vec3, vec3); 428 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true", "extension": "WEBGL_video_texture"} 429 vec4 textureVideoWEBGL(samplerVideoWEBGL, vec2); 430 431 // Variants with bias are limited to fragment shaders 432 GROUP BEGIN Bias {"shader_type": "FRAGMENT", "opSuffix": "Bias"} 433 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 434 vec4 texture2D(sampler2D, vec2, float); 435 vec4 texture2DProj(sampler2D, vec3, float); 436 vec4 texture2DProj(sampler2D, vec4, float); 437 vec4 textureCube(samplerCube, vec3, float); 438 DEFAULT METADATA {"glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 439 vec4 texture3D(sampler3D, vec3, float); 440 vec4 texture3DProj(sampler3D, vec4, float); 441 vec4 texture1D(sampler1D, float, float); 442 vec4 texture1DProj(sampler1D, vec2, float); 443 vec4 texture1DProj(sampler1D, vec4, float); 444 vec4 shadow1D(sampler1DShadow, vec3, float); 445 vec4 shadow1DProj(sampler1DShadow, vec4, float); 446 vec4 shadow2D(sampler2DShadow, vec3, float); 447 vec4 shadow2DProj(sampler2DShadow, vec4, float); 448 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_3D"} 449 vec4 texture3D(sampler3D, vec3, float); 450 vec4 texture3DProj(sampler3D, vec4, float); 451 GROUP END Bias 452 453 // Variants with lod are accessible to all shader stages in desktop GL 454 GROUP BEGIN Lod 455 DEFAULT METADATA {"glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 456 vec4 texture2DLod(sampler2D, vec2, float); 457 vec4 texture2DProjLod(sampler2D, vec3, float); 458 vec4 texture2DProjLod(sampler2D, vec4, float); 459 vec4 textureCubeLod(samplerCube, vec3, float); 460 vec4 texture1DLod(sampler1D, float, float); 461 vec4 texture1DProjLod(sampler1D, vec2, float); 462 vec4 texture1DProjLod(sampler1D, vec4, float); 463 vec4 shadow1DLod(sampler1DShadow, vec3, float); 464 vec4 shadow1DProjLod(sampler1DShadow, vec4, float); 465 vec4 shadow2DLod(sampler2DShadow, vec3, float); 466 vec4 shadow2DProjLod(sampler2DShadow, vec4, float); 467 vec4 texture3DLod(sampler3D, vec3, float); 468 vec4 texture3DProjLod(sampler3D, vec4, float); 469 // The GLES spec mentioning that lod variants are limited to vertex shaders, and the 470 // OES_texture_3D spec doesn't mention otherwise. However, these functions are used in tests 471 // and seem to be expected to be available in fragment shaders too. 472 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_3D"} 473 vec4 texture3DLod(sampler3D, vec3, float); 474 vec4 texture3DProjLod(sampler3D, vec4, float); 475 GROUP END Lod 476 477 // Variants with lod are limited to vertex shaders in GLES 478 GROUP BEGIN LodVS {"shader_type": "VERTEX", "opSuffix": "VS"} 479 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true"} 480 vec4 texture2DLod(sampler2D, vec2, float); 481 vec4 texture2DProjLod(sampler2D, vec3, float); 482 vec4 texture2DProjLod(sampler2D, vec4, float); 483 vec4 textureCubeLod(samplerCube, vec3, float); 484 GROUP END LodVS 485 486 // EXT_shader_texture_lod brings some lod variants to fragment shaders 487 GROUP BEGIN LodFS {"shader_type": "FRAGMENT", "opSuffix": "FS"} 488 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_shader_texture_lod"} 489 vec4 texture2DLodEXT(sampler2D, vec2, float); 490 vec4 texture2DProjLodEXT(sampler2D, vec3, float); 491 vec4 texture2DProjLodEXT(sampler2D, vec4, float); 492 vec4 textureCubeLodEXT(samplerCube, vec3, float); 493 GROUP END LodFS 494 495 GROUP END FirstVersions 496 497 GROUP BEGIN NoBias 498 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 499 gvec4 texture(gsampler2D, vec2); 500 gvec4 texture(gsampler3D, vec3); 501 gvec4 texture(gsamplerCube, vec3); 502 gvec4 texture(gsampler2DArray, vec3); 503 float texture(sampler2DShadow, vec3); 504 float texture(samplerCubeShadow, vec4); 505 float texture(sampler2DArrayShadow, vec4); 506 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 507 gvec4 texture(gsampler1D, float); 508 float texture(sampler1DShadow, vec3); 509 gvec4 texture(gsampler1DArray, vec3); 510 float texture(sampler1DArrayShadow, vec3); 511 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 512 gvec4 texture(gsampler2DRect, vec2); 513 float texture(sampler2DRectShadow, vec3); 514 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 515 gvec4 texture(gsamplerCubeArray, vec4); 516 float texture(samplerCubeArrayShadow, vec4, float); 517 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 518 gvec4 texture(gsamplerCubeArray, vec4); 519 float texture(samplerCubeArrayShadow, vec4, float); 520 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_EGL_image_external_essl3"} 521 vec4 texture(samplerExternalOES, vec2); 522 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_YUV_target"} 523 vec4 texture(samplerExternal2DY2YEXT, vec2); 524 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "ARB_texture_rectangle"} 525 // We don't have a rectangle texture essl_extension for OpenGL ES however based on the behavior of 526 // rectangle texture in desktop OpenGL, they should be sampled with a "texture" overload in 527 // GLSL version that have such an overload. This is the case for ESSL3 and above. 528 vec4 texture(sampler2DRect, vec2); 529 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true", "extension": "WEBGL_video_texture"} 530 vec4 texture(samplerVideoWEBGL, vec2); 531 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 532 gvec4 textureProj(gsampler2D, vec3); 533 gvec4 textureProj(gsampler2D, vec4); 534 gvec4 textureProj(gsampler3D, vec4); 535 float textureProj(sampler2DShadow, vec4); 536 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 537 gvec4 textureProj(gsampler1D, vec2); 538 gvec4 textureProj(gsampler1D, vec4); 539 float textureProj(sampler1DShadow, vec4); 540 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 541 gvec4 textureProj(gsampler2DRect, vec3); 542 gvec4 textureProj(gsampler2DRect, vec4); 543 float textureProj(sampler2DRectShadow, vec4); 544 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_EGL_image_external_essl3"} 545 vec4 textureProj(samplerExternalOES, vec3); 546 vec4 textureProj(samplerExternalOES, vec4); 547 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_YUV_target"} 548 vec4 textureProj(samplerExternal2DY2YEXT, vec3); 549 vec4 textureProj(samplerExternal2DY2YEXT, vec4); 550 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "ARB_texture_rectangle"} 551 vec4 textureProj(sampler2DRect, vec3); 552 vec4 textureProj(sampler2DRect, vec4); 553 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 554 gvec4 textureLod(gsampler2D, vec2, float); 555 gvec4 textureLod(gsampler3D, vec3, float); 556 gvec4 textureLod(gsamplerCube, vec3, float); 557 gvec4 textureLod(gsampler2DArray, vec3, float); 558 float textureLod(sampler2DShadow, vec3, float); 559 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 560 gvec4 textureLod(gsampler1D, float, float); 561 float textureLod(sampler1DShadow, vec3, float); 562 gvec4 textureLod(gsampler1DArray, vec2, float); 563 float textureLod(sampler1DArrayShadow, vec3, float); 564 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 565 gvec4 textureLod(gsamplerCubeArray, vec4, float); 566 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 567 gvec4 textureLod(gsamplerCubeArray, vec4, float); 568 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 569 ivec2 textureSize(gsampler2D, int); 570 ivec3 textureSize(gsampler3D, int); 571 ivec2 textureSize(gsamplerCube, int); 572 ivec3 textureSize(gsampler2DArray, int); 573 ivec2 textureSize(sampler2DShadow, int); 574 ivec2 textureSize(samplerCubeShadow, int); 575 ivec3 textureSize(sampler2DArrayShadow, int); 576 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 577 int textureSize(gsampler1D, int); 578 int textureSize(sampler1DShadow, int); 579 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 580 ivec3 textureSize(gsamplerCubeArray, int); 581 ivec3 textureSize(samplerCubeArrayShadow, int); 582 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 583 ivec3 textureSize(gsamplerCubeArray, int); 584 ivec3 textureSize(samplerCubeArrayShadow, int); 585 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 586 ivec2 textureSize(gsampler2DRect); 587 ivec2 textureSize(sampler2DRectShadow); 588 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 589 ivec2 textureSize(gsampler1DArray, int); 590 ivec2 textureSize(sampler1DArrayShadow, int); 591 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 592 int textureSize(gsamplerBuffer); 593 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_buffer, EXT_texture_buffer", "suffix": "Ext"} 594 int textureSize(gsamplerBuffer); 595 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL1_5_BUILTINS", "hasSideEffects": "true"} 596 ivec2 textureSize(gsampler2DMS); 597 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "ANGLE_texture_multisample", "suffix": "Ext"} 598 ivec2 textureSize(gsampler2DMS); 599 DEFAULT METADATA {"glsl_level": "GLSL1_5_BUILTINS", "hasSideEffects": "true"} 600 ivec3 textureSize(gsampler2DMSArray); 601 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_storage_multisample_2d_array", "suffix": "Ext"} 602 ivec3 textureSize(gsampler2DMSArray); 603 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_EGL_image_external_essl3"} 604 ivec2 textureSize(samplerExternalOES, int); 605 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_YUV_target"} 606 ivec2 textureSize(samplerExternal2DY2YEXT, int); 607 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 608 gvec4 textureProjLod(gsampler2D, vec3, float); 609 gvec4 textureProjLod(gsampler2D, vec4, float); 610 gvec4 textureProjLod(gsampler3D, vec4, float); 611 float textureProjLod(sampler2DShadow, vec4, float); 612 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 613 gvec4 textureProjLod(gsampler1D, vec2, float); 614 gvec4 textureProjLod(gsampler1D, vec4, float); 615 float textureProjLod(sampler1DShadow, vec4, float); 616 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 617 gvec4 texelFetch(gsampler2D, ivec2, int); 618 gvec4 texelFetch(gsampler3D, ivec3, int); 619 gvec4 texelFetch(gsampler2DArray, ivec3, int); 620 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 621 gvec4 texelFetch(gsampler1D, int, int); 622 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 623 gvec4 texelFetch(gsampler2DRect, ivec2); 624 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 625 gvec4 texelFetch(gsampler1DArray, ivec2, int); 626 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 627 gvec4 texelFetch(gsamplerBuffer, int); 628 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_buffer, EXT_texture_buffer", "suffix": "Ext"} 629 gvec4 texelFetch(gsamplerBuffer, int); 630 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL1_5_BUILTINS", "hasSideEffects": "true"} 631 gvec4 texelFetch(gsampler2DMS, ivec2, int); 632 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "ANGLE_texture_multisample", "suffix": "Ext"} 633 gvec4 texelFetch(gsampler2DMS, ivec2, int); 634 DEFAULT METADATA {"glsl_level": "GLSL1_5_BUILTINS", "hasSideEffects": "true"} 635 gvec4 texelFetch(gsampler2DMSArray, ivec3, int); 636 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_storage_multisample_2d_array", "suffix": "Ext"} 637 gvec4 texelFetch(gsampler2DMSArray, ivec3, int); 638 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_EGL_image_external_essl3"} 639 vec4 texelFetch(samplerExternalOES, ivec2, int); 640 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_YUV_target"} 641 vec4 texelFetch(samplerExternal2DY2YEXT, ivec2, int); 642 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 643 gvec4 textureGrad(gsampler2D, vec2, vec2, vec2); 644 gvec4 textureGrad(gsampler3D, vec3, vec3, vec3); 645 gvec4 textureGrad(gsamplerCube, vec3, vec3, vec3); 646 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 647 gvec4 textureGrad(gsampler2D, float, float, float); 648 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 649 gvec4 textureGrad(gsampler2DRect, vec2, vec2, vec2); 650 gvec4 textureGrad(sampler2DRectShadow, vec3, vec2, vec2); 651 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 652 float textureGrad(sampler2DShadow, vec3, vec2, vec2); 653 float textureGrad(samplerCubeShadow, vec4, vec3, vec3); 654 gvec4 textureGrad(gsampler2DArray, vec3, vec2, vec2); 655 float textureGrad(sampler2DArrayShadow, vec4, vec2, vec2); 656 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 657 float textureGrad(sampler1DShadow, vec3, float, float); 658 gvec4 textureGrad(gsampler1DArray, vec2, float, float); 659 float textureGrad(sampler1DArrayShadow, vec3, float, float); 660 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 661 gvec4 textureGrad(gsamplerCubeArray, vec4, vec3, vec3); 662 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 663 gvec4 textureGrad(gsamplerCubeArray, vec4, vec3, vec3); 664 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 665 gvec4 textureProjGrad(gsampler2D, vec3, vec2, vec2); 666 gvec4 textureProjGrad(gsampler2D, vec4, vec2, vec2); 667 gvec4 textureProjGrad(gsampler3D, vec4, vec3, vec3); 668 float textureProjGrad(sampler2DShadow, vec4, vec2, vec2); 669 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 670 gvec4 textureProjGrad(gsampler1D, vec2, float, float); 671 gvec4 textureProjGrad(gsampler1D, vec4, float, float); 672 float textureProjGrad(sampler1DShadow, vec4, float, float); 673 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 674 gvec4 textureProjGrad(gsampler2DRect, vec3, vec2, vec2); 675 gvec4 textureProjGrad(gsampler2DRect, vec4, vec2, vec2); 676 float textureProjGrad(sampler2DRectShadow, vec4, vec2, vec2); 677 DEFAULT METADATA {"glsl_level": "GLSL4_3_BUILTINS", "hasSideEffects": "true"} 678 int textureQueryLevels(gsampler1D); 679 int textureQueryLevels(gsampler2D); 680 int textureQueryLevels(gsampler3D); 681 int textureQueryLevels(gsamplerCube); 682 int textureQueryLevels(gsampler1DArray); 683 int textureQueryLevels(gsampler2DArray); 684 int textureQueryLevels(gsamplerCubeArray); 685 int textureQueryLevels(sampler1DShadow); 686 int textureQueryLevels(sampler2DShadow); 687 int textureQueryLevels(samplerCubeShadow); 688 int textureQueryLevels(sampler1DArrayShadow); 689 int textureQueryLevels(sampler2DArrayShadow); 690 int textureQueryLevels(samplerCubeArrayShadow); 691 DEFAULT METADATA {"glsl_level": "GLSL4_5_BUILTINS", "hasSideEffects": "true"} 692 int textureSamples(gsampler2DMS); 693 int textureSamples(gsampler2DMSArray); 694 GROUP END NoBias 695 696 GROUP BEGIN Bias {"shader_type": "FRAGMENT", "opSuffix": "Bias"} 697 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 698 gvec4 texture(gsampler2D, vec2, float); 699 gvec4 texture(gsampler3D, vec3, float); 700 gvec4 texture(gsamplerCube, vec3, float); 701 gvec4 texture(gsampler2DArray, vec3, float); 702 gvec4 textureProj(gsampler2D, vec3, float); 703 gvec4 textureProj(gsampler2D, vec4, float); 704 gvec4 textureProj(gsampler3D, vec4, float); 705 float texture(sampler2DShadow, vec3, float); 706 float texture(samplerCubeShadow, vec4, float); 707 float textureProj(sampler2DShadow, vec4, float); 708 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 709 gvec4 texture(gsampler1D, float, float); 710 float texture(sampler1DShadow, vec3, float); 711 gvec4 texture(gsampler1DArray, vec3, float); 712 float texture(sampler1DArrayShadow, vec3, float); 713 float texture(sampler2DArrayShadow, vec4, float); 714 gvec4 textureProj(gsampler1D, vec2, float); 715 gvec4 textureProj(gsampler1D, vec4, float); 716 float textureProj(sampler1DShadow, vec4, float); 717 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 718 gvec4 texture(gsamplerCubeArray, vec4, float); 719 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 720 gvec4 texture(gsamplerCubeArray, vec4, float); 721 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_EGL_image_external_essl3"} 722 vec4 texture(samplerExternalOES, vec2, float); 723 vec4 textureProj(samplerExternalOES, vec3, float); 724 vec4 textureProj(samplerExternalOES, vec4, float); 725 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_YUV_target"} 726 vec4 texture(samplerExternal2DY2YEXT, vec2, float); 727 vec4 textureProj(samplerExternal2DY2YEXT, vec3, float); 728 vec4 textureProj(samplerExternal2DY2YEXT, vec4, float); 729 GROUP END Bias 730 731 GROUP BEGIN QueryLod {"shader_type": "FRAGMENT"} 732 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 733 vec2 textureQueryLod(gsampler1D, float); 734 vec2 textureQueryLod(gsampler2D, vec2); 735 vec2 textureQueryLod(gsampler3D, vec3); 736 vec2 textureQueryLod(gsamplerCube, vec3); 737 vec2 textureQueryLod(gsampler1DArray, float); 738 vec2 textureQueryLod(gsampler2DArray, vec2); 739 vec2 textureQueryLod(gsamplerCubeArray, vec3); 740 vec2 textureQueryLod(sampler1DShadow, float); 741 vec2 textureQueryLod(sampler2DShadow, vec2); 742 vec2 textureQueryLod(samplerCubeShadow, vec3); 743 vec2 textureQueryLod(sampler1DArrayShadow, float); 744 vec2 textureQueryLod(sampler2DArrayShadow, vec2); 745 vec2 textureQueryLod(samplerCubeArrayShadow, vec3); 746 GROUP END QueryLod 747 748 GROUP BEGIN OffsetNoBias {"queryFunction": true} 749 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 750 gvec4 textureOffset(gsampler2D, vec2, ivec2); 751 gvec4 textureOffset(gsampler3D, vec3, ivec3); 752 float textureOffset(sampler2DShadow, vec3, ivec2); 753 gvec4 textureOffset(gsampler2DArray, vec3, ivec2); 754 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 755 gvec4 textureOffset(gsampler1D, float, int); 756 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 757 gvec4 textureOffset(gsampler2DRect, vec2, ivec2); 758 float textureOffset(sampler2DRectShadow, vec3, ivec2); 759 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 760 float textureOffset(sampler1DShadow, vec3, int); 761 gvec4 textureOffset(gsampler1DArray, vec2, int); 762 float textureOffset(sampler1DArrayShadow, vec3, int); 763 DEFAULT METADATA {"glsl_level": "GLSL4_3_BUILTINS", "hasSideEffects": "true"} 764 float textureOffset(sampler2DArrayShadow, vec4, ivec2); 765 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 766 gvec4 textureProjOffset(gsampler2D, vec3, ivec2); 767 gvec4 textureProjOffset(gsampler2D, vec4, ivec2); 768 gvec4 textureProjOffset(gsampler3D, vec4, ivec3); 769 float textureProjOffset(sampler2DShadow, vec4, ivec2); 770 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 771 gvec4 textureProjOffset(gsampler1D, vec2, int); 772 gvec4 textureProjOffset(gsampler1D, vec4, int); 773 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 774 gvec4 textureProjOffset(gsampler2DRect, vec3, ivec2); 775 gvec4 textureProjOffset(gsampler2DRect, vec4, ivec2); 776 float textureProjOffset(sampler2DRectShadow, vec4, ivec2); 777 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 778 float textureProjOffset(sampler1DShadow, vec4, int); 779 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 780 gvec4 textureLodOffset(gsampler2D, vec2, float, ivec2); 781 gvec4 textureLodOffset(gsampler3D, vec3, float, ivec3); 782 float textureLodOffset(sampler2DShadow, vec3, float, ivec2); 783 gvec4 textureLodOffset(gsampler2DArray, vec3, float, ivec2); 784 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 785 gvec4 textureLodOffset(gsampler1D, float, float, int); 786 float textureLodOffset(sampler1DShadow, vec3, float, int); 787 gvec4 textureLodOffset(gsampler1DArray, vec2, float, int); 788 float textureLodOffset(sampler1DArrayShadow, vec3, float, int); 789 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 790 gvec4 textureProjLodOffset(gsampler2D, vec3, float, ivec2); 791 gvec4 textureProjLodOffset(gsampler2D, vec4, float, ivec2); 792 gvec4 textureProjLodOffset(gsampler3D, vec4, float, ivec3); 793 float textureProjLodOffset(sampler2DShadow, vec4, float, ivec2); 794 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 795 gvec4 textureProjLodOffset(gsampler1D, vec2, float, int); 796 gvec4 textureProjLodOffset(gsampler1D, vec4, float, int); 797 float textureProjLodOffset(sampler1DShadow, vec4, float, int); 798 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 799 gvec4 texelFetchOffset(gsampler2D, ivec2, int, ivec2); 800 gvec4 texelFetchOffset(gsampler3D, ivec3, int, ivec3); 801 gvec4 texelFetchOffset(gsampler2DArray, ivec3, int, ivec2); 802 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 803 gvec4 texelFetchOffset(gsampler1D, int, int, int); 804 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 805 gvec4 texelFetchOffset(gsampler2DRect, ivec2, ivec2); 806 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 807 gvec4 texelFetchOffset(gsampler1DArray, ivec2, int, int); 808 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 809 gvec4 textureGradOffset(gsampler2D, vec2, vec2, vec2, ivec2); 810 gvec4 textureGradOffset(gsampler3D, vec3, vec3, vec3, ivec3); 811 float textureGradOffset(sampler2DShadow, vec3, vec2, vec2, ivec2); 812 gvec4 textureGradOffset(gsampler2DArray, vec3, vec2, vec2, ivec2); 813 float textureGradOffset(sampler2DArrayShadow, vec4, vec2, vec2, ivec2); 814 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 815 gvec4 textureGradOffset(gsampler1D, float, float, float, int); 816 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 817 gvec4 textureGradOffset(gsampler2DRect, vec2, vec2, vec2, ivec2); 818 float textureGradOffset(sampler2DRectShadow, vec3, vec2, vec2, ivec2); 819 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 820 float textureGradOffset(sampler1DShadow, vec3, float, float, int); 821 gvec4 textureGradOffset(gsampler1DArray, vec2, float, float, int); 822 float textureGradOffset(sampler1DArrayShadow, vec3, float, float, int); 823 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 824 gvec4 textureProjGradOffset(gsampler2D, vec3, vec2, vec2, ivec2); 825 gvec4 textureProjGradOffset(gsampler2D, vec4, vec2, vec2, ivec2); 826 gvec4 textureProjGradOffset(gsampler3D, vec4, vec3, vec3, ivec3); 827 float textureProjGradOffset(sampler2DShadow, vec4, vec2, vec2, ivec2); 828 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 829 gvec4 textureProjGradOffset(gsampler1D, vec2, float, float, int); 830 gvec4 textureProjGradOffset(gsampler1D, vec4, float, float, int); 831 DEFAULT METADATA {"glsl_level": "GLSL1_4_BUILTINS", "hasSideEffects": "true"} 832 gvec4 textureProjGradOffset(gsampler2DRect, vec3, vec2, vec2, ivec2); 833 gvec4 textureProjGradOffset(gsampler2DRect, vec4, vec2, vec2, ivec2); 834 float textureProjGradOffset(sampler2DRectShadow, vec4, vec2, vec2, ivec2); 835 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 836 float textureProjGradOffset(sampler1DShadow, vec4, float, float, int); 837 GROUP END OffsetNoBias 838 839 GROUP BEGIN OffsetBias {"queryFunction": true, "shader_type": "FRAGMENT", "opSuffix": "Bias"} 840 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 841 gvec4 textureOffset(gsampler2D, vec2, ivec2, float); 842 gvec4 textureOffset(gsampler3D, vec3, ivec3, float); 843 float textureOffset(sampler2DShadow, vec3, ivec2, float); 844 gvec4 textureOffset(gsampler2DArray, vec3, ivec2, float); 845 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 846 gvec4 textureOffset(gsampler1D, float, int, float); 847 float textureOffset(sampler1DShadow, vec3, int, float); 848 gvec4 textureOffset(gsampler1DArray, vec2, int, float); 849 float textureOffset(sampler1DArrayShadow, vec3, int, float); 850 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 851 gvec4 textureProjOffset(gsampler2D, vec3, ivec2, float); 852 gvec4 textureProjOffset(gsampler2D, vec4, ivec2, float); 853 gvec4 textureProjOffset(gsampler3D, vec4, ivec3, float); 854 float textureProjOffset(sampler2DShadow, vec4, ivec2, float); 855 DEFAULT METADATA {"glsl_level": "GLSL1_3_BUILTINS", "hasSideEffects": "true"} 856 gvec4 textureProjOffset(gsampler1D, vec2, int, float); 857 gvec4 textureProjOffset(gsampler1D, vec4, int, float); 858 float textureProjOffset(sampler1DShadow, vec4, int, float); 859 GROUP END OffsetBias 860 861 GROUP BEGIN Gather {"queryFunction": true} 862 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 863 gvec4 textureGather(gsampler2D, vec2); 864 gvec4 textureGather(gsampler2D, vec2, int); 865 gvec4 textureGather(gsampler2DArray, vec3); 866 gvec4 textureGather(gsampler2DArray, vec3, int); 867 gvec4 textureGather(gsamplerCube, vec3); 868 gvec4 textureGather(gsamplerCube, vec3, int); 869 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 870 gvec4 textureGather(gsamplerCubeArray, vec4); 871 gvec4 textureGather(gsamplerCubeArray, vec4, int); 872 vec4 textureGather(samplerCubeArrayShadow, vec4, float); 873 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 874 gvec4 textureGather(gsamplerCubeArray, vec4); 875 gvec4 textureGather(gsamplerCubeArray, vec4, int); 876 vec4 textureGather(samplerCubeArrayShadow, vec4, float); 877 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 878 gvec4 textureGather(gsampler2DRect, vec3); 879 gvec4 textureGather(gsampler2DRect, vec3, int); 880 vec4 textureGather(sampler2DRectShadow, vec2, float); 881 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true"} 882 vec4 textureGather(sampler2DShadow, vec2); 883 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 884 vec4 textureGather(sampler2DShadow, vec2, float); 885 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true"} 886 vec4 textureGather(sampler2DArrayShadow, vec3); 887 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 888 vec4 textureGather(sampler2DArrayShadow, vec3, float); 889 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true"} 890 vec4 textureGather(samplerCubeShadow, vec3); 891 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 892 vec4 textureGather(samplerCubeShadow, vec3, float); 893 894 GROUP BEGIN Offset {"queryFunction": true} 895 GROUP BEGIN NoComp {"queryFunction": true} 896 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 897 gvec4 textureGatherOffset(gsampler2D, vec2, ivec2); 898 gvec4 textureGatherOffset(gsampler2DArray, vec3, ivec2); 899 vec4 textureGatherOffset(sampler2DShadow, vec2, float, ivec2); 900 vec4 textureGatherOffset(sampler2DArrayShadow, vec3, float, ivec2); 901 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 902 gvec4 textureGatherOffset(gsampler2DRect, vec2, ivec2); 903 vec4 textureGatherOffset(sampler2DRectShadow, vec2, float, ivec2); 904 GROUP END NoComp 905 GROUP BEGIN Comp {"queryFunction": true, "opSuffix": "Comp"} 906 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 907 gvec4 textureGatherOffset(gsampler2D, vec2, ivec2, int); 908 gvec4 textureGatherOffset(gsampler2DArray, vec3, ivec2, int); 909 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 910 gvec4 textureGatherOffset(gsampler2DRect, vec2, ivec2, int); 911 GROUP END Comp 912 GROUP END Offset 913 GROUP BEGIN Offsets {"queryFunction": true} 914 GROUP BEGIN NoComp {"queryFunction": true} 915 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 916 gvec4 textureGatherOffsets(gsampler2D, vec2, ivec2[4]); 917 gvec4 textureGatherOffsets(gsampler2DArray, vec3, ivec2[4]); 918 vec4 textureGatherOffsets(sampler2DShadow, vec2, float, ivec2[4]); 919 vec4 textureGatherOffsets(sampler2DArrayShadow, vec3, float, ivec2[4]); 920 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_gpu_shader5", "suffix": "Ext"} 921 gvec4 textureGatherOffsets(gsampler2D, vec2, ivec2[4]); 922 gvec4 textureGatherOffsets(gsampler2DArray, vec3, ivec2[4]); 923 vec4 textureGatherOffsets(sampler2DShadow, vec2, float, ivec2[4]); 924 vec4 textureGatherOffsets(sampler2DArrayShadow, vec3, float, ivec2[4]); 925 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 926 gvec4 textureGatherOffsets(gsampler2DRect, vec2, ivec2[4]); 927 vec4 textureGatherOffsets(sampler2DRectShadow, vec2, float, ivec2[4]); 928 GROUP END NoComp 929 GROUP BEGIN Comp {"queryFunction": true, "opSuffix": "Comp"} 930 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 931 gvec4 textureGatherOffsets(gsampler2D, vec2, ivec2[4], int); 932 gvec4 textureGatherOffsets(gsampler2DArray, vec3, ivec2[4], int); 933 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_gpu_shader5", "suffix": "Ext"} 934 gvec4 textureGatherOffsets(gsampler2D, vec2, ivec2[4], int); 935 gvec4 textureGatherOffsets(gsampler2DArray, vec3, ivec2[4], int); 936 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 937 gvec4 textureGatherOffsets(gsampler2DRect, vec2, ivec2[4], int); 938 GROUP END Comp 939 GROUP END Offsets 940 GROUP END Gather 941GROUP END Texture 942 943GROUP BEGIN EXT_YUV_target 944 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "EXT_YUV_target"} 945 vec3 rgb_2_yuv(vec3, yuvCscStandardEXT); 946 vec3 yuv_2_rgb(vec3, yuvCscStandardEXT); 947GROUP END EXT_YUV_target 948 949GROUP BEGIN DerivativesFS {"shader_type": "FRAGMENT"} 950 DEFAULT METADATA {"essl_level": "ESSL1_BUILTINS", "essl_extension": "OES_standard_derivatives", "hasSideEffects": "true", "suffix": "Ext"} 951 genType dFdx(genType); 952 genType dFdy(genType); 953 genType fwidth(genType); 954 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 955 genType dFdx(genType); 956 genType dFdy(genType); 957 genType fwidth(genType); 958 DEFAULT METADATA {"glsl_level": "GLSL4_5_BUILTINS", "hasSideEffects": "true"} 959 genType dFdxFine(genType); 960 genType dFdyFine(genType); 961 genType dFdxCoarse(genType); 962 genType dFdyCoarse(genType); 963 genType fwidthFine(genType); 964 genType fwidthCoarse(genType); 965GROUP END DerivativesFS 966 967GROUP BEGIN InterpolationFS {"queryFunction": true, "shader_type": "FRAGMENT"} 968 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS","glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 969 float interpolateAtCentroid(float); 970 vec2 interpolateAtCentroid(vec2); 971 vec3 interpolateAtCentroid(vec3); 972 vec4 interpolateAtCentroid(vec4); 973 float interpolateAtSample(float, int); 974 vec2 interpolateAtSample(vec2, int); 975 vec3 interpolateAtSample(vec3, int); 976 vec4 interpolateAtSample(vec4, int); 977 float interpolateAtOffset(float, vec2); 978 vec2 interpolateAtOffset(vec2, vec2); 979 vec3 interpolateAtOffset(vec3, vec2); 980 vec4 interpolateAtOffset(vec4, vec2); 981 DEFAULT METADATA {"essl_level": "ESSL3_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_shader_multisample_interpolation", "suffix": "Ext"} 982 float interpolateAtCentroid(float); 983 vec2 interpolateAtCentroid(vec2); 984 vec3 interpolateAtCentroid(vec3); 985 vec4 interpolateAtCentroid(vec4); 986 float interpolateAtSample(float, int); 987 vec2 interpolateAtSample(vec2, int); 988 vec3 interpolateAtSample(vec3, int); 989 vec4 interpolateAtSample(vec4, int); 990 float interpolateAtOffset(float, vec2); 991 vec2 interpolateAtOffset(vec2, vec2); 992 vec3 interpolateAtOffset(vec3, vec2); 993 vec4 interpolateAtOffset(vec4, vec2); 994GROUP END InterpolationFS 995 996GROUP BEGIN AtomicCounter 997 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_2_BUILTINS", "hasSideEffects": "true"} 998 uint atomicCounter(atomic_uint); 999 uint atomicCounterIncrement(atomic_uint); 1000 uint atomicCounterDecrement(atomic_uint); 1001 DEFAULT METADATA {"glsl_level": "GLSL4_6_BUILTINS", "hasSideEffects": "true"} 1002 uint atomicCounterAdd(atomic_uint, uint); 1003 uint atomicCounterSubtract(atomic_uint, uint); 1004 uint atomicCounterMin(atomic_uint, uint); 1005 uint atomicCounterMax(atomic_uint, uint); 1006 uint atomicCounterAnd(atomic_uint, uint); 1007 uint atomicCounterOr(atomic_uint, uint); 1008 uint atomicCounterXor(atomic_uint, uint); 1009 uint atomicCounterExchange(atomic_uint, uint); 1010 uint atomicCounterCompSwap(atomic_uint, uint, uint); 1011GROUP END AtomicCounter 1012 1013GROUP BEGIN AtomicMemory {"queryFunction": true} 1014 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_3_BUILTINS"} 1015 uint atomicAdd(inout uint, uint); 1016 int atomicAdd(inout int, int); 1017 uint atomicMin(inout uint, uint); 1018 int atomicMin(inout int, int); 1019 uint atomicMax(inout uint, uint); 1020 int atomicMax(inout int, int); 1021 uint atomicAnd(inout uint, uint); 1022 int atomicAnd(inout int, int); 1023 uint atomicOr(inout uint, uint); 1024 int atomicOr(inout int, int); 1025 uint atomicXor(inout uint, uint); 1026 int atomicXor(inout int, int); 1027 uint atomicExchange(inout uint, uint); 1028 int atomicExchange(inout int, int); 1029 uint atomicCompSwap(inout uint, uint, uint); 1030 int atomicCompSwap(inout int, int, int); 1031GROUP END AtomicMemory 1032 1033GROUP BEGIN Image {"queryFunction": true} 1034 GROUP BEGIN Store {"queryFunction": true} 1035 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true"} 1036 void imageStore(gimage2D, ivec2, gvec4); 1037 void imageStore(gimage3D, ivec3, gvec4); 1038 void imageStore(gimage2DArray, ivec3, gvec4); 1039 void imageStore(gimageCube, ivec3, gvec4); 1040 1041 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "hasSideEffects": "true"} 1042 void imageStore(gimageCubeArray, ivec3, gvec4); 1043 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 1044 void imageStore(gimageCubeArray, ivec3, gvec4); 1045 1046 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "hasSideEffects": "true"} 1047 void imageStore(gimageBuffer, int, gvec4); 1048 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_buffer, EXT_texture_buffer", "suffix": "Ext"} 1049 void imageStore(gimageBuffer, int, gvec4); 1050 1051 DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "hasSideEffects": "true"} 1052 void imageStore(writeonly IMAGE_PARAMS, gvec4); 1053 GROUP END Store 1054 GROUP BEGIN Load {"queryFunction": true} 1055 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true"} 1056 gvec4 imageLoad(gimage2D, ivec2); 1057 gvec4 imageLoad(gimage3D, ivec3); 1058 gvec4 imageLoad(gimage2DArray, ivec3); 1059 gvec4 imageLoad(gimageCube, ivec3); 1060 1061 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "hasSideEffects": "true"} 1062 gvec4 imageLoad(gimageCubeArray, ivec3); 1063 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 1064 gvec4 imageLoad(gimageCubeArray, ivec3); 1065 1066 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "hasSideEffects": "true"} 1067 gvec4 imageLoad(gimageBuffer, int); 1068 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_buffer, EXT_texture_buffer", "suffix": "Ext"} 1069 gvec4 imageLoad(gimageBuffer, int); 1070 1071 DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "hasSideEffects": "true"} 1072 gvec4 imageLoad(readonly IMAGE_PARAMS); 1073 GROUP END Load 1074 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true"} 1075 ivec2 imageSize(gimage2D); 1076 ivec3 imageSize(gimage3D); 1077 ivec3 imageSize(gimage2DArray); 1078 ivec2 imageSize(gimageCube); 1079 1080 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "hasSideEffects": "true"} 1081 ivec3 imageSize(gimageCubeArray); 1082 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_cube_map_array, EXT_texture_cube_map_array", "suffix": "Ext"} 1083 ivec3 imageSize(gimageCubeArray); 1084 1085 DEFAULT METADATA {"essl_level": "ESSL3_2_BUILTINS", "hasSideEffects": "true"} 1086 int imageSize(gimageBuffer); 1087 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_texture_buffer, EXT_texture_buffer", "suffix": "Ext"} 1088 int imageSize(gimageBuffer); 1089 1090 DEFAULT METADATA {"glsl_level": "GLSL4_3_BUILTINS", "hasSideEffects": "true"} 1091 int imageSize(readonly writeonly gimage1D); 1092 ivec2 imageSize(readonly writeonly gimage2D); 1093 ivec3 imageSize(readonly writeonly gimage3D); 1094 ivec2 imageSize(readonly writeonly gimageCube); 1095 ivec3 imageSize(readonly writeonly gimageCubeArray); 1096 ivec2 imageSize(readonly writeonly gimageRect); 1097 ivec2 imageSize(readonly writeonly gimage1DArray); 1098 ivec3 imageSize(readonly writeonly gimage2DArray); 1099 int imageSize(readonly writeonly gimageBuffer); 1100 ivec2 imageSize(readonly writeonly gimage2DMS); 1101 ivec3 imageSize(readonly writeonly gimage2DMSArray); 1102 DEFAULT METADATA {"glsl_level": "GLSL4_5_BUILTINS", "hasSideEffects": "true"} 1103 int imageSamples(readonly writeonly gimage2DMS); 1104 int imageSamples(readonly writeonly gimage2DMSArray); 1105 1106 GROUP BEGIN Atomic {"queryFunction": true} 1107 DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "hasSideEffects": "true"} 1108 uint imageAtomicAdd(IMAGE_PARAMS, uint); 1109 int imageAtomicAdd(IMAGE_PARAMS, int); 1110 uint imageAtomicMin(IMAGE_PARAMS, uint); 1111 int imageAtomicMin(IMAGE_PARAMS, int); 1112 uint imageAtomicMax(IMAGE_PARAMS, uint); 1113 int imageAtomicMax(IMAGE_PARAMS, int); 1114 uint imageAtomicAnd(IMAGE_PARAMS, uint); 1115 int imageAtomicAnd(IMAGE_PARAMS, int); 1116 uint imageAtomicOr(IMAGE_PARAMS, uint); 1117 int imageAtomicOr(IMAGE_PARAMS, int); 1118 uint imageAtomicXor(IMAGE_PARAMS, uint); 1119 int imageAtomicXor(IMAGE_PARAMS, int); 1120 uint imageAtomicExchange(IMAGE_PARAMS, uint); 1121 int imageAtomicExchange(IMAGE_PARAMS, int); 1122 DEFAULT METADATA {"glsl_level": "GLSL4_5_BUILTINS", "hasSideEffects": "true"} 1123 int imageAtomicExchange(IMAGE_PARAMS, float); 1124 DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "hasSideEffects": "true"} 1125 uint imageAtomicCompSwap(IMAGE_PARAMS, uint, uint); 1126 int imageAtomicCompSwap(IMAGE_PARAMS, int, int); 1127 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "hasSideEffects": "true", "essl_extension": "OES_shader_image_atomic", "suffix": "Ext"} 1128 uint imageAtomicAdd(readonly writeonly IMAGE_PARAMS, uint); 1129 int imageAtomicAdd(readonly writeonly IMAGE_PARAMS, int); 1130 uint imageAtomicMin(readonly writeonly IMAGE_PARAMS, uint); 1131 int imageAtomicMin(readonly writeonly IMAGE_PARAMS, int); 1132 uint imageAtomicMax(readonly writeonly IMAGE_PARAMS, uint); 1133 int imageAtomicMax(readonly writeonly IMAGE_PARAMS, int); 1134 uint imageAtomicAnd(readonly writeonly IMAGE_PARAMS, uint); 1135 int imageAtomicAnd(readonly writeonly IMAGE_PARAMS, int); 1136 uint imageAtomicOr(readonly writeonly IMAGE_PARAMS, uint); 1137 int imageAtomicOr(readonly writeonly IMAGE_PARAMS, int); 1138 uint imageAtomicXor(readonly writeonly IMAGE_PARAMS, uint); 1139 int imageAtomicXor(readonly writeonly IMAGE_PARAMS, int); 1140 uint imageAtomicExchange(readonly writeonly IMAGE_PARAMS, uint); 1141 int imageAtomicExchange(readonly writeonly IMAGE_PARAMS, int); 1142 int imageAtomicExchange(readonly writeonly IMAGE_PARAMS, float); 1143 uint imageAtomicCompSwap(readonly writeonly IMAGE_PARAMS, uint, uint); 1144 int imageAtomicCompSwap(readonly writeonly IMAGE_PARAMS, int, int); 1145 GROUP END Atomic 1146GROUP END Image 1147 1148GROUP BEGIN Noise 1149 DEFAULT METADATA {"glsl_level": "COMMON_BUILTINS", "hasSideEffects": "true"} 1150 float noise1(genType); 1151 vec2 noise2(genType); 1152 vec3 noise3(genType); 1153 vec4 noise4(genType); 1154GROUP END Noise 1155 1156GROUP BEGIN Barrier 1157 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_2_BUILTINS", "hasSideEffects": true} 1158 void memoryBarrier(); 1159 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_3_BUILTINS", "hasSideEffects": true} 1160 void memoryBarrierAtomicCounter(); 1161 void memoryBarrierBuffer(); 1162 void memoryBarrierImage(); 1163GROUP END Barrier 1164 1165GROUP BEGIN ESSL310CS {"shader_type": "COMPUTE"} 1166 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_BUILTINS", "hasSideEffects": true} 1167 void barrier(); 1168 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL4_3_BUILTINS", "hasSideEffects": true} 1169 void memoryBarrierShared(); 1170 void groupMemoryBarrier(); 1171GROUP END ESSL310CS 1172 1173GROUP BEGIN ESSL310TCS {"shader_type": "TESS_CONTROL_EXT"} 1174 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "essl_extension": "EXT_tessellation_shader", "essl_extension_becomes_core_in": "ESSL3_2_BUILTINS", "opSuffix": "TCS", "hasSideEffects": true} 1175 void barrier(); 1176GROUP END ESSL310TCS 1177 1178GROUP BEGIN GS {"shader_type": "GEOMETRY"} 1179 DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "essl_extension": "EXT_geometry_shader, OES_geometry_shader", "essl_extension_becomes_core_in": "ESSL3_2_BUILTINS", "hasSideEffects": true} 1180 void EmitVertex(); 1181 void EndPrimitive(); 1182 DEFAULT METADATA {"glsl_level": "GLSL1_5_BUILTINS", "hasSideEffects": "true"} 1183 void EmitVertex(); 1184 void EndPrimitive(); 1185 DEFAULT METADATA {"glsl_level": "GLSL4_BUILTINS", "hasSideEffects": "true"} 1186 void EmitStreamVertex(int); 1187 void EndStreamPrimitive(int); 1188GROUP END GS 1189 1190GROUP BEGIN SubpassInput 1191 DEFAULT METADATA {"glsl_level": "GLSL4_6_BUILTINS", "hasSideEffects": "true"} 1192 gvec4 subpassLoad(gsubpassInput); 1193 gvec4 subpassLoad(gsubpassInputMS, int); 1194GROUP END SubpassInput 1195 1196GROUP BEGIN ShaderInvocationGroup 1197 DEFAULT METADATA {"glsl_level": "GLSL4_6_BUILTINS", "hasSideEffects": "true"} 1198 bool anyInvocation(bool); 1199 bool allInvocations(bool); 1200 bool allInvocationsEqual(bool); 1201GROUP END ShaderInvocationGroup 1202