1Name 2 3 AMD_gpu_shader_half_float_fetch 4 5Name Strings 6 7 GL_AMD_gpu_shader_half_float_fetch 8 9Contact 10 11 Rex Xu, AMD (rex.xu 'at' amd.com) 12 13Contributors 14 15 Rex Xu, AMD 16 Qun Lin, AMD 17 Daniel Rakos, AMD 18 Graham Sellers, AMD 19 Dominik Witczak, AMD 20 21Status 22 23 Shipping 24 25Version 26 27 Last Modified Date: 9/20/2017 28 Author Revision: 5 29 30Number 31 32 519 33 34Dependencies 35 36 This extension is written against the OpenGL 4.5 (Core Profile) Specification. 37 38 This extension is written against version 4.50 of the OpenGL Shading Language Specification. 39 40 OpenGL 4.0 and GLSL 4.00 are required. 41 42 This extension requires AMD_gpu_shader_half_float. 43 44 This extension interacts with ARB_sparse_texture2. 45 46 This extension interacts with ARB_sparse_texture_clamp. 47 48 This extension interacts with KHR_vulkan_glsl. 49 50 This extension interacts with AMD_texture_gather_bias_lod. 51 52Overview 53 54 This extension was developed based on the AMD_gpu_shader_half_float extension to allow 55 implementations supporting half-precision floating-point both in shader texture functions and 56 in shader image memory functions. 57 58New Procedures and Functions 59 60 None. 61 62New Tokens 63 64 Returned by the <type> parameter of GetActiveUniform and GetProgramResourceiv: 65 66 (New tokens) 67 68 FLOAT16_SAMPLER_1D_AMD 0x91CE 69 FLOAT16_SAMPLER_2D_AMD 0x91CF 70 FLOAT16_SAMPLER_3D_AMD 0x91D0 71 FLOAT16_SAMPLER_CUBE_AMD 0x91D1 72 FLOAT16_SAMPLER_2D_RECT_AMD 0x91D2 73 FLOAT16_SAMPLER_1D_ARRAY_AMD 0x91D3 74 FLOAT16_SAMPLER_2D_ARRAY_AMD 0x91D4 75 FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD 0x91D5 76 FLOAT16_SAMPLER_BUFFER_AMD 0x91D6 77 FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD 0x91D7 78 FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD 0x91D8 79 80 FLOAT16_SAMPLER_1D_SHADOW_AMD 0x91D9 81 FLOAT16_SAMPLER_2D_SHADOW_AMD 0x91DA 82 FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD 0x91DB 83 FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD 0x91DC 84 FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD 0x91DD 85 FLOAT16_SAMPLER_CUBE_SHADOW_AMD 0x91DE 86 FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD 0x91DF 87 88 FLOAT16_IMAGE_1D_AMD 0x91E0 89 FLOAT16_IMAGE_2D_AMD 0x91E1 90 FLOAT16_IMAGE_3D_AMD 0x91E2 91 FLOAT16_IMAGE_2D_RECT_AMD 0x91E3 92 FLOAT16_IMAGE_CUBE_AMD 0x91E4 93 FLOAT16_IMAGE_1D_ARRAY_AMD 0x91E5 94 FLOAT16_IMAGE_2D_ARRAY_AMD 0x91E6 95 FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD 0x91E7 96 FLOAT16_IMAGE_BUFFER_AMD 0x91E8 97 FLOAT16_IMAGE_2D_MULTISAMPLE_AMD 0x91E9 98 FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD 0x91EA 99 100Additions to Chapter 7 of the OpenGL 4.5 (Core Profile) Specification (Program Objects) 101 102 Modify Section 7.3.1, Program Interfaces 103 104 (add to Table 7.3, OpenGL Shading Language type tokens, p. 107) 105 106 +-------------------------------------------+---------------------------+------+------+------+ 107 | Type Name Token | Keyword |Attrib| Xfb |Buffer| 108 +-------------------------------------------+---------------------------+------+------+------+ 109 | FLOAT16_SAMPLER_1D_AMD | f16sampler1D | | | | 110 | FLOAT16_SAMPLER_2D_AMD | f16sampler2D | | | | 111 | FLOAT16_SAMPLER_3D_AMD | f16sampler3D | | | | 112 | FLOAT16_SAMPLER_CUBE_AMD | f16samplerCube | | | | 113 | FLOAT16_SAMPLER_2D_RECT_AMD | f16sampler2DRect | | | | 114 | FLOAT16_SAMPLER_1D_ARRAY_AMD | f16sampler1DArray | | | | 115 | FLOAT16_SAMPLER_2D_ARRAY_AMD | f16sampler2DArray | | | | 116 | FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD | f16sampler1DArray | | | | 117 | FLOAT16_SAMPLER_BUFFER_AMD | f16samplerBuffer | | | | 118 | FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD | f16sampler2DMS | | | | 119 | FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD | f16sampler2DMSArray | | | | 120 | FLOAT16_SAMPLER_1D_SHADOW_AMD | f16sampler1DShadow | | | | 121 | FLOAT16_SAMPLER_2D_SHADOW_AMD | f16sampler2DShadow | | | | 122 | FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD | f16sampler2DRectShadow | | | | 123 | FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD | f16sampler1DArrayShaow | | | | 124 | FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD | f16sampler2DArrayShadow | | | | 125 | FLOAT16_SAMPLER_CUBE_SHADOW_AMD | f16samplerCubeShadow | | | | 126 | FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD | f16samplerCubeArrayShadow | | | | 127 | FLOAT16_IMAGE_1D_AMD | f16image1D | | | | 128 | FLOAT16_IMAGE_2D_AMD | f16image2D | | | | 129 | FLOAT16_IMAGE_3D_AMD | f16image3D | | | | 130 | FLOAT16_IMAGE_2D_RECT_AMD | f16image2DRect | | | | 131 | FLOAT16_IMAGE_CUBE_AMD | f16imageCube | | | | 132 | FLOAT16_IMAGE_1D_ARRAY_AMD | f16image1DArray | | | | 133 | FLOAT16_IMAGE_2D_ARRAY_AMD | f16image2DArray | | | | 134 | FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD | f16imageCubeArray | | | | 135 | FLOAT16_IMAGE_BUFFER_AMD | f16imageBuffer | | | | 136 | FLOAT16_IMAGE_2D_MULTISAMPLE_AMD | f16image2DMS | | | | 137 | FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD | f16image2DMSArray | | | | 138 +-------------------------------------------+---------------------------+------+------+------+ 139 140Modifications to the OpenGL Shading Language Specification, Version 4.50 141 142 Including the following line in a shader can be used to control the language features described 143 in this extension: 144 145 #extension GL_AMD_gpu_shader_half_float_fetch : <behavior> 146 147 where <behavior> is as specified in section 3.3. 148 149 New preprocessor #defines are added to the OpenGL Shading Language: 150 151 #define GL_AMD_gpu_shader_half_float_fetch 1 152 153Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics) 154 155 Modify Section 3.6, Keywords 156 157 (add the following to the list of reserved keywords at p. 18) 158 159 f16sampler1D f16sampler2D f16sampler3D f16sampler2DRect f16samplerCube 160 f16sampler1DArray f16sampler2DArray f16samplerCubeArray 161 f16samplerBuffer f16sampler2DMS f16sampler2DMSArray 162 f16sampler1DShadow f16sampler2DShadow f16sampler1DArrayShadow f16sampler2DArrayShadow 163 f16sampler2DRectShadow f16samplerCubeShadow f16samplerCubeArrayShadow 164 f16image1D f16image2D f16image3D f16image2DRect 165 f16imageCube f16image1DArray f16image2DArray f16imageCubeArray 166 f16imageBuffer f16image2DMS f16image2DMSArray 167 168Additions to Chapter 4 of the OpenGL Shading Language Specification (Variables and Types) 169 170 Modify Section 4.1, Basic Types 171 172 (insert new types, interleaved with the existing types, to the "Type" table cell of the table 173 "Floating-Point Opaque Types", p. 23) 174 175 +---------------------------+-----------------------------------------------------------------+ 176 | Type | Meaning | 177 +---------------------------+-----------------------------------------------------------------+ 178 | f16sampler1D | a handle for accessing a 1D texture (the result is half- | 179 | f16image1D | precision if it is floating-point typed) | 180 | f16sampler2D | a handle for accessing a 2D texture (the result is half- | 181 | f16image2D | precision if it is floating-point typed) | 182 | f16sampler3D | a handle for accessing a 3D texture (the result is half- | 183 | f16image3D | precision if it is floating-point typed) | 184 | f16samplerCube | a handle for accessing a cube mapped texture (the result is | 185 | f16imageCube | half-precision if it is floating-point typed) | 186 | f16sampler2DRect | a handle for accessing a rectangle texture (the result is half- | 187 | f16image2DRect | precision if it is floating-point typed) | 188 | f16sampler1DArray | a handle for accessing a 1D array texture (the result is half- | 189 | f16image1DArray | precision if it is floating-point typed) | 190 | f16sampler2DArray | a handle for accessing a 2D array texture (the result is half- | 191 | f16image2DArray | precision if it is floating-point typed) | 192 | f16samplerBuffer | a handle for accessing a buffer texture (the result is half- | 193 | f16imageBuffer | precision if it is floating-point typed) | 194 | f16sampler2DMS | a handle for accessing a 2D multi-sample texture (the result is | 195 | f16image2DMS | half-precision if it is floating-point typed) | 196 | f16sampler2DMSArray | a handle for accessing a 2D multi-sample array texture (the | 197 | f16image2DMSArray | result is half-precision if it is floating-point typed) | 198 | f16samplerCubeArray | a handle for accessing a cube map array texture (the result is | 199 | f16imageCubeArray | half-precision if it is floating-point typed) | 200 | f16sampler1DShadow | a handle for accessing a 1D depth texture with comparison (the | 201 | | result is half-precision if it is floating-point typed) | 202 | f16sampler2DShadow | a handle for accessing a 2D depth texture with comparison (the | 203 | | result is half-precision if it is floating-point typed) | 204 | f16sampler2DRectShadow | a handle for accessing a rectangle texture with comparison (the | 205 | | result is half-precision if it is floating-point typed) | 206 | f16sampler1DArrayShadow | a handle for accessing a 1D array depth texture with comparison | 207 | | (the result is half-precision if it is floating-point typed) | 208 | f16sampler2DArrayShadow | a handle for accessing a 2D array depth texture with comparison | 209 | | (the result is half-precision if it is floating-point typed) | 210 | f16samplerCubeShadow | a handle for accessing a cube map depth texture with comparison | 211 | | (the result is half-precision if it is floating-point typed) | 212 | f16samplerCubeArrayShadow | a handle for accessing a cube map array depth texture with | 213 | | comparison (the result is half-precision if it is floating-point| 214 | | typed) | 215 +---------------------------+-----------------------------------------------------------------+ 216 217 Modify Section 4.4.6.2 Format Layout Qualifiers 218 219 (modify the third sentence of the first paragraph on p. 83) 220 221 ... any image variable declaration. For image variables with floating-point component types 222 (keywords starting with "image" or "f16image"), signed integer component types (keywords 223 starting with "iimage"), or unsigned integer component types (keywords starting with "uimage"), 224 the format qualifier used must match the float-image-format-qualifier, int-image-format- 225 qualifier, or uint-image-format-qualifier grammar rules, respectively. 226 227Additions to Chapter 8 of the OpenGL Shading Language Specification (Built-in Functions) 228 229 Modify Section 8.9 Texture Functions 230 231 (modify the second paragraph on p. 160) 232 233 Texture data can be stored by the GL as floating point, unsigned normalized integer, unsigned 234 integer or signed integer data. This is determined by the type of the internal format of the 235 texture. Texture lookups on unsigned normalized integer and floating-point data return single- 236 precision or half-precision floating-point values in the range [0, 1]. 237 238 (modify table head on p. 160) 239 240 +------------------+-------------------------------------+----------------+------------------+ 241 | Internal Texture | Single-Precision or Half-Precision | Signed Integer | Unsigned Integer | 242 | Format | Floating Point Sampler Types | Sampler Types | Sampler Types | 243 +------------------+-------------------------------------+----------------+------------------+ 244 245 (modify the third sentence of the fourth paragraph on p. 160) 246 247 ... a uvec4. If a single-precision floating-point sampler type is used, the result of a texture 248 lookup is a vec4. If a half-precision floating-point sampler type is used, the result of a 249 texture lookup is a f16vec4. 250 251 In the prototypes below, the "g" in the return type "gvec4" is used as a placeholder for 252 nothing, "f16", "i", or "u" making a return type of vec4, f16vec4, ivec4, uvec4. In these 253 cases, the sampler argument type also starts with "g", indicating the same substitution done on 254 the return type; it is either a single-precision floating point, half-precision floating point, 255 signed integer, or unsigned integer sampler, matching the basic type of the return type, as 256 described above. 257 258 Modify Section 8.9.1 Texture Query Functions 259 260 (insert new functions, whose prototypes are different from those existing ones, to the "Syntax" 261 table cell of each query function group on p. 162-163) 262 263 +--------------------------------------------------------------+------------------------------+ 264 | Syntax | Description | 265 +--------------------------------------------------------------+------------------------------+ 266 | int textureSize(f16sampler1DShadow sampler, int lod) | Returns the dimensions of | 267 | ivec2 textureSize(f16sampler2DShadow sampler, int lod) | level <lod> (if present) for | 268 | ivec2 textureSize(f16samplerCubeShadow sampler, int lod) | the texture bound to sampler,| 269 | ivec3 textureSize(f16samplerCubeArrayShadow sampler, int lod)| ... | 270 | ivec2 textureSize(f16sampler2DRectShadow sampler) | | 271 | ivec2 textureSize(f16sampler1DArrayShadow sampler, int lod) | | 272 | ivec3 textureSize(f16sampler2DArrayShadow sampler, int lod) | | 273 +--------------------------------------------------------------+------------------------------+ 274 | vec2 textureQueryLod(f16sampler1D sampler, float16_t P) | Returns the mipmap array(s) | 275 | vec2 textureQueryLod(f16sampler2D sampler, f16vec2 P) | that would be accessed in the| 276 | vec2 textureQueryLod(f16sampler3D sampler, f16vec3 P) | x component of the return | 277 | vec2 textureQueryLod(f16samplerCube sampler, f16vec3 P) | value. | 278 | vec2 textureQueryLod(f16sampler1DArray sampler, | ... | 279 | float16_t P) | | 280 | vec2 textureQueryLod(f16sampler2DArray sampler, f16vec2 P) | | 281 | vec2 textureQueryLod(f16samplerCubeArray sampler, | | 282 | f16vec3 P) | | 283 | vec2 textureQueryLod(f16sampler1DShadow sampler, | | 284 | float16_t P) | | 285 | vec2 textureQueryLod(f16sampler2DShadow sampler, | | 286 | f16vec2 P) | | 287 | vec2 textureQueryLod(f16samplerCubeShadow sampler, | | 288 | f16vec3 P) | | 289 | vec2 textureQueryLod(f16sampler1DArrayShadow sampler, | | 290 | float16_t P) | | 291 | vec2 textureQueryLod(f16sampler2DArrayShadow sampler, | | 292 | f16vec2 P) | | 293 | vec2 textureQueryLod(f16samplerCubeArrayShadow sampler, | | 294 | f16vec3 P) | | 295 +--------------------------------------------------------------+------------------------------+ 296 | int textureQueryLevels(f16sampler1DShadow sampler) | Returns the number of mipmap | 297 | int textureQueryLevels(f16sampler2DShadow sampler) | levels accessible in the | 298 | int textureQueryLevels(f16samplerCubeShadow sampler) | texture associated with | 299 | int textureQueryLevels(f16sampler1DArrayShadow sampler) | sampler, ... | 300 | int textureQueryLevels(f16sampler2DArrayShadow sampler) | | 301 | int textureQueryLevels(f16samplerCubeArrayShadow sampler) | | 302 +--------------------------------------------------------------+------------------------------+ 303 304 Modify Section 8.9.2 Texel Lookup Functions 305 306 (insert new functions, whose prototypes are different from those existing ones, to the "Syntax" 307 table cell of each lookup function group, and modify certain descriptions in the "Description" 308 table cells of texture() and textureProj() on p. 164-170) 309 310 +--------------------------------------------------------------+------------------------------+ 311 | Syntax | Description | 312 +--------------------------------------------------------------+------------------------------+ 313 | f16vec4 texture(f16sampler1D sampler, float16_t P | Use the texture coordinate P | 314 | [, float16_t bias]) | to do a texture lookup in the| 315 | f16vec4 texture(f16sampler2D sampler, f16vec2 P | texture currently bound to | 316 | [, float16_t bias]) | <sampler>. | 317 | f16vec4 texture(f16sampler3D sampler, f16vec3 P | | 318 | [, float16_t bias]) | For shadow forms: When | 319 | f16vec4 texture(f16samplerCube sampler, f16vec3 P | <compare> is present, it is | 320 | [, float16_t bias]) | used as <Dref>, and the array| 321 | float16_t texture(f16sampler1DShadow sampler, vec3 P | layer comes from the last | 322 | [, float bias]) | component of <P>. When | 323 | float16_t texture(f16sampler1DShadow sampler, f16vec2 P, | <compare> is not present, the| 324 | float compare [, float16_t bias]) | last component of <P> is used| 325 | float16_t texture(f16sampler2DShadow sampler, vec3 P | as <Dref> and the array layer| 326 | [, float bias]) | comes from the second to last| 327 | float16_t texture(f16sampler2DShadow sampler, f16vec2 P, | component of <P>. | 328 | float compare [, float16_t bias]) | | 329 | float16_t texture(f16samplerCubeShadow sampler, vec4 P | ... | 330 | [, float bias]) | | 331 | float16_t texture(f16samplerCubeShadow sampler, f16vec3 P, | | 332 | float compare [, float16_t bias]) | | 333 | f16vec4 texture(f16sampler1DArray sampler, f16vec2 P | | 334 | [, float16_t bias]) | | 335 | f16vec4 texture(f16sampler2DArray sampler, f16vec3 P | | 336 | [, float16_t bias]) | | 337 | f16vec4 texture(f16samplerCubeArray sampler, f16vec4 P | | 338 | [, float16_t bias]) | | 339 | float16_t texture(f16sampler1DArrayShadow sampler, vec3 P | | 340 | [, float bias]) | | 341 | float16_t texture(f16sampler1DArrayShadow sampler, f16vec2 P,| | 342 | float compare [, float16_t bias]) | | 343 | float16_t texture(f16sampler2DArrayShadow sampler, vec4 P) | | 344 | float16_t texture(f16sampler2DArrayShadow sampler, f16vec3 P,| | 345 | float compare) | | 346 | f16vec4 texture(f16sampler2DRect sampler, f16vec2 P) | | 347 | float16_t texture(f16sampler2DRectShadow sampler, vec3 P) | | 348 | float16_t texture(f16sampler2DRectShadow sampler, f16vec2 P, | | 349 | float compare) | | 350 | float16_t texture(f16samplerCubeArrayShadow sampler, vec4 P, | | 351 | float compare) | | 352 | float16_t texture(f16samplerCubeArrayShadow sampler, | | 353 | f16vec4 P, float compare) | | 354 +--------------------------------------------------------------+------------------------------+ 355 | f16vec4 textureProj(f16sampler1D sampler, f16vec2 P | Do a texture lookup with | 356 | [, float16_t bias]) | projection. The texture | 357 | f16vec4 textureProj(f16sampler1D sampler, f16vec4 P | coordinates consumed from | 358 | [, float16_t bias]) | <P>, not including the last | 359 | f16vec4 textureProj(f16sampler2D sampler, f16vec3 P | component of <P>, and | 360 | [, float16_t bias]) | <compare>, if present in the | 361 | f16vec4 textureProj(f16sampler2D sampler, f16vec4 P | shadow forms, are divided by | 362 | [, float16_t bias]) | the last component of <P>. | 363 | f16vec4 textureProj(f16sampler3D sampler, f16vec4 P | When present in the shadow | 364 | [, float16_t bias]) | forms, the resulting | 365 | float16_t textureProj(f16sampler1DShadow sampler, vec4 P | <compare> is used as Dref. | 366 | [, float bias]) | When <compare> is not | 367 | float16_t textureProj(f16sampler1DShadow sampler, f16vec3 P | present, the resulting 3rd | 368 | float compare [, float16_t bias]) | component of <P> in the | 369 | float16_t textureProj(f16sampler2DShadow sampler, vec4 P | shadow forms is used as | 370 | [, float bias]) | <Dref>. After these values | 371 | float16_t textureProj(f16sampler2DShadow sampler, f16vec3 P | are computed, texture lookup | 372 | float compare [, float16_t bias]) | proceeds as in texture(). | 373 | f16vec4 textureProj(f16sampler2DRect sampler, f16vec3 P) | | 374 | f16vec4 textureProj(f16sampler2DRect sampler, f16vec4 P) | | 375 | float16_t textureProj(f16sampler2DRectShadow sampler, vec4 P)| | 376 | float16_t textureProj(f16sampler2DRectShadow sampler, | | 377 | f16vec3 P, float compare) | | 378 +--------------------------------------------------------------+------------------------------+ 379 | f16vec4 textureLod(f16sampler1D sampler, float16_t P, | Do a texture lookup as in | 380 | float16_t lod) | texture() but with explicit | 381 | f16vec4 textureLod(f16sampler2D sampler, f16vec2 P, | LOD; ... | 382 | float16_t lod) | | 383 | f16vec4 textureLod(f16sampler3D sampler, f16vec3 P, | | 384 | float16_t lod) | | 385 | f16vec4 textureLod(f16samplerCube sampler, f16vec3 P, | | 386 | float16_t lod) | | 387 | float16_t textureLod(f16sampler1DShadow sampler, vec3 P, | | 388 | float lod) | | 389 | float16_t textureLod(f16sampler1DShadow sampler, f16vec2 P, | | 390 | float compare, float16_t lod) | | 391 | float16_t textureLod(f16sampler2DShadow sampler, vec3 P, | | 392 | float lod) | | 393 | float16_t textureLod(f16sampler2DShadow sampler, f16vec2 P, | | 394 | float compare, float16_t lod) | | 395 | f16vec4 textureLod(f16sampler1DArray sampler, f16vec2 P, | | 396 | float16_t lod) | | 397 | f16vec4 textureLod(f16sampler2DArray sampler, f16vec3 P, | | 398 | float16_t lod) | | 399 | float16_t textureLod(f16sampler1DArrayShadow sampler, vec3 P,| | 400 | float lod) | | 401 | float16_t textureLod(f16sampler1DArrayShadow sampler, | | 402 | f16vec2 P, float compare, float16_t lod)| | 403 | f16vec4 textureLod(f16samplerCubeArray sampler, f16vec4 P, | | 404 | float16_t lod) | | 405 +--------------------------------------------------------------+------------------------------+ 406 | f16vec4 textureOffset(f16sampler1D sampler, float16_t P, | Do a texture lookup as in | 407 | int offset [, float16_t bias]) | texture() but with <offset> | 408 | f16vec4 textureOffset(f16sampler2D sampler, f16vec2 P, | added to the (u,v,w) texel | 409 | ivec2 offset [, float16_t bias]) | coordinates before looking up| 410 | f16vec4 textureOffset(f16sampler3D sampler, f16vec3 P, | each texel. ... | 411 | ivec3 offset [, float16_t bias]) | | 412 | f16vec4 textureOffset(f16sampler2DRect sampler, f16vec2 P, | | 413 | ivec2 offset) | | 414 | float16_t textureOffset(f16sampler2DRectShadow sampler, | | 415 | vec3 P, ivec2 offset) | | 416 | float16_t textureOffset(f16sampler2DRectShadow sampler, | | 417 | f16vec2 P, float compare, | | 418 | ivec2 offset) | | 419 | float16_t textureOffset(f16sampler1DShadow sampler, vec3 P, | | 420 | int offset [, float bias]) | | 421 | float16_t textureOffset(f16sampler1DShadow sampler, | | 422 | f16vec2 P, float compare, int offset | | 423 | [, float16_t bias]) | | 424 | float16_t textureOffset(f16sampler2DShadow sampler, vec3 P, | | 425 | ivec2 offset [, float bias]) | | 426 | float16_t textureOffset(f16sampler2DShadow sampler, | | 427 | f16vec2 P, float compare, | | 428 | ivec2 offset [, float16_t bias]) | | 429 | f16vec4 textureOffset(f16sampler1DArray sampler, f16vec2 P,| | 430 | int offset [, float16_t bias]) | | 431 | f16vec4 textureOffset(f16sampler2DArray sampler, f16vec3 P,| | 432 | ivec2 offset [, float16_t bias]) | | 433 | float16_t textureOffset(f16sampler1DArrayShadow sampler, | | 434 | vec3 P, int offset [, float bias]) | | 435 | float16_t textureOffset(f16sampler1DArrayShadow sampler, | | 436 | f16vec2 P, float compare, int offset | | 437 | [, float16_t bias]) | | 438 | float16_t textureOffset(f16sampler2DArrayShadow sampler, | | 439 | vec4 P, ivec2 offset) | | 440 | float16_t textureOffset(f16sampler2DArrayShadow sampler, | | 441 | f16vec3 P, float compare, | | 442 | ivec2 offset) | | 443 +--------------------------------------------------------------+------------------------------+ 444 | f16vec4 textureProjOffset(f16sampler1D sampler, f16vec2 P, | Do a projective texture | 445 | int offset [, float16_t bias]) | lookup as described in | 446 | f16vec4 textureProjOffset(f16sampler1D sampler, f16vec4 P, | textureProj() offset by | 447 | int offset [, float16_t bias]) | <offset> as described in | 448 | f16vec4 textureProjOffset(f16sampler2D sampler, f16vec3 P, | textureOffset(). | 449 | ivec2 offset [, float16_t bias]) | | 450 | f16vec4 textureProjOffset(f16sampler2D sampler, f16vec4 P, | | 451 | ivec2 offset [, float16_t bias]) | | 452 | f16vec4 textureProjOffset(f16sampler3D sampler, f16vec4 P, | | 453 | ivec3 offset [, float16_t bias]) | | 454 | f16vec4 textureProjOffset(f16sampler2DRect sampler, | | 455 | f16vec3 P, ivec2 offset) | | 456 | f16vec4 textureProjOffset(f16sampler2DRect sampler, | | 457 | f16vec4 P, ivec2 offset) | | 458 | float16_t textureProjOffset(f16sampler2DRectShadow sampler, | | 459 | vec4 P, ivec2 offset) | | 460 | float16_t textureProjOffset(f16sampler2DRectShadow sampler, | | 461 | f16vec3 P, float compare, | | 462 | ivec2 offset) | | 463 | float16_t textureProjOffset(f16sampler1DShadow sampler, | | 464 | vec4 P, int offset | | 465 | [, float bias]) | | 466 | float16_t textureProjOffset(f16sampler1DShadow sampler, | | 467 | f16vec3 P, float compare, | | 468 | int offset [, float16_t bias]) | | 469 | float16_t textureProjOffset(f16sampler2DShadow sampler, | | 470 | vec4 P, ivec2 offset | | 471 | [, float bias]) | | 472 | float16_t textureProjOffset(f16sampler2DShadow sampler, | | 473 | f16vec3 P, float compare, | | 474 | ivec2 offset [, float16_t bias]) | | 475 +--------------------------------------------------------------+------------------------------+ 476 | f16vec4 textureLodOffset(f16sampler1D sampler, float16_t P,| Do an offset texture lookup | 477 | float16_t lod, int offset) | with explicit LOD. ... | 478 | f16vec4 textureLodOffset(f16sampler2D sampler, f16vec2 P, | | 479 | float16_t lod, ivec2 offset) | | 480 | f16vec4 textureLodOffset(f16sampler3D sampler, f16vec3 P, | | 481 | float16_t lod, ivec3 offset) | | 482 | float16_t textureLodOffset(f16sampler1DShadow sampler, | | 483 | vec3 P, float lod, int offset) | | 484 | float16_t textureLodOffset(f16sampler1DShadow sampler, | | 485 | f16vec2 P, float compare, | | 486 | float16_t lod, int offset) | | 487 | float16_t textureLodOffset(f16sampler2DShadow sampler, | | 488 | vec3 P, float lod, ivec2 offset) | | 489 | float16_t textureLodOffset(f16sampler2DShadow sampler, | | 490 | f16vec2 P, float compare, | | 491 | float16_t lod, ivec2 offset) | | 492 | f16vec4 textureLodOffset(f16sampler1DArray sampler, | | 493 | f16vec2 P, float16_t lod, | | 494 | int offset) | | 495 | f16vec4 textureLodOffset(f16sampler2DArray sampler, | | 496 | f16vec3 P, float16_t lod, | | 497 | ivec2 offset) | | 498 | float16_t textureLodOffset(f16sampler1DArrayShadow sampler, | | 499 | vec3 P, float lod, int offset) | | 500 | float16_t textureLodOffset(f16sampler1DArrayShadow sampler, | | 501 | f16vec2 P, float compare, | | 502 | float16_t lod, int offset) | | 503 +--------------------------------------------------------------+------------------------------+ 504 | f16vec4 textureProjLod(f16sampler1D sampler, f16vec2 P, | Do a projective texture | 505 | float16_t lod) | lookup with explicit LOD. ...| 506 | f16vec4 textureProjLod(f16sampler1D sampler, f16vec4 P, | | 507 | float16_t lod) | | 508 | f16vec4 textureProjLod(f16sampler2D sampler, f16vec3 P, | | 509 | float16_t lod) | | 510 | f16vec4 textureProjLod(f16sampler2D sampler, f16vec4 P, | | 511 | float16_t lod) | | 512 | f16vec4 textureProjLod(f16sampler3D sampler, f16vec4 P, | | 513 | float16_t lod) | | 514 | float16_t textureProjLod(f16sampler1DShadow sampler, vec4 P, | | 515 | float lod) | | 516 | float16_t textureProjLod(f16sampler1DShadow sampler, | | 517 | f16vec3 P, float compare, | | 518 | float16_t lod) | | 519 | float16_t textureProjLod(f16sampler2DShadow sampler, vec4 P, | | 520 | float lod) | | 521 | float16_t textureProjLod(f16sampler2DShadow sampler, | | 522 | f16vec3 P, float compare, | | 523 | float16_t lod) | | 524 +--------------------------------------------------------------+------------------------------+ 525 | f16vec4 textureProjLodOffset(f16sampler1D sampler, | Do a offset projective | 526 | f16vec2 P, float16_t lod, | texture lookup with explicit | 527 | int offset) | LOD. ... | 528 | f16vec4 textureProjLodOffset(f16sampler1D sampler, | | 529 | f16vec4 P, float16_t lod, | | 530 | int offset) | | 531 | f16vec4 textureProjLodOffset(f16sampler2D sampler, | | 532 | f16vec3 P, float16_t lod, | | 533 | ivec2 offset) | | 534 | f16vec4 textureProjLodOffset(f16sampler2D sampler, | | 535 | f16vec4 P, float16_t lod, | | 536 | ivec2 offset) | | 537 | f16vec4 textureProjLodOffset(f16sampler3D sampler, | | 538 | f16vec4 P, float16_t lod, | | 539 | ivec3 offset) | | 540 | float16_t textureProjLodOffset(f16sampler1DShadow sampler, | | 541 | vec4 P, float lod, int offset)| | 542 | float16_t textureProjLodOffset(f16sampler1DShadow sampler, | | 543 | f16vec3 P, float compare, | | 544 | float16_t lod, int offset) | | 545 | float16_t textureProjLodOffset(f16sampler2DShadow sampler, | | 546 | vec4 P, float lod, | | 547 | ivec2 offset) | | 548 | float16_t textureProjLodOffset(f16sampler2DShadow sampler, | | 549 | f16vec3 P, float compare, | | 550 | float16_t lod, ivec2 offset) | | 551 +--------------------------------------------------------------+------------------------------+ 552 | f16vec4 textureGrad(f16sampler1D sampler, float16_t P, | Do a texture lookup as in | 553 | float16_t dPdx, float16_t dPdy) | texture() but with explicit | 554 | f16vec4 textureGrad(f16sampler2D sampler, f16vec2 P, | gradients. ... | 555 | f16vec2 dPdx, f16vec2 dPdy) | | 556 | f16vec4 textureGrad(f16sampler3D sampler, f16vec3 P, | | 557 | f16vec3 dPdx, f16vec3 dPdy) | | 558 | f16vec4 textureGrad(f16samplerCube sampler, f16vec3 P, | | 559 | f16vec3 dPdx, f16vec3 dPdy) | | 560 | f16vec4 textureGrad(f16sampler2DRect sampler, f16vec2 P, | | 561 | f16vec2 dPdx, f16vec2 dPdy) | | 562 | float16_t textureGrad(f16sampler2DRectShadow sampler, vec3 P,| | 563 | vec2 dPdx, vec2 dPdy) | | 564 | float16_t textureGrad(f16sampler2DRectShadow sampler, | | 565 | f16vec2 P, float compare, f16vec2 dPdx,| | 566 | f16vec2 dPdy) | | 567 | float16_t textureGrad(f16sampler1DShadow sampler, vec3 P, | | 568 | float dPdx, float dPdy) | | 569 | float16_t textureGrad(f16sampler1DShadow sampler, f16vec2 P, | | 570 | float compare, float16_t dPdx, | | 571 | float16_t dPdy) | | 572 | float16_t textureGrad(f16sampler2DShadow sampler, vec3 P, | | 573 | vec2 dPdx, vec2 dPdy) | | 574 | float16_t textureGrad(f16sampler2DShadow sampler, f16vec2 P, | | 575 | float compare, f16vec2 dPdx, | | 576 | f16vec2 dPdy) | | 577 | float16_t textureGrad(f16samplerCubeShadow sampler, vec4 P, | | 578 | vec3 dPdx, vec3 dPdy) | | 579 | float16_t textureGrad(f16samplerCubeShadow sampler, | | 580 | f16vec3 P, float compare, f16vec3 dPdx,| | 581 | f16vec3 dPdy) | | 582 | f16vec4 textureGrad(f16sampler1DArray sampler, f16vec2 P, | | 583 | float16_t dPdx, float16_t dPdy) | | 584 | f16vec4 textureGrad(f16sampler2DArray sampler, f16vec3 P, | | 585 | f16vec2 dPdx, f16vec2 dPdy) | | 586 | float16_t textureGrad(f16sampler1DArrayShadow sampler, | | 587 | vec3 P, float dPdx, float dPdy) | | 588 | float16_t textureGrad(f16sampler1DArrayShadow sampler, | | 589 | f16vec2 P, float compare, | | 590 | float16_t dPdx, float16_t dPdy) | | 591 | float16_t textureGrad(f16sampler2DArrayShadow sampler, | | 592 | vec4 P, vec2 dPdx, vec2 dPdy) | | 593 | float16_t textureGrad(f16sampler2DArrayShadow sampler, | | 594 | f16vec3 P, float compare, f16vec2 dPdx,| | 595 | f16vec2 dPdy) | | 596 | f16vec4 textureGrad(f16samplerCubeArray sampler, | | 597 | f16vec4 P, f16vec3 dPdx, f16vec3 dPdy) | | 598 +--------------------------------------------------------------+------------------------------+ 599 | f16vec4 textureGradOffset(f16sampler1D sampler, | Do a texture lookup with both| 600 | float16_t P, float16_t dPdx, | explicit gradient and offset,| 601 | float16_t dPdy, int offset) | as described in textureGrad()| 602 | f16vec4 textureGradOffset(f16sampler2D sampler, f16vec2 P, | and textureOffset(). | 603 | f16vec2 dPdx, f16vec2 dPdy, | | 604 | ivec2 offset) | | 605 | f16vec4 textureGradOffset(f16sampler3D sampler, f16vec3 P, | | 606 | f16vec3 dPdx, f16vec3 dPdy, | | 607 | ivec3 offset) | | 608 | f16vec4 textureGradOffset(f16sampler2DRect sampler, | | 609 | f16vec2 P, f16vec2 dPdx, | | 610 | f16vec2 dPdy, ivec2 offset) | | 611 | float16_t textureGradOffset(f16sampler2DRectShadow sampler, | | 612 | vec3 P, vec2 dPdx, vec2 dPdy, | | 613 | ivec2 offset) | | 614 | float16_t textureGradOffset(f16sampler2DRectShadow sampler, | | 615 | f16vec2 P, float compare, | | 616 | f16vec2 dPdx, f16vec2 dPdy, | | 617 | ivec2 offset) | | 618 | float16_t textureGradOffset(f16sampler1DShadow sampler, | | 619 | vec3 P, float dPdx, float dPdy, | | 620 | int offset) | | 621 | float16_t textureGradOffset(f16sampler1DShadow sampler, | | 622 | f16vec2 P, float compare, | | 623 | float16_t dPdx, float16_t dPdy, | | 624 | int offset) | | 625 | float16_t textureGradOffset(f16sampler2DShadow sampler, | | 626 | vec3 P, vec2 dPdx, vec2 dPdy, | | 627 | ivec2 offset) | | 628 | float16_t textureGradOffset(f16sampler2DShadow sampler, | | 629 | f16vec2 P, float compare, | | 630 | f16vec2 dPdx, f16vec2 dPdy, | | 631 | ivec2 offset) | | 632 | f16vec4 textureGradOffset(f16sampler1DArray sampler, | | 633 | f16vec2 P, float16_t dPdx, | | 634 | float16_t dPdy, int offset) | | 635 | f16vec4 textureGradOffset(f16sampler2DArray sampler, | | 636 | f16vec3 P, f16vec2 dPdx, | | 637 | f16vec2 dPdy, ivec2 offset) | | 638 | float16_t textureGradOffset(f16sampler1DArrayShadow sampler, | | 639 | vec3 P, float dPdx, float dPdy, | | 640 | int offset) | | 641 | float16_t textureGradOffset(f16sampler1DArrayShadow sampler, | | 642 | f16vec2 P, float compare, | | 643 | float16_t dPdx, float16_t dPdy, | | 644 | int offset) | | 645 | float16_t textureGradOffset(f16sampler2DArrayShadow sampler, | | 646 | vec4 P, vec2 dPdx, vec2 dPdy, | | 647 | ivec2 offset) | | 648 | float16_t textureGradOffset(f16sampler2DArrayShadow sampler, | | 649 | f16vec3 P, float compare, | | 650 | f16vec2 dPdx, f16vec2 dPdy, | | 651 | ivec2 offset) | | 652 +--------------------------------------------------------------+------------------------------+ 653 | f16vec4 textureProjGrad(f16sampler1D sampler, f16vec2 P, | Do a texture lookup both | 654 | float16_t dPdx, float16_t dPdy) | projectively, as described in| 655 | f16vec4 textureProjGrad(f16sampler1D sampler, f16vec4 P, | textureProj(), and with | 656 | float16_t dPdx, float16_t dPdy) | explicit gradient as | 657 | f16vec4 textureProjGrad(f16sampler2D sampler, f16vec3 P, | described in textureGrad(). | 658 | f16vec2 dPdx, f16vec2 dPdy) | ... | 659 | f16vec4 textureProjGrad(f16sampler2D sampler, f16vec4 P, | | 660 | f16vec2 dPdx, f16vec2 dPdy) | | 661 | f16vec4 textureProjGrad(f16sampler3D sampler, f16vec4 P, | | 662 | f16vec3 dPdx, f16vec3 dPdy) | | 663 | f16vec4 textureProjGrad(f16sampler2DRect sampler, | | 664 | f16vec3 P, f16vec2 dPdx, | | 665 | f16vec2 dPdy) | | 666 | f16vec4 textureProjGrad(f16sampler2DRect sampler, | | 667 | f16vec4 P, f16vec2 dPdx, | | 668 | f16vec2 dPdy) | | 669 | float16_t textureProjGrad(f16sampler2DRectShadow sampler, | | 670 | vec4 P, vec2 dPdx, vec2 dPdy) | | 671 | float16_t textureProjGrad(f16sampler2DRectShadow sampler, | | 672 | f16vec3 P, float compare, | | 673 | f16vec2 dPdx, f16vec2 dPdy) | | 674 | float16_t textureProjGrad(f16sampler1DShadow sampler, vec4 P,| | 675 | float dPdx, float dPdy) | | 676 | float16_t textureProjGrad(f16sampler1DShadow sampler, | | 677 | f16vec3 P, float compare, | | 678 | float16_t dPdx, float16_t dPdy) | | 679 | float16_t textureProjGrad(f16sampler2DShadow sampler, vec4 P,| | 680 | vec2 dPdx, vec2 dPdy) | | 681 | float16_t textureProjGrad(f16sampler2DShadow sampler, | | 682 | f16vec3 P, float compare, | | 683 | f16vec2 dPdx, f16vec2 dPdy) | | 684 +--------------------------------------------------------------+------------------------------+ 685 | f16vec4 textureProjGradOffset(f16sampler1D sampler, | Do a texture lookup | 686 | f16vec2 P, float16_t dPdx, | projectively and with | 687 | float16_t dPdy, int offset) | explicit gradient as | 688 | f16vec4 textureProjGradOffset(f16sampler1D sampler, | described in | 689 | f16vec4 P, float16_t dPdx, | textureProjGrad(), as well as| 690 | float16_t dPdy, int offset) | with offset, as described in | 691 | f16vec4 textureProjGradOffset(f16sampler2D sampler, | textureOffset(). | 692 | f16vec3 P, f16vec2 dPdx, | | 693 | f16vec2 dPdy, ivec2 offset) | | 694 | f16vec4 textureProjGradOffset(f16sampler2D sampler, | | 695 | f16vec4 P, f16vec2 dPdx, | | 696 | f16vec2 dPdy, ivec2 offset) | | 697 | f16vec4 textureProjGradOffset(f16sampler2DRect sampler, | | 698 | f16vec3 P, f16vec2 dPdx, | | 699 | f16vec2 dPdy, ivec2 offset) | | 700 | f16vec4 textureProjGradOffset(f16sampler2DRect sampler, | | 701 | f16vec4 P, f16vec2 dPdx, | | 702 | f16vec2 dPdy, ivec2 offset) | | 703 | float16_t textureProjGradOffset(f16sampler2DRectShadow | | 704 | sampler, vec4 P, vec2 dPdx, | | 705 | vec2 dPdy, ivec2 offset) | | 706 | float16_t textureProjGradOffset(f16sampler2DRectShadow | | 707 | sampler, f16vec3 P, | | 708 | float compare, f16vec2 dPdx, | | 709 | f16vec2 dPdy, ivec2 offset) | | 710 | f16vec4 textureProjGradOffset(f16sampler3D sampler, | | 711 | f16vec4 P, f16vec3 dPdx, | | 712 | f16vec3 dPdy, ivec3 offset) | | 713 | float16_t textureProjGradOffset(f16sampler1DShadow sampler, | | 714 | vec4 P, float dPdx, | | 715 | float dPdy, int offset) | | 716 | float16_t textureProjGradOffset(f16sampler1DShadow sampler, | | 717 | f16vec3 P, float compare, | | 718 | float16_t dPdx, | | 719 | float16_t dPdy, int offset) | | 720 | float16_t textureProjGradOffset(f16sampler2DShadow sampler, | | 721 | vec4 P, vec2 dPdx, vec2 dPdy,| | 722 | ivec2 offset) | | 723 | float16_t textureProjGradOffset(f16sampler2DShadow sampler, | | 724 | f16vec3 P, float compare, | | 725 | f16vec2 dPdx, f16vec2 dPdy, | | 726 | ivec2 offset) | | 727 +--------------------------------------------------------------+------------------------------+ 728 729 Modify Section 8.9.3 Texture Gather Functions 730 731 (modify the first sentence of the first paragraph on p. 170) 732 733 The texture gather functions take components of a single or half floating-point vector operand 734 as a texture coordinate, determine a set of four texels to sample from the base level of detail 735 of the specified texture image, and return one component from each texel in a four-component 736 result vector. 737 738 (insert new functions, whose prototypes are different from those existing ones, to the "Syntax" 739 table cell of each gather function group on p. 171-172) 740 741 +--------------------------------------------------------------+------------------------------+ 742 | Syntax | Description | 743 +--------------------------------------------------------------+------------------------------+ 744 | f16vec4 textureGather(f16sampler2D sampler, f16vec2 P | Returns the value | 745 | [, int comp]) | | 746 | f16vec4 textureGather(f16sampler2DArray sampler, f16vec3 P | gvec4( | 747 | [, int comp]) | Sample_i0_j1(P, base).comp,| 748 | f16vec4 textureGather(f16samplerCube sampler, f16vec3 P | Sample_i1_j1(P, base).comp,| 749 | [, int comp]) | Sample_i1_j0(P, base).comp,| 750 | f16vec4 textureGather(f16samplerCubeArray sampler, f16vec4 P | Sample_i0_j0(P, base).comp)| 751 | [, int comp]) | ... | 752 | f16vec4 textureGather(f16sampler2DRect sampler, f16vec2 P | | 753 | [, int comp]) | | 754 | f16vec4 textureGather(f16sampler2DShadow sampler, vec2 P, | | 755 | float refZ) | | 756 | f16vec4 textureGather(f16sampler2DShadow sampler, f16vec2 P, | | 757 | float refZ) | | 758 | f16vec4 textureGather(f16sampler2DArrayShadow sampler, | | 759 | vec3 P, float refZ) | | 760 | f16vec4 textureGather(f16sampler2DArrayShadow sampler, | | 761 | f16vec3 P, float refZ) | | 762 | f16vec4 textureGather(f16samplerCubeShadow sampler, vec3 P, | | 763 | float refZ) | | 764 | f16vec4 textureGather(f16samplerCubeShadow sampler, | | 765 | f16vec3 P, float refZ) | | 766 | f16vec4 textureGather(f16samplerCubeArrayShadow sampler, | | 767 | vec4 P, float refZ) | | 768 | f16vec4 textureGather(f16samplerCubeArrayShadow sampler, | | 769 | f16vec4 P, float refZ) | | 770 | f16vec4 textureGather(f16sampler2DRectShadow sampler, vec2 P,| | 771 | float refZ) | | 772 | f16vec4 textureGather(f16sampler2DRectShadow sampler, | | 773 | f16vec2 P, float refZ) | | 774 +--------------------------------------------------------------+------------------------------+ 775 | f16vec4 textureGatherOffset(f16sampler2D sampler, f16vec2 P, | Perform a texture gather | 776 | ivec2 offset [, int comp]) | operation as in | 777 | f16vec4 textureGatherOffset(f16sampler2DArray sampler, | textureGather() by <offset> | 778 | f16vec3 P, ivec2 offset | as described in | 779 | [, int comp]) | textureOffset() except that | 780 | f16vec4 textureGatherOffset(f16sampler2DRect sampler, | the <offset> can be variable | 781 | f16vec2 P, ivec2 offset | (non constant) and ... | 782 | [, int comp]) | | 783 | f16vec4 textureGatherOffset(f16sampler2DShadow sampler, | | 784 | vec2 P, float refZ, ivec2 offset)| | 785 | f16vec4 textureGatherOffset(f16sampler2DShadow sampler, | | 786 | f16vec2 P, float refZ, | | 787 | ivec2 offset) | | 788 | f16vec4 textureGatherOffset(f16sampler2DArrayShadow sampler, | | 789 | vec3 P, float refZ, ivec2 offset)| | 790 | f16vec4 textureGatherOffset(f16sampler2DArrayShadow sampler, | | 791 | f16vec3 P, float refZ, | | 792 | ivec2 offset) | | 793 | f16vec4 textureGatherOffset(f16sampler2DRectShadow sampler, | | 794 | vec2 P, float refZ, ivec2 offset)| | 795 | f16vec4 textureGatherOffset(f16sampler2DRectShadow sampler, | | 796 | f16vec2 P, float refZ, | | 797 | ivec2 offset) | | 798 +--------------------------------------------------------------+------------------------------+ 799 | f16vec4 textureGatherOffsets(f16sampler2D sampler, f16vec2 P,| Operate identically to | 800 | ivec2 offsets[4] [, int comp]) | textureGatherOffset() except | 801 | f16vec4 textureGatherOffsets(f16sampler2DArray sampler, | that <offsets> is used to | 802 | f16vec3 P, ivec2 offsets[4] | determine the location of the| 803 | [, int comp]) | four texels to sample. ... | 804 | f16vec4 textureGatherOffsets(f16sampler2DRect sampler, | | 805 | f16vec2 P, ivec2 offsets[4] | | 806 | [, int comp]) | | 807 | f16vec4 textureGatherOffsets(f16sampler2DShadow sampler, | | 808 | vec2 P, float refZ, ivec2 | | 809 | offsets[4]) | | 810 | f16vec4 textureGatherOffsets(f16sampler2DShadow sampler, | | 811 | f16vec2 P, float refZ, ivec2 | | 812 | offsets[4]) | | 813 | f16vec4 textureGatherOffsets(f16sampler2DArrayShadow sampler,| | 814 | vec3 P, float refZ, ivec2 | | 815 | offsets[4]) | | 816 | f16vec4 textureGatherOffsets(f16sampler2DArrayShadow sampler,| | 817 | f16vec3 P, float refZ, ivec2 | | 818 | offsets[4]) | | 819 | f16vec4 textureGatherOffsets(f16sampler2DRectShadow sampler, | | 820 | vec2 P, float refZ, ivec2 | | 821 | offsets[4]) | | 822 | f16vec4 textureGatherOffsets(f16sampler2DRectShadow sampler, | | 823 | f16vec2 P, float refZ, ivec2 | | 824 | offsets[4]) | | 825 +--------------------------------------------------------------+------------------------------+ 826 827 Modify Section 8.12 Image Functions 828 829 (modify the second paragraph on p. 177) 830 831 Loads and stores support single-precision float, half-precision float, integer, and unsigned 832 integer types. The data types below starting "gimage" serve as placeholders meaning types 833 starting either "image", "f16image", "iimage", or "uimage" in the same way as gvec or gsampler 834 in earlier sections. 835 836 The IMAGE_PARAMS in the prototypes below is a placeholder representing 44 separate functions, 837 each for a different type of image variable. 838 839 (modify the first sentence of the fourth paragraph on p. 177) 840 841 where each of the lines represents one of four different image variable types, and image, P, 842 and sample specify the individual texel to operate on. 843 844 Modify Section 9, Shading Language Grammar for Core Profile 845 846 (add to the list of tokens on p. 189) 847 848 ... 849 F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE 850 F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY 851 F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY 852 F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW 853 F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW 854 855 F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT 856 F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY 857 F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY 858 ... 859 860 (add to the rule of "type_specifier_nonarray" on p. 197) 861 862 type_specifier_nonarray: 863 ... 864 F16SAMPLER1D 865 F16SAMPLER2D 866 F16SAMPLER3D 867 F16SAMPLER2DRECT 868 F16SAMPLERCUBE 869 F16SAMPLER1DARRAY 870 F16SAMPLER2DARRAY 871 F16SAMPLERCUBEARRAY 872 F16SAMPLERBUFFER 873 F16SAMPLER2DMS 874 F16SAMPLER2DMSARRAY 875 F16SAMPLER1DSHADOW 876 F16SAMPLER2DSHADOW 877 F16SAMPLER1DARRAYSHADOW 878 F16SAMPLER2DRECTSHADOW 879 F16SAMPLERCUBESHADOW 880 F16SAMPLERCUBEARRAYSHADOW 881 F16IMAGE1D 882 F16IMAGE2D 883 F16IMAGE3D 884 F16IMAGE2DRECT 885 F16IMAGECUBE 886 F16IMAGE1DARRAY 887 F16IMAGE2DARRAY 888 F16IMAGECUBEARRAY 889 F16IMAGEBUFFER 890 F16IMAGE2DMS 891 F16IMAGE2DMSARRAY 892 ... 893 894Dependencies on AMD_gpu_shader_half_float 895 896 If the shader do not enable AMD_gpu_shader_half_float, half-precision floating-point opaque 897 types added by this extension, together with those new built-in texture and image memory 898 functions, are unable to be used. 899 900Dependencies on ARB_sparse_texture2 901 902 If the shader enables ARB_sparse_texture2, this extension adds additional texture lookup 903 functions, whose prototypes are different from those existing ones. 904 905 +--------------------------------------------------------------+------------------------------+ 906 | Syntax | Description | 907 +--------------------------------------------------------------+------------------------------+ 908 | int sparseTextureARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | 909 | out f16vec4 texel [, float16_t bias]) | as in texture(), but return | 910 | int sparseTextureARB(f16sampler3D sampler, f16vec3 P, | texture access residency | 911 | out f16vec4 texel [, float16_t bias]) | information from the function| 912 | int sparseTextureARB(f16samplerCube sampler, f16vec3 P, | and the filtered lookup | 913 | out f16vec4 texel [, float16_t bias]) | result in the out parameter | 914 | int sparseTextureARB(f16sampler2DShadow sampler, vec3 P, | <texel>. | 915 | out float16_t texel [, float bias]) | | 916 | int sparseTextureARB(f16sampler2DShadow sampler, f16vec2 P, | | 917 | float compare, out float16_t texel | | 918 | [, float16_t bias]) | | 919 | int sparseTextureARB(f16samplerCubeShadow sampler, vec4 P, | | 920 | out float16_t texel [, float bias]) | | 921 | int sparseTextureARB(f16samplerCubeShadow sampler, f16vec3 P,| | 922 | float compare, out float16_t texel | | 923 | [, float16_t bias]) | | 924 | int sparseTextureARB(f16sampler2DArray sampler, f16vec3 P, | | 925 | out f16vec4 texel [, float16_t bias]) | | 926 | int sparseTextureARB(f16samplerCubeArray sampler, f16vec4 P, | | 927 | out f16vec4 texel [, float16_t bias]) | | 928 | int sparseTextureARB(f16sampler2DArrayShadow sampler, vec4 P,| | 929 | out float16_t texel) | | 930 | int sparseTextureARB(f16sampler2DArrayShadow sampler, | | 931 | f16vec3 P, float compare, | | 932 | out float16_t texel) | | 933 | int sparseTextureARB(f16sampler2DRect sampler, f16vec2 P, | | 934 | out f16vec4 texel) | | 935 | int sparseTextureARB(f16sampler2DRectShadow sampler, vec3 P, | | 936 | out float16_t texel) | | 937 | int sparseTextureARB(f16sampler2DRectShadow sampler, | | 938 | f16vec2 P, float compare, | | 939 | out float16_t texel) | | 940 | int sparseTextureARB(f16samplerCubeArrayShadow sampler, | | 941 | vec4 P, float compare, | | 942 | out float16_t texel) | | 943 | int sparseTextureARB(f16samplerCubeArrayShadow sampler, | | 944 | f16vec4 P, float compare, | | 945 | out float16_t texel) | | 946 +--------------------------------------------------------------+------------------------------+ 947 | int sparseTextureLodARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | 948 | float16_t lod, out f16vec4 texel) | as in textureLod(), but | 949 | int sparseTextureLodARB(f16sampler3D sampler, f16vec3 P, | return texture access | 950 | float16_t lod, out f16vec4 texel) | residency information from | 951 | int sparseTextureLodARB(f16samplerCube sampler, f16vec3 P, | the function and the filtered| 952 | float16_t lod, out f16vec4 texel) | lookup result in the out | 953 | int sparseTextureLodARB(f16sampler2DShadow sampler, vec3 P, | parameter <texel>. | 954 | float lod, out float16_t texel) | | 955 | int sparseTextureLodARB(f16sampler2DShadow sampler, | | 956 | f16vec2 P, float compare, | | 957 | float16_t lod, out float16_t texel) | | 958 | int sparseTextureLodARB(f16sampler2DArray sampler, f16vec3 P,| | 959 | float16_t lod, out f16vec4 texel) | | 960 | int sparseTextureLodARB(f16samplerCubeArray sampler, | | 961 | f16vec4 P, float16_t lod, | | 962 | out f16vec4 texel) | | 963 +--------------------------------------------------------------+------------------------------+ 964 | int sparseTextureOffsetARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | 965 | ivec2 offset, out f16vec4 texel | as in textureOffset(), but | 966 | [, float16_t bias]) | return texture access | 967 | int sparseTextureOffsetARB(f16sampler3D sampler, f16vec3 P, | residency information from | 968 | ivec3 offset, out f16vec4 texel | the function and the filtered| 969 | [, float16_t bias]) | lookup result in the out | 970 | int sparseTextureOffsetARB(f16sampler2DRect sampler, | parameter <texel>. | 971 | f16vec2 P, ivec2 offset, | | 972 | out f16vec4 texel) | | 973 | int sparseTextureOffsetARB(f16sampler2DRectShadow sampler, | | 974 | vec3 P, ivec2 offset, | | 975 | out float16_t texel) | | 976 | int sparseTextureOffsetARB(f16sampler2DRectShadow sampler, | | 977 | f16vec2 P, float compare, | | 978 | ivec2 offset, out float16_t texel)| | 979 | int sparseTextureOffsetARB(f16sampler2DShadow sampler, | | 980 | vec3 P, ivec2 offset, | | 981 | out float16_t texel | | 982 | [, float bias]) | | 983 | int sparseTextureOffsetARB(f16sampler2DShadow sampler, | | 984 | f16vec2 P, float compare, | | 985 | ivec2 offset, out float16_t texel | | 986 | [, float16_t bias]) | | 987 | int sparseTextureOffsetARB(f16sampler2DArray sampler, | | 988 | f16vec3 P, ivec2 offset, | | 989 | out f16vec4 texel | | 990 | [, float16_t bias]) | | 991 | int sparseTextureOffsetARB(f16sampler2DArrayShadow sampler, | | 992 | vec4 P, ivec2 offset, | | 993 | out float16_t texel) | | 994 | int sparseTextureOffsetARB(f16sampler2DArrayShadow sampler, | | 995 | f16vec3 P, float compare, | | 996 | ivec2 offset, out float16_t texel)| | 997 +--------------------------------------------------------------+------------------------------+ 998 | int sparseTextureLodOffsetARB(f16sampler2D sampler, | Do a filtered texture lookup | 999 | f16vec2 P, float16_t lod, | as in textureLodOffset(), | 1000 | ivec2 offset, | but return texture access | 1001 | out f16vec4 texel) | residency information from | 1002 | int sparseTextureLodOffsetARB(f16sampler3D sampler, | the function and the filtered| 1003 | f16vec3 P, float16_t lod, | lookup result in the out | 1004 | ivec3 offset, | parameter <texel>. | 1005 | out f16vec4 texel) | | 1006 | int sparseTextureLodOffsetARB(f16sampler2DShadow sampler, | | 1007 | vec3 P, float lod, | | 1008 | ivec2 offset, | | 1009 | out float16_t texel) | | 1010 | int sparseTextureLodOffsetARB(f16sampler2DShadow sampler, | | 1011 | f16vec2 P, float compare, | | 1012 | float16_t lod, ivec2 offset, | | 1013 | out float16_t texel) | | 1014 | int sparseTextureLodOffsetARB(f16sampler2DArray sampler, | | 1015 | f16vec3 P, float16_t lod, | | 1016 | ivec2 offset, | | 1017 | out f16vec4 texel) | | 1018 +--------------------------------------------------------------+------------------------------+ 1019 | int sparseTextureGradARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | 1020 | f16vec2 dPdx, f16vec2 dPdy, | as in textureGrad(), but | 1021 | out f16vec4 texel) | return texture access | 1022 | int sparseTextureGradARB(f16sampler3D sampler, f16vec3 P, | residency information from | 1023 | f16vec3 dPdx, f16vec3 dPdy, | the function and the filtered| 1024 | out f16vec4 texel) | lookup result in the out | 1025 | int sparseTextureGradARB(f16samplerCube sampler, f16vec3 P, | parameter <texel>. | 1026 | f16vec3 dPdx, f16vec3 dPdy, | | 1027 | out f16vec4 texel) | | 1028 | int sparseTextureGradARB(f16sampler2DRect sampler, f16vec2 P,| | 1029 | f16vec2 dPdx, f16vec2 dPdy, | | 1030 | out f16vec4 texel) | | 1031 | int sparseTextureGradARB(f16sampler2DRectShadow sampler, | | 1032 | vec3 P, vec2 dPdx, vec2 dPdy, | | 1033 | out float16_t texel) | | 1034 | int sparseTextureGradARB(f16sampler2DRectShadow sampler, | | 1035 | f16vec2 P, float compare, | | 1036 | f16vec2 dPdx, f16vec2 dPdy, | | 1037 | out float16_t texel) | | 1038 | int sparseTextureGradARB(f16sampler2DShadow sampler, vec3 P, | | 1039 | vec2 dPdx, vec2 dPdy, | | 1040 | out float16_t texel) | | 1041 | int sparseTextureGradARB(f16sampler2DShadow sampler, | | 1042 | f16vec2 P, float compare, | | 1043 | f16vec2 dPdx, f16vec2 dPdy, | | 1044 | out float16_t texel) | | 1045 | int sparseTextureGradARB(f16samplerCubeShadow sampler, | | 1046 | vec4 P, vec3 dPdx, vec3 dPdy, | | 1047 | out float16_t texel) | | 1048 | int sparseTextureGradARB(f16samplerCubeShadow sampler, | | 1049 | f16vec3 P, float compare, | | 1050 | f16vec3 dPdx, f16vec3 dPdy, | | 1051 | out float16_t texel) | | 1052 | int sparseTextureGradARB(f16sampler2DArray sampler, | | 1053 | f16vec3 P, f16vec2 dPdx, | | 1054 | f16vec2 dPdy, out f16vec4 texel) | | 1055 | int sparseTextureGradARB(f16sampler2DArrayShadow sampler, | | 1056 | vec4 P, vec2 dPdx, vec2 dPdy, | | 1057 | out float16_t texel) | | 1058 | int sparseTextureGradARB(f16sampler2DArrayShadow sampler, | | 1059 | f16vec3 P, float compare, | | 1060 | f16vec2 dPdx, f16vec2 dPdy, | | 1061 | out float16_t texel) | | 1062 | int sparseTextureGradARB(f16samplerCubeArray sampler, | | 1063 | f16vec4 P, f16vec3 dPdx, | | 1064 | f16vec3 dPdy, out f16vec4 texel) | | 1065 +--------------------------------------------------------------+------------------------------+ 1066 | int sparseTextureGradOffsetARB(f16sampler2D sampler, | Do a filtered texture lookup | 1067 | f16vec2 P, f16vec2 dPdx, | as in textureGradOffset(), | 1068 | f16vec2 dPdy, ivec2 offset, | but return texture access | 1069 | out f16vec4 texel) | residency information from | 1070 | int sparseTextureGradOffsetARB(f16sampler3D sampler, | the function and the filtered| 1071 | f16vec3 P, f16vec3 dPdx, | lookup result in the out | 1072 | f16vec3 dPdy, ivec3 offset, | parameter <texel>. | 1073 | out f16vec4 texel) | | 1074 | int sparseTextureGradOffsetARB(f16sampler2DRect sampler, | | 1075 | f16vec2 P, f16vec2 dPdx, | | 1076 | f16vec2 dPdy, ivec2 offset, | | 1077 | out f16vec4 texel) | | 1078 | int sparseTextureGradOffsetARB(f16sampler2DRectShadow | | 1079 | sampler, vec3 P, vec2 dPdx, | | 1080 | vec2 dPdy, ivec2 offset, | | 1081 | out float16_t texel) | | 1082 | int sparseTextureGradOffsetARB(f16sampler2DRectShadow | | 1083 | sampler, f16vec2 P, | | 1084 | float compare, f16vec2 dPdx, | | 1085 | f16vec2 dPdy, ivec2 offset, | | 1086 | out float16_t texel) | | 1087 | int sparseTextureGradOffsetARB(f16sampler2DShadow sampler, | | 1088 | vec3 P, vec2 dPdx, vec2 dPdy, | | 1089 | ivec2 offset, | | 1090 | out float16_t texel) | | 1091 | int sparseTextureGradOffsetARB(f16sampler2DShadow sampler, | | 1092 | f16vec2 P, float compare, | | 1093 | f16vec2 dPdx, f16vec2 dPdy, | | 1094 | ivec2 offset, | | 1095 | out float16_t texel) | | 1096 | int sparseTextureGradOffsetARB(f16sampler2DArray sampler, | | 1097 | f16vec3 P, f16vec2 dPdx, | | 1098 | f16vec2 dPdy, ivec2 offset, | | 1099 | out f16vec4 texel) | | 1100 | int sparseTextureGradOffsetARB(f16sampler2DArrayShadow | | 1101 | sampler, vec4 P, | | 1102 | vec2 dPdx, vec2 dPdy, | | 1103 | ivec2 offset, | | 1104 | out float16_t texel) | | 1105 | int sparseTextureGradOffsetARB(f16sampler2DArrayShadow | | 1106 | sampler, f16vec3 P, | | 1107 | float compare, f16vec2 dPdx, | | 1108 | f16vec2 dPdy, ivec2 offset, | | 1109 | out float16_t texel) | | 1110 +--------------------------------------------------------------+------------------------------+ 1111 | int sparseTextureGatherARB(f16sampler2D sampler, f16vec2 P, | Do a texture gather operation| 1112 | out f16vec4 texel [, int comp]) | as in textureGather(), but | 1113 | int sparseTextureGatherARB(f16sampler2DArray sampler, vec3 P,| return texture access | 1114 | out f16vec4 texel [, int comp]) | residency information from | 1115 | int sparseTextureGatherARB(f16samplerCube sampler, f16vec3 P,| the function and the filtered| 1116 | out f16vec4 texel [, int comp]) | lookup result in the out | 1117 | int sparseTextureGatherARB(f16samplerCubeArray sampler, | parameter <texel>. | 1118 | f16vec4 P, out f16vec4 texel | | 1119 | [, int comp]) | | 1120 | int sparseTextureGatherARB(f16sampler2DRect sampler, | | 1121 | f16vec2 P, out f16vec4 texel | | 1122 | [, int comp]) | | 1123 | int sparseTextureGatherARB(f16sampler2DShadow sampler, | | 1124 | vec2 P, float refZ, | | 1125 | out f16vec4 texel) | | 1126 | int sparseTextureGatherARB(f16sampler2DShadow sampler, | | 1127 | f16vec2 P, float refZ, | | 1128 | out f16vec4 texel) | | 1129 | int sparseTextureGatherARB(f16sampler2DArrayShadow sampler, | | 1130 | vec3 P, float refZ, | | 1131 | out f16vec4 texel) | | 1132 | int sparseTextureGatherARB(f16sampler2DArrayShadow sampler, | | 1133 | f16vec3 P, float refZ, | | 1134 | out f16vec4 texel) | | 1135 | int sparseTextureGatherARB(f16samplerCubeShadow sampler, | | 1136 | vec3 P, float refZ, | | 1137 | out f16vec4 texel) | | 1138 | int sparseTextureGatherARB(f16samplerCubeShadow sampler, | | 1139 | f16vec3 P, float refZ, | | 1140 | out f16vec4 texel) | | 1141 | int sparseTextureGatherARB(f16samplerCubeArrayShadow sampler,| | 1142 | vec4 P, float refZ, | | 1143 | out f16vec4 texel) | | 1144 | int sparseTextureGatherARB(f16samplerCubeArrayShadow sampler,| | 1145 | f16vec4 P, float refZ, | | 1146 | out f16vec4 texel) | | 1147 | int sparseTextureGatherARB(f16sampler2DRectShadow sampler, | | 1148 | vec2 P, float refZ, | | 1149 | out f16vec4 texel) | | 1150 | int sparseTextureGatherARB(f16sampler2DRectShadow sampler, | | 1151 | f16vec2 P, float refZ, | | 1152 | out f16vec4 texel) | | 1153 +--------------------------------------------------------------+------------------------------+ 1154 | int sparseTextureGatherOffsetARB(f16sampler2D sampler, | Do a texture gather operation| 1155 | f16vec2 P, ivec2 offset, | as in textureGatherOffset(), | 1156 | out f16vec4 texel | but return texture access | 1157 | [, int comp]) | residency information from | 1158 | int sparseTextureGatherOffsetARB(f16sampler2DArray sampler, | the function and the filtered| 1159 | f16vec3 P, ivec2 offset, | lookup result in the out | 1160 | out f16vec4 texel | parameter <texel>. | 1161 | [, int comp]) | | 1162 | int sparseTextureGatherOffsetARB(f16sampler2DRect sampler, | | 1163 | f16vec2 P, ivec2 offset, | | 1164 | out f16vec4 texel | | 1165 | [, int comp]) | | 1166 | int sparseTextureGatherOffsetARB(f16sampler2DShadow sampler, | | 1167 | vec2 P, float refZ, | | 1168 | ivec2 offset, | | 1169 | out f16vec4 texel) | | 1170 | int sparseTextureGatherOffsetARB(f16sampler2DShadow sampler, | | 1171 | f16vec2 P, float refZ, | | 1172 | ivec2 offset, | | 1173 | out f16vec4 texel) | | 1174 | int sparseTextureGatherOffsetARB(f16sampler2DArrayShadow | | 1175 | sampler, vec3 P, float refZ,| | 1176 | ivec2 offset, | | 1177 | out f16vec4 texel) | | 1178 | int sparseTextureGatherOffsetARB(f16sampler2DArrayShadow | | 1179 | sampler, f16vec3 P, | | 1180 | float refZ, ivec2 offset, | | 1181 | out f16vec4 texel) | | 1182 | int sparseTextureGatherOffsetARB(f16sampler2DRectShadow | | 1183 | sampler, vec2 P, float refZ,| | 1184 | ivec2 offset, | | 1185 | out f16vec4 texel) | | 1186 | int sparseTextureGatherOffsetARB(f16sampler2DRectShadow | | 1187 | sampler, f16vec2 P, | | 1188 | float refZ, ivec2 offset, | | 1189 | out f16vec4 texel) | | 1190 +--------------------------------------------------------------+------------------------------+ 1191 | int sparseTextureGatherOffsetsARB(f16sampler2D sampler, | Do a texture gather operation| 1192 | f16vec2 P, | as in textureGatherOffsets(),| 1193 | ivec2 offsets[4], | but return texture access | 1194 | out f16vec4 texel | residency information from | 1195 | [, int comp]) | the function and the filtered| 1196 | int sparseTextureGatherOffsetsARB(f16sampler2DArray sampler, | lookup result in the out | 1197 | f16vec3 P, | parameter <texel>. | 1198 | ivec2 offsets[4], | | 1199 | out f16vec4 texel | | 1200 | [, int comp]) | | 1201 | int sparseTextureGatherOffsetsARB(f16sampler2DRect sampler, | | 1202 | f16vec2 P, | | 1203 | ivec2 offsets[4], | | 1204 | out f16vec4 texel | | 1205 | [, int comp]) | | 1206 | int sparseTextureGatherOffsetsARB(f16sampler2DShadow sampler,| | 1207 | vec2 P, float refZ, | | 1208 | ivec2 offsets[4], | | 1209 | out f16vec4 texel) | | 1210 | int sparseTextureGatherOffsetsARB(f16sampler2DShadow sampler,| | 1211 | f16vec2 P, float refZ, | | 1212 | ivec2 offsets[4], | | 1213 | out f16vec4 texel) | | 1214 | int sparseTextureGatherOffsetsARB(f16sampler2DArrayShadow | | 1215 | sampler, vec3 P, | | 1216 | float refZ, | | 1217 | ivec2 offsets[4], | | 1218 | out f16vec4 texel) | | 1219 | int sparseTextureGatherOffsetsARB(f16sampler2DArrayShadow | | 1220 | sampler, f16vec3 P, | | 1221 | float refZ, | | 1222 | ivec2 offsets[4], | | 1223 | out f16vec4 texel) | | 1224 | int sparseTextureGatherOffsetsARB(f16sampler2DRectShadow | | 1225 | sampler, vec2 P, | | 1226 | float refZ, | | 1227 | ivec2 offsets[4], | | 1228 | out f16vec4 texel) | | 1229 | int sparseTextureGatherOffsetsARB(f16sampler2DRectShadow | | 1230 | sampler, f16vec2 P, | | 1231 | float refZ, | | 1232 | ivec2 offsets[4], | | 1233 | out f16vec4 texel) | | 1234 +--------------------------------------------------------------+------------------------------+ 1235 1236Dependencies on ARB_sparse_texture_clamp 1237 1238 If the shader enables ARB_sparse_texture_clamp, this extension adds additional texture lookup 1239 functions, whose prototypes are different from those existing ones. 1240 1241 +--------------------------------------------------------------+------------------------------+ 1242 | Syntax | Description | 1243 +--------------------------------------------------------------+------------------------------+ 1244 | int sparseTextureClampARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | 1245 | float16_t lodClamp, | as in texture(), but return | 1246 | out f16vec4 texel | texture access residency | 1247 | [, float16_t bias]) | information from the function| 1248 | int sparseTextureClampARB(f16sampler3D sampler, f16vec3 P, | and the filtered lookup | 1249 | float16_t lodClamp, | result in the out parameter | 1250 | out f16vec4 texel | <texel>. Additionally, | 1251 | [, float16_t bias]) | clamp the automatically | 1252 | int sparseTextureClampARB(f16samplerCube sampler, f16vec3 P, | computed level of detail to | 1253 | float16_t lodClamp, | be greater than or equal to | 1254 | out f16vec4 texel | <lodClamp>. | 1255 | [, float16_t bias]) | | 1256 | int sparseTextureClampARB(f16sampler2DShadow sampler, vec3 P,| | 1257 | float lodClamp, out float16_t texel| | 1258 | [, float bias]) | | 1259 | int sparseTextureClampARB(f16sampler2DShadow sampler, | | 1260 | f16vec2 P, float compare, | | 1261 | float16_t lodClamp, | | 1262 | out float16_t texel | | 1263 | [, float16_t bias]) | | 1264 | int sparseTextureClampARB(f16samplerCubeShadow sampler, | | 1265 | vec4 P, float lodClamp, | | 1266 | out float16_t texel | | 1267 | [, float bias]) | | 1268 | int sparseTextureClampARB(f16samplerCubeShadow sampler, | | 1269 | f16vec3 P, float compare, | | 1270 | float16_t lodClamp, | | 1271 | out float16_t texel | | 1272 | [, float16_t bias]) | | 1273 | int sparseTextureClampARB(f16sampler2DArray sampler, | | 1274 | f16vec3 P, float16_t lodClamp, | | 1275 | out f16vec4 texel | | 1276 | [, float16_t bias]) | | 1277 | int sparseTextureClampARB(f16samplerCubeArray sampler, | | 1278 | f16vec4 P, float16_t lodClamp, | | 1279 | out f16vec4 texel | | 1280 | [, float16_t bias]) | | 1281 | int sparseTextureClampARB(f16sampler2DArrayShadow sampler, | | 1282 | vec4 P, float lodClamp, | | 1283 | out float16_t texel) | | 1284 | int sparseTextureClampARB(f16sampler2DArrayShadow sampler, | | 1285 | f16vec3 P, float compare, | | 1286 | float16_t lodClamp, | | 1287 | out float16_t texel) | | 1288 | int sparseTextureClampARB(f16samplerCubeArrayShadow sampler, | | 1289 | vec4 P, float compare, | | 1290 | float lodClamp, | | 1291 | out float16_t texel) | | 1292 | int sparseTextureClampARB(f16samplerCubeArrayShadow sampler, | | 1293 | f16vec4 P, float compare, | | 1294 | float16_t lodClamp, | | 1295 | out float16_t texel) | | 1296 +--------------------------------------------------------------+------------------------------+ 1297 | f16vec4 textureClampARB(f16sampler1D sampler, float16_t P, | Do a filtered texture lookup | 1298 | float lodClamp [, float16_t bias]) | as in texture(), but clamp | 1299 | f16vec4 textureClampARB(f16sampler2D sampler, vec2 P, | the automatically computed | 1300 | float lodClamp [, float16_t bias]) | level of detail to be greater| 1301 | f16vec4 textureClampARB(f16sampler3D sampler, vec3 P, | than or equal to <lodClamp>. | 1302 | float lodClamp [, float16_t bias]) | | 1303 | f16vec4 textureClampARB(f16samplerCube sampler, vec3 P, | | 1304 | float lodClamp [, float16_t bias]) | | 1305 | float16_t textureClampARB(f16sampler1DShadow sampler, vec3 P,| | 1306 | float lodClamp [, float bias]) | | 1307 | float16_t textureClampARB(f16sampler1DShadow sampler, | | 1308 | f16vec2 P, float compare, | | 1309 | float16_t lodClamp | | 1310 | [, float16_t bias]) | | 1311 | float16_t textureClampARB(f16sampler2DShadow sampler, vec3 P,| | 1312 | float lodClamp [, float bias]) | | 1313 | float16_t textureClampARB(f16sampler2DShadow sampler, | | 1314 | f16vec2 P, float compare, | | 1315 | float16_t lodClamp | | 1316 | [, float16_t bias]) | | 1317 | float16_t textureClampARB(f16samplerCubeShadow sampler, | | 1318 | vec4 P, float lodClamp | | 1319 | [, float bias]) | | 1320 | float16_t textureClampARB(f16samplerCubeShadow sampler, | | 1321 | f16vec3 P, float compare, | | 1322 | float16_t lodClamp | | 1323 | [, float16_t bias]) | | 1324 | f16vec4 textureClampARB(f16sampler1DArray sampler, | | 1325 | f16vec2 P, float16_t lodClamp | | 1326 | [, float16_t bias]) | | 1327 | f16vec4 textureClampARB(f16sampler2DArray sampler, | | 1328 | f16vec3 P, float16_t lodClamp | | 1329 | [, float16_t bias]) | | 1330 | f16vec4 textureClampARB(f16samplerCubeArray sampler, | | 1331 | f16vec4 P, float16_t lodClamp | | 1332 | [, float16_t bias]) | | 1333 | float16_t textureClampARB(f16sampler1DArrayShadow sampler, | | 1334 | vec3 P, float lodClamp | | 1335 | [, float bias]) | | 1336 | float16_t textureClampARB(f16sampler1DArrayShadow sampler, | | 1337 | f16vec2 P, float compare, | | 1338 | float16_t lodClamp | | 1339 | [, float16_t bias]) | | 1340 | float16_t textureClampARB(f16sampler2DArrayShadow sampler, | | 1341 | vec4 P, float lodClamp) | | 1342 | float16_t textureClampARB(f16sampler2DArrayShadow sampler, | | 1343 | f16vec3 P, float compare, | | 1344 | float16_t lodClamp) | | 1345 | float16_t textureClampARB(f16samplerCubeArrayShadow sampler, | | 1346 | vec4 P, float compare, | | 1347 | float lodClamp) | | 1348 | float16_t textureClampARB(f16samplerCubeArrayShadow sampler, | | 1349 | f16vec4 P, float compare, | | 1350 | float16_t lodClamp) | | 1351 +--------------------------------------------------------------+------------------------------+ 1352 | int sparseTextureOffsetClampARB(f16sampler2D sampler, | Do a filtered texture lookup | 1353 | f16vec2 P, ivec2 offset, | as in textureOffset(), but | 1354 | float16_t lodClamp, | return texture access | 1355 | out f16vec4 texel | residency information from | 1356 | [, float16_t bias]) | the function and the filtered| 1357 | int sparseTextureOffsetClampARB(f16sampler3D sampler, | lookup result in the out | 1358 | f16vec3 P, ivec3 offset, | parameter <texel>. | 1359 | float16_t lodClamp, | Additionally, clamp the | 1360 | out f16vec4 texel | automatically computed level | 1361 | [, float16_t bias]) | of detail to be greater than | 1362 | int sparseTextureOffsetClampARB(f16sampler2DShadow sampler, | or equal to <lodClamp>. | 1363 | vec3 P, ivec2 offset, | | 1364 | float lodClamp, | | 1365 | out float16_t texel | | 1366 | [, float bias]) | | 1367 | int sparseTextureOffsetClampARB(f16sampler2DShadow sampler, | | 1368 | f16vec2 P, float compare, | | 1369 | ivec2 offset, | | 1370 | float16_t lodClamp, | | 1371 | out float16_t texel | | 1372 | [, float16_t bias]) | | 1373 | int sparseTextureOffsetClampARB(f16sampler2DArray sampler, | | 1374 | f16vec3 P, ivec2 offset, | | 1375 | float16_t lodClamp, | | 1376 | out f16vec4 texel | | 1377 | [, float16_t bias]) | | 1378 | int sparseTextureOffsetClampARB(f16sampler2DArrayShadow | | 1379 | sampler, vec4 P, | | 1380 | ivec2 offset, float lodClamp,| | 1381 | out float16_t texel) | | 1382 | int sparseTextureOffsetClampARB(f16sampler2DArrayShadow | | 1383 | sampler, f16vec3 P, | | 1384 | float compare, ivec2 offset, | | 1385 | float16_t lodClamp, | | 1386 | out float16_t texel) | | 1387 +--------------------------------------------------------------+------------------------------+ 1388 | f16vec4 textureOffsetClampARB(f16sampler1D sampler, | Do a filtered texture lookup | 1389 | float16_t P, int offset, | as in textureOffset(), but | 1390 | float16_t lodClamp | clamp the automatically | 1391 | [, float16_t bias]) | computed level of detail to | 1392 | f16vec4 textureOffsetClampARB(f16sampler2D sampler, | be greater than or equal to | 1393 | f16vec2 P, ivec2 offset, | <lodClamp>. | 1394 | float16_t lodClamp | | 1395 | [, float16_t bias]) | | 1396 | f16vec4 textureOffsetClampARB(f16sampler3D sampler, | | 1397 | f16vec3 P, ivec3 offset, | | 1398 | float16_t lodClamp | | 1399 | [, float16_t bias]) | | 1400 | float16_t textureOffsetClampARB(f16sampler1DShadow sampler, | | 1401 | vec3 P, int offset, | | 1402 | float lodClamp | | 1403 | [, float bias]) | | 1404 | float16_t textureOffsetClampARB(f16sampler1DShadow sampler, | | 1405 | f16vec2 P, float compare, | | 1406 | int offset, | | 1407 | float16_t lodClamp | | 1408 | [, float16_t bias]) | | 1409 | float16_t textureOffsetClampARB(f16sampler2DShadow sampler, | | 1410 | vec3 P, ivec2 offset, | | 1411 | float lodClamp | | 1412 | [, float bias]) | | 1413 | float16_t textureOffsetClampARB(f16sampler2DShadow sampler, | | 1414 | f16vec2 P, float compare, | | 1415 | ivec2 offset, | | 1416 | float16_t lodClamp | | 1417 | [, float16_t bias]) | | 1418 | f16vec4 textureOffsetClampARB(f16sampler1DArray sampler, | | 1419 | f16vec2 P, int offset, | | 1420 | float16_t lodClamp | | 1421 | [, float16_t bias]) | | 1422 | f16vec4 textureOffsetClampARB(f16sampler2DArray sampler, | | 1423 | f16vec3 P, ivec2 offset, | | 1424 | float16_t lodClamp | | 1425 | [, float16_t bias]) | | 1426 | float16_t textureOffsetClampARB(f16sampler1DArrayShadow | | 1427 | sampler, vec3 P, int offset, | | 1428 | float lodClamp | | 1429 | [, float bias]) | | 1430 | float16_t textureOffsetClampARB(f16sampler1DArrayShadow | | 1431 | sampler, f16vec2 P, | | 1432 | float compare, int offset, | | 1433 | float16_t lodClamp | | 1434 | [, float16_t bias]) | | 1435 | float16_t textureOffsetClampARB(f16sampler2DArrayShadow | | 1436 | sampler, vec4 P, | | 1437 | ivec2 offset, | | 1438 | float lodClamp) | | 1439 | float16_t textureOffsetClampARB(f16sampler2DArrayShadow | | 1440 | sampler, f16vec3 P, | | 1441 | float compare, ivec2 offset, | | 1442 | float16_t lodClamp) | | 1443 +--------------------------------------------------------------+------------------------------+ 1444 | int sparseTextureGradClampARB(f16sampler2D sampler, | Do a filtered texture lookup | 1445 | f16vec2 P, f16vec2 dPdx, | as in textureGrad(), but | 1446 | f16vec2 dPdy, | return texture access | 1447 | float16_t lodClamp, | residency information from | 1448 | out f16vec4 texel) | the function and the filtered| 1449 | int sparseTextureGradClampARB(f16sampler3D sampler, | lookup result in the out | 1450 | f16vec3 P, f16vec3 dPdx, | parameter <texel>. | 1451 | f16vec3 dPdy, | Additionally, clamp the | 1452 | float16_t lodClamp, | automatically computed level | 1453 | out f16vec4 texel) | of detail to be greater than | 1454 | int sparseTextureGradClampARB(f16samplerCube sampler, | or equal to <lodClamp>. | 1455 | f16vec3 P, f16vec3 dPdx, | | 1456 | f16vec3 dPdy, | | 1457 | float16_t lodClamp, | | 1458 | out f16vec4 texel) | | 1459 | int sparseTextureGradClampARB(f16sampler2DShadow sampler, | | 1460 | vec3 P, vec2 dPdx, vec2 dPdy, | | 1461 | float lodClamp, | | 1462 | out float16_t texel) | | 1463 | int sparseTextureGradClampARB(f16sampler2DShadow sampler, | | 1464 | f16vec2 P, float compare, | | 1465 | f16vec2 dPdx, f16vec2 dPdy, | | 1466 | float16_t lodClamp, | | 1467 | out float16_t texel) | | 1468 | int sparseTextureGradClampARB(f16samplerCubeShadow sampler, | | 1469 | vec4 P, vec3 dPdx, vec3 dPdy, | | 1470 | float lodClamp, | | 1471 | out float16_t texel) | | 1472 | int sparseTextureGradClampARB(f16samplerCubeShadow sampler, | | 1473 | f16vec3 P, float compare, | | 1474 | f16vec3 dPdx, f16vec3 dPdy, | | 1475 | float16_t lodClamp, | | 1476 | out float16_t texel) | | 1477 | int sparseTextureGradClampARB(f16sampler2DArray sampler, | | 1478 | f16vec3 P, f16vec2 dPdx, | | 1479 | f16vec2 dPdy, | | 1480 | float16_t lodClamp, | | 1481 | out f16vec4 texel) | | 1482 | int sparseTextureGradClampARB(f16sampler2DArrayShadow | | 1483 | sampler, vec4 P, vec2 dPdx, | | 1484 | vec2 dPdy, float lodClamp, | | 1485 | out float16_t texel) | | 1486 | int sparseTextureGradClampARB(f16sampler2DArrayShadow | | 1487 | sampler, f16vec3 P, | | 1488 | float compare, f16vec2 dPdx, | | 1489 | f16vec2 dPdy, | | 1490 | float16_t lodClamp, | | 1491 | out float16_t texel) | | 1492 | int sparseTextureGradClampARB(f16samplerCubeArray sampler, | | 1493 | f16vec4 P, f16vec3 dPdx, | | 1494 | f16vec3 dPdy, | | 1495 | float16_t lodClamp, | | 1496 | out f16vec4 texel) | | 1497 +--------------------------------------------------------------+------------------------------+ 1498 | f16vec4 textureGradClampARB(f16sampler1D sampler, | Do a filtered texture lookup | 1499 | float16_t P, float16_t dPdx, | as in textureGrad(), but | 1500 | float16_t dPdy, | clamp the automatically | 1501 | float16_t lodClamp) | computed level of detail to | 1502 | f16vec4 textureGradClampARB(f16sampler2D sampler, | be greater than or equal to | 1503 | f16vec2 P, f16vec2 dPdx, | <lodClamp>. | 1504 | f16vec2 dPdy, | | 1505 | float16_t lodClamp) | | 1506 | f16vec4 textureGradClampARB(f16sampler3D sampler, | | 1507 | f16vec3 P, f16vec3 dPdx, | | 1508 | f16vec3 dPdy, | | 1509 | float16_t lodClamp) | | 1510 | f16vec4 textureGradClampARB(f16samplerCube sampler, | | 1511 | f16vec3 P, f16vec3 dPdx, | | 1512 | f16vec3 dPdy, | | 1513 | float16_t lodClamp) | | 1514 | float16_t textureGradClampARB(f16sampler1DShadow sampler, | | 1515 | vec3 P, float dPdx, float dPdy,| | 1516 | float lodClamp) | | 1517 | float16_t textureGradClampARB(f16sampler1DShadow sampler, | | 1518 | f16vec2 P, float compare, | | 1519 | float16_t dPdx, float16_t dPdy,| | 1520 | float16_t lodClamp) | | 1521 | float16_t textureGradClampARB(f16sampler2DShadow sampler, | | 1522 | vec3 P, vec2 dPdx, vec2 dPdy, | | 1523 | float lodClamp) | | 1524 | float16_t textureGradClampARB(f16sampler2DShadow sampler, | | 1525 | f16vec2 P, float compare, | | 1526 | f16vec2 dPdx, f16vec2 dPdy, | | 1527 | float16_t lodClamp) | | 1528 | float16_t textureGradClampARB(f16samplerCubeShadow sampler, | | 1529 | vec4 P, vec3 dPdx, vec3 dPdy, | | 1530 | float lodClamp) | | 1531 | float16_t textureGradClampARB(f16samplerCubeShadow sampler, | | 1532 | f16vec3 P, float compare, | | 1533 | f16vec3 dPdx, f16vec3 dPdy, | | 1534 | float16_t lodClamp) | | 1535 | f16vec4 textureGradClampARB(f16sampler1DArray sampler, | | 1536 | f16vec2 P, float16_t dPdx, | | 1537 | float16_t dPdy, | | 1538 | float16_t lodClamp) | | 1539 | f16vec4 textureGradClampARB(f16sampler2DArray sampler, | | 1540 | f16vec3 P, f16vec2 dPdx, | | 1541 | f16vec2 dPdy, | | 1542 | float16_t lodClamp) | | 1543 | float16_t textureGradClampARB(f16sampler1DArrayShadow | | 1544 | sampler, vec3 P, float dPdx, | | 1545 | float dPdy, float lodClamp) | | 1546 | float16_t textureGradClampARB(f16sampler1DArrayShadow | | 1547 | sampler, f16vec2 P, | | 1548 | float compare, float16_t dPdx, | | 1549 | float16_t dPdy, | | 1550 | float16_t lodClamp) | | 1551 | float16_t textureGradClampARB(f16sampler2DArrayShadow | | 1552 | sampler, vec4 P, vec2 dPdx, | | 1553 | vec2 dPdy, float lodClamp) | | 1554 | float16_t textureGradClampARB(f16sampler2DArrayShadow | | 1555 | sampler, f16vec3 P, | | 1556 | float compare, f16vec2 dPdx, | | 1557 | f16vec2 dPdy, | | 1558 | float16_t lodClamp) | | 1559 | f16vec4 textureGradClampARB(f16samplerCubeArray sampler, | | 1560 | f16vec4 P, f16vec3 dPdx, | | 1561 | f16vec3 dPdy, | | 1562 | float16_t lodClamp) | | 1563 +--------------------------------------------------------------+------------------------------+ 1564 | int sparseTextureGradOffsetClampARB(f16sampler2D sampler, | Do a filtered texture lookup | 1565 | f16vec2 P, f16vec2 dPdx, | as in textureGradOffset(), | 1566 | f16vec2 dPdy, | but return texture access | 1567 | ivec2 offset, | residency information from | 1568 | float16_t lodClamp, | the function and the filtered| 1569 | out f16vec4 texel) | lookup result in the out | 1570 | int sparseTextureGradOffsetClampARB(f16sampler3D sampler, | parameter <texel>. | 1571 | f16vec3 P, f16vec3 dPdx, | Additionally, clamp the | 1572 | f16vec3 dPdy, | automatically computed level | 1573 | ivec3 offset, | of detail to be greater than | 1574 | float16_t lodClamp, | or equal to <lodClamp>. | 1575 | out f16vec4 texel) | | 1576 | int sparseTextureGradOffsetClampARB(f16sampler2DShadow | | 1577 | sampler, vec3 P, | | 1578 | vec2 dPdx, vec2 dPdy, | | 1579 | ivec2 offset, | | 1580 | float lodClamp, | | 1581 | out float16_t texel) | | 1582 | int sparseTextureGradOffsetClampARB(f16sampler2DShadow | | 1583 | sampler, f16vec2 P, | | 1584 | float compare, | | 1585 | f16vec2 dPdx, | | 1586 | f16vec2 dPdy, | | 1587 | ivec2 offset, | | 1588 | float16_t lodClamp, | | 1589 | out float16_t texel) | | 1590 | int sparseTextureGradOffsetClampARB(f16sampler2DArray | | 1591 | sampler, f16vec3 P, | | 1592 | f16vec2 dPdx, | | 1593 | f16vec2 dPdy, | | 1594 | ivec2 offset, | | 1595 | float16_t lodClamp, | | 1596 | out f16vec4 texel) | | 1597 | int sparseTextureGradOffsetClampARB(f16sampler2DArrayShadow | | 1598 | sampler, vec4 P, | | 1599 | vec2 dPdx, vec2 dPdy, | | 1600 | ivec2 offset, | | 1601 | float lodClamp, | | 1602 | out float16_t texel) | | 1603 | int sparseTextureGradOffsetClampARB(f16sampler2DArrayShadow | | 1604 | sampler, f16vec3 P, | | 1605 | float compare, | | 1606 | f16vec2 dPdx, | | 1607 | f16vec2 dPdy, | | 1608 | ivec2 offset, | | 1609 | float16_t lodClamp, | | 1610 | out float16_t texel) | | 1611 +--------------------------------------------------------------+------------------------------+ 1612 | f16vec4 textureGradOffsetClampARB(f16sampler1D sampler, | Do a filtered texture lookup | 1613 | float16_t P, | as in textureGradOffset(), | 1614 | float16_t dPdx, | but clamp the automatically | 1615 | float16_t dPdy, | computed level of detail to | 1616 | int offset, | be greater than or equal to | 1617 | float16_t lodClamp) | <lodClamp>. | 1618 | f16vec4 textureGradOffsetClampARB(f16sampler2D sampler, | | 1619 | f16vec2 P, f16vec2 dPdx, | | 1620 | f16vec2 dPdy, | | 1621 | ivec2 offset, | | 1622 | float16_t lodClamp) | | 1623 | f16vec4 textureGradOffsetClampARB(f16sampler3D sampler, | | 1624 | f16vec3 P, f16vec3 dPdx, | | 1625 | f16vec3 dPdy, | | 1626 | ivec3 offset, | | 1627 | float16_t lodClamp) | | 1628 | float16_t textureGradOffsetClampARB(f16sampler1DShadow | | 1629 | sampler, vec3 P, | | 1630 | float dPdx, float dPdy, | | 1631 | int offset, | | 1632 | float lodClamp) | | 1633 | float16_t textureGradOffsetClampARB(f16sampler1DShadow | | 1634 | sampler, f16vec2 P, | | 1635 | float compare, | | 1636 | float16_t dPdx, | | 1637 | float16_t dPdy, | | 1638 | int offset, | | 1639 | float16_t lodClamp) | | 1640 | float16_t textureGradOffsetClampARB(f16sampler2DShadow | | 1641 | sampler, vec3 P, | | 1642 | vec2 dPdx, vec2 dPdy, | | 1643 | ivec2 offset, | | 1644 | float lodClamp) | | 1645 | float16_t textureGradOffsetClampARB(f16sampler2DShadow | | 1646 | sampler, f16vec2 P, | | 1647 | float compare, | | 1648 | f16vec2 dPdx, | | 1649 | f16vec2 dPdy, | | 1650 | ivec2 offset, | | 1651 | float16_t lodClamp) | | 1652 | f16vec4 textureGradOffsetClampARB(f16sampler1DArray | | 1653 | sampler, f16vec2 P, | | 1654 | float16_t dPdx, | | 1655 | float16_t dPdy, | | 1656 | int offset, | | 1657 | float16_t lodClamp) | | 1658 | f16vec4 textureGradOffsetClampARB(f16sampler2DArray | | 1659 | sampler, f16vec3 P, | | 1660 | f16vec2 dPdx, | | 1661 | f16vec2 dPdy, | | 1662 | ivec2 offset, | | 1663 | float16_t lodClamp) | | 1664 | float16_t textureGradOffsetClampARB(f16sampler1DArrayShadow | | 1665 | sampler, vec3 P, | | 1666 | float dPdx, float dPdy, | | 1667 | int offset, | | 1668 | float lodClamp) | | 1669 | float16_t textureGradOffsetClampARB(f16sampler1DArrayShadow | | 1670 | sampler, f16vec2 P, | | 1671 | float compare, | | 1672 | float16_t dPdx, | | 1673 | float16_t dPdy, | | 1674 | int offset, | | 1675 | float16_t lodClamp) | | 1676 | float16_t textureGradOffsetClampARB(f16sampler2DArrayShadow | | 1677 | sampler, vec4 P, | | 1678 | vec2 dPdx, vec2 dPdy, | | 1679 | ivec2 offset, | | 1680 | float lodClamp) | | 1681 | float16_t textureGradOffsetClampARB(f16sampler2DArrayShadow | | 1682 | sampler, f16vec3 P, | | 1683 | float compare, | | 1684 | f16vec2 dPdx, | | 1685 | f16vec2 dPdy, | | 1686 | ivec2 offset, | | 1687 | float16_t lodClamp) | | 1688 +--------------------------------------------------------------+------------------------------+ 1689 1690Dependencies on KHR_vulkan_glsl 1691 1692 Modify Section, Overview - Subpass Inputs 1693 1694 (add new types prefixed by "f16" to the list of the second paragraph) 1695 1696 Subpasses are read through a new set of types, available only to fragment shaders: 1697 1698 subpassInput 1699 subpassInputMS 1700 f16subpassInput 1701 f16subpassInputMS 1702 ... 1703 1704 Modify Section, Changes to Chapter 3 of the OpenGL Shading Language Specification 1705 1706 (add new keyword prefixed by "f16" to the list of the second paragraph) 1707 1708 Add the following keywords to section 3.6 Keywords: 1709 1710 texture1D texture2D texture3D 1711 textureCube texture2DRect texture1DArray 1712 texture2DArray textureBuffer texture2DMS 1713 texture2DMSArray textureCubeArray 1714 1715 f16texture1D f16texture2D f16texture3D 1716 f16textureCube f16texture2DRect f16texture1DArray 1717 f16texture2DArray f16textureBuffer f16texture2DMS 1718 f16texture2DMSArray f16textureCubeArray 1719 1720 ... 1721 1722 subpassInput f16subpassInput isubpassInput usubpassInput 1723 subpassInputMS f16subpassInputMS isubpassInputMS usubpassInputMS 1724 1725 Modify Section, Changes to Chapter 4 of the OpenGL Shading Language Specification 1726 1727 (add new types to the list of "Floating-Point Opaque Types", interleaved with the existing 1728 types) 1729 1730 Floating-Point Opaque Types 1731 1732 f16texture1D 1733 f16texture2D 1734 f16texture3D 1735 f16textureCube 1736 f16texture2DRect 1737 f16texture1DArray 1738 f16texture2DArray 1739 f16textureBuffer 1740 f16texture2DMS 1741 f16texture2DMSArray 1742 f16textureCubeArray 1743 f16subpassInput 1744 f16subpassInputMS 1745 1746Dependencies on AMD_texture_gather_bias_lod 1747 1748 If the shader enables AMD_texture_gather_bias_lod, this extension adds additional texture 1749 gather functions, whose prototypes are different from those existing ones. 1750 1751 +--------------------------------------------------------------+------------------------------+ 1752 | Syntax | Description | 1753 +--------------------------------------------------------------+------------------------------+ 1754 | f16vec4 textureGather(f16sampler2D sampler, vec2 P | Returns the value | 1755 | [, int comp [, float bias]]) | | 1756 | f16vec4 textureGather(f16sampler2D sampler, f16vec2 P | gvec4( | 1757 | [, int comp [, float16_t bias]]) | Sample_i0_j1( | 1758 | f16vec4 textureGather(f16sampler2DArray sampler, vec3 P | P, base, bias).comp, | 1759 | [, int comp [, float bias]]) | Sample_i1_j1( | 1760 | f16vec4 textureGather(f16sampler2DArray sampler, f16vec3 P | P, base, bias).comp, | 1761 | [, int comp [, float16_t bias]]) | Sample_i1_j0( | 1762 | f16vec4 textureGather(f16samplerCube sampler, vec3 P | P, base, bias).comp, | 1763 | [, int comp [, float bias]]) | Sample_i0_j0( | 1764 | f16vec4 textureGather(f16samplerCube sampler, f16vec3 P | P, base, bias).comp, | 1765 | [, int comp [, float16_t bias]]) | ... | 1766 | f16vec4 textureGather(f16samplerCubeArray sampler, vec4 P | | 1767 | [, int comp [, float bias]]) | | 1768 | f16vec4 textureGather(f16samplerCubeArray sampler, f16vec4 P | | 1769 | [, int comp [, float16_t bias]]) | | 1770 +--------------------------------------------------------------+------------------------------+ 1771 | f16vec4 textureGatherOffset(f16sampler2D sampler, vec2 P, | Perform a texture gather | 1772 | ivec2 offset [, int comp | operation as in | 1773 | [, float bias]]) | textureGather() by <offset> | 1774 | f16vec4 textureGatherOffset(f16sampler2D sampler, f16vec2 P, | as described in | 1775 | ivec2 offset [, int comp | textureOffset() except that | 1776 | [, float16_t bias]]) | the <offset> can be variable | 1777 | f16vec4 textureGatherOffset(f16sampler2DArray sampler, | (non constant) and ... | 1778 | vec3 P, ivec2 offset | | 1779 | [, int comp [, float bias]]) | | 1780 | f16vec4 textureGatherOffset(f16sampler2DArray sampler, | | 1781 | f16vec3 P, ivec2 offset | | 1782 | [, int comp [, float16_t bias]]) | | 1783 +--------------------------------------------------------------+------------------------------+ 1784 | f16vec4 textureGatherOffsets(f16sampler2D sampler, vec2 P, | Operate identically to | 1785 | ivec2 offsets[4] [, int comp | textureGatherOffset() except | 1786 | [, float bias]]) | that <offsets> is used to | 1787 | f16vec4 textureGatherOffsets(f16sampler2D sampler, f16vec2 P,| determine the location of the| 1788 | ivec2 offsets[4] [, int comp | four texels to sample. ... | 1789 | [, float16_t bias]]) | | 1790 | f16vec4 textureGatherOffsets(f16sampler2DArray sampler, | | 1791 | vec3 P, ivec2 offsets[4] | | 1792 | [, int comp [, float bias]]) | | 1793 | f16vec4 textureGatherOffsets(f16sampler2DArray sampler, | | 1794 | f16vec3 P, ivec2 offsets[4] | | 1795 | [, int comp [, float16_t bias]])| | 1796 +--------------------------------------------------------------+------------------------------+ 1797 | f16vec4 textureGatherLodAMD(f16sampler2D sampler, vec2 P, | Perform a texture gather | 1798 | float lod [, int comp]) | operation as in | 1799 | f16vec4 textureGatherLodAMD(f16sampler2D sampler, f16vec2 P, | textureGather() with explicit| 1800 | float16_t lod [, int comp]) | LOD, but the four-texel | 1801 | f16vec4 textureGatherLodAMD(f16sampler2DArray sampler, | sampling is modified as | 1802 | vec3 P, float lod [, int comp]) | follow: | 1803 | f16vec4 textureGatherLodAMD(f16sampler2DArray sampler, | | 1804 | f16vec3 P, float16_t lod | gvec4( | 1805 | [, int comp]) | Sample_i0_j1(P, lod).comp, | 1806 | f16vec4 textureGatherLodAMD(f16samplerCube sampler, | Sample_i1_j1(P, lod).comp, | 1807 | vec3 P, float lod [, int comp]) | Sample_i1_j0(P, lod).comp, | 1808 | f16vec4 textureGatherLodAMD(f16samplerCube sampler, | Sample_i0_j0(P, lod).comp) | 1809 | f16vec3 P, float16_t lod | | 1810 | [, int comp]) | | 1811 | f16vec4 textureGatherLodAMD(f16samplerCubeArray sampler, | | 1812 | vec4 P, float lod [, int comp]) | | 1813 | f16vec4 textureGatherLodAMD(f16samplerCubeArray sampler, | | 1814 | f16vec4 P, float16_t lod | | 1815 | [, int comp]) | | 1816 +--------------------------------------------------------------+------------------------------+ 1817 | f16vec4 textureGatherLodOffsetAMD(f16sampler2D sampler, | Perform a texture gather | 1818 | vec2 P, float lod, | operation as in | 1819 | ivec2 offset [, int comp]) | textureGatherOffset() but | 1820 | f16vec4 textureGatherLodOffsetAMD(f16sampler2D sampler, | with explicit LOD. | 1821 | f16vec2 P, float16_t lod, | | 1822 | ivec2 offset [, int comp]) | | 1823 | f16vec4 textureGatherLodOffsetAMD(f16sampler2DArray sampler, | | 1824 | vec3 P, float lod, | | 1825 | ivec2 offset [, int comp]) | | 1826 | f16vec4 textureGatherLodOffsetAMD(f16sampler2DArray sampler, | | 1827 | f16vec3 P, float16_t lod, | | 1828 | ivec2 offset [, int comp]) | | 1829 +--------------------------------------------------------------+------------------------------+ 1830 | f16vec4 textureGatherLodOffsetsAMD(f16sampler2D sampler, | Perform a texture gather | 1831 | vec2 P, float lod, | operation as in | 1832 | ivec2 offsets[4] | textureGatherOffsets() but | 1833 | [, int comp]) | with explicit LOD. | 1834 | f16vec4 textureGatherLodOffsetsAMD(f16sampler2D sampler, | | 1835 | f16vec2 P, float16_t lod, | | 1836 | ivec2 offsets[4] | | 1837 | [, int comp]) | | 1838 | f16vec4 textureGatherLodOffsetsAMD(f16sampler2DArray sampler,| | 1839 | vec3 P, float lod, | | 1840 | ivec2 offsets[4] | | 1841 | [, int comp]) | | 1842 | f16vec4 textureGatherLodOffsetsAMD(f16sampler2DArray sampler,| | 1843 | f16vec3 P, float16_t lod, | | 1844 | ivec2 offsets[4] | | 1845 | [, int comp]) | | 1846 +--------------------------------------------------------------+------------------------------+ 1847 1848 If the shader enables both AMD_texture_gather_bias_lod and ARB_sparse_texture2, this extension 1849 adds additional sparse texture gather functions, whose prototypes are different from those 1850 existing ones. 1851 1852 +--------------------------------------------------------------+------------------------------+ 1853 | Syntax | Description | 1854 +--------------------------------------------------------------+------------------------------+ 1855 | int sparseTextureGatherARB(f16sampler2D sampler, vec2 P, | Do a texture gather operation| 1856 | out f16vec4 texel [, int comp | as in textureGather(), but | 1857 | [, float bias]]) | return texture access | 1858 | int sparseTextureGatherARB(f16sampler2D sampler, f16vec2 P, | residency information from | 1859 | out f16vec4 texel [, int comp | the function and the filtered| 1860 | [, float16_t bias]]) | lookup result in the out | 1861 | int sparseTextureGatherARB(f16sampler2DArray sampler, | parameter <texel>. | 1862 | vec3 P, out f16vec4 texel | | 1863 | [, int comp [, float bias]]) | | 1864 | int sparseTextureGatherARB(f16sampler2DArray sampler, | | 1865 | f16vec3 P, out f16vec4 texel | | 1866 | [, int comp [, float16_t bias]]) | | 1867 | int sparseTextureGatherARB(f16samplerCube sampler, vec3 P, | | 1868 | out f16vec4 texel [, int comp | | 1869 | [, float bias]]) | | 1870 | int sparseTextureGatherARB(f16samplerCube sampler, f16vec3 P,| | 1871 | out f16vec4 texel [, int comp | | 1872 | [, float16_t bias]]) | | 1873 | int sparseTextureGatherARB(f16samplerCubeArray sampler, | | 1874 | vec4 P, out f16vec4 texel | | 1875 | [, int comp [, float bias]]) | | 1876 | int sparseTextureGatherARB(f16samplerCubeArray sampler, | | 1877 | f16vec4 P, out f16vec4 texel | | 1878 | [, int comp [, float16_t bias]]) | | 1879 +--------------------------------------------------------------+------------------------------+ 1880 | int sparseTextureGatherOffsetARB(f16sampler2D sampler, | Do a texture gather operation| 1881 | vec2 P, ivec2 offset, | as in textureGatherOffset(), | 1882 | out f16vec4 texel | but return texture access | 1883 | [, int comp [, float bias]])| residency information from | 1884 | int sparseTextureGatherOffsetARB(f16sampler2D sampler, | the function and the filtered| 1885 | f16vec2 P, ivec2 offset, | lookup result in the out | 1886 | out f16vec4 texel | parameter <texel>. | 1887 | [, int comp | | 1888 | [, float16_t bias]]) | | 1889 | int sparseTextureGatherOffsetARB(f16sampler2DArray sampler, | | 1890 | vec3 P, ivec2 offset, | | 1891 | out f16vec4 texel | | 1892 | [, int comp [, float bias]])| | 1893 | int sparseTextureGatherOffsetARB(f16sampler2DArray sampler, | | 1894 | f16vec3 P, ivec2 offset, | | 1895 | out f16vec4 texel | | 1896 | [, int comp | | 1897 | [, float16_t bias]]) | | 1898 +--------------------------------------------------------------+------------------------------+ 1899 | int sparseTextureGatherOffsetsARB(f16sampler2D sampler, | Do a texture gather operation| 1900 | vec2 P, ivec2 offsets[4], | as in textureGatherOffsets(),| 1901 | out f16vec4 texel | but return texture access | 1902 | [, int comp | residency information from | 1903 | [, float bias]]) | the function and the filtered| 1904 | int sparseTextureGatherOffsetsARB(f16sampler2D sampler, | lookup result in the out | 1905 | f16vec2 P, | parameter <texel>. | 1906 | ivec2 offsets[4], | | 1907 | out f16vec4 texel | | 1908 | [, int comp | | 1909 | [, float16_t bias]]) | | 1910 | int sparseTextureGatherOffsetsARB(f16sampler2DArray sampler, | | 1911 | vec3 P, ivec2 offsets[4], | | 1912 | out f16vec4 texel | | 1913 | [, int comp | | 1914 | [, float bias]]) | | 1915 | int sparseTextureGatherOffsetsARB(f16sampler2DArray sampler, | | 1916 | f16vec3 P, | | 1917 | ivec2 offsets[4], | | 1918 | out f16vec4 texel | | 1919 | [, int comp | | 1920 | [, float16_t bias]]) | | 1921 +--------------------------------------------------------------+------------------------------+ 1922 | int sparseTextureGatherLodAMD(f16sampler2D sampler, | Do a texture gather operation| 1923 | vec2 P, float lod, | as in textureGather() with, | 1924 | out f16vec4 texel [, int comp])| explicit LOD, but return | 1925 | int sparseTextureGatherLodAMD(f16sampler2D sampler, | texture access residency | 1926 | f16vec2 P, float16_t lod, | information from the function| 1927 | out f16vec4 texel [, int comp])| and the filtered lookup | 1928 | int sparseTextureGatherLodAMD(f16sampler2DArray sampler, | result in the out parameter | 1929 | vec3 P, float lod, | <texel>. | 1930 | out f16vec4 texel [, int comp])| | 1931 | int sparseTextureGatherLodAMD(f16sampler2DArray sampler, | | 1932 | f16vec3 P, float16_t lod, | | 1933 | out f16vec4 texel [, int comp])| | 1934 | int sparseTextureGatherLodAMD(f16samplerCube sampler, | | 1935 | vec3 P, float lod, | | 1936 | out f16vec4 texel [, int comp])| | 1937 | int sparseTextureGatherLodAMD(f16samplerCube sampler, | | 1938 | f16vec3 P, float16_t lod, | | 1939 | out f16vec4 texel [, int comp])| | 1940 | int sparseTextureGatherLodAMD(f16samplerCubeArray sampler, | | 1941 | vec4 P, float lod, | | 1942 | out f16vec4 texel [, int comp])| | 1943 | int sparseTextureGatherLodAMD(f16samplerCubeArray sampler, | | 1944 | f16vec4 P, float16_t lod, | | 1945 | out f16vec4 texel [, int comp])| | 1946 +--------------------------------------------------------------+------------------------------+ 1947 | int sparseTextureGatherLodOffsetAMD(f16sampler2D sampler, | Do a texture gather operation| 1948 | vec2 P, float lod, | as in textureGatherOffset() | 1949 | ivec2 offset, | with explicit LOD, but return| 1950 | out f16vec4 texel | texture access residency | 1951 | [, int comp]) | information from the function| 1952 | int sparseTextureGatherLodOffsetAMD(f16sampler2D sampler, | and the filtered lookup | 1953 | f16vec2 P, float16_t lod,| result in the out parameter | 1954 | ivec2 offset, | <texel>. | 1955 | out f16vec4 texel | | 1956 | [, int comp]) | | 1957 | int sparseTextureGatherLodOffsetAMD(f16sampler2DArray | | 1958 | sampler, vec3 P, | | 1959 | float lod, | | 1960 | ivec2 offset, | | 1961 | out f16vec4 texel | | 1962 | [, int comp]) | | 1963 | int sparseTextureGatherLodOffsetAMD(f16sampler2DArray | | 1964 | sampler, f16vec3 P, | | 1965 | float16_t lod, | | 1966 | ivec2 offset, | | 1967 | out f16vec4 texel | | 1968 | [, int comp]) | | 1969 +--------------------------------------------------------------+------------------------------+ 1970 | int sparseTextureGatherLodOffsetsAMD(f16sampler2D sampler, | Do a texture gather operation| 1971 | vec2 P, float lod, | as in textureGatherOffsets() | 1972 | ivec2 offsets[4], | with explicit LOD, but return| 1973 | out f16vec4 texel | texture access residency | 1974 | [, int comp]) | information from the function| 1975 | int sparseTextureGatherLodOffsetsAMD(f16sampler2D sampler, | and the filtered lookup | 1976 | f16vec2 P, | result in the out parameter | 1977 | float16_t lod, | <texel>. | 1978 | ivec2 offsets[4], | | 1979 | out f16vec4 texel | | 1980 | [, int comp]) | | 1981 | int sparseTextureGatherLodOffsetsAMD(f16sampler2DArray | | 1982 | sampler, vec3 P, | | 1983 | float lod, | | 1984 | ivec2 offsets[4], | | 1985 | out f16vec4 texel | | 1986 | [, int comp]) | | 1987 | int sparseTextureGatherLodOffsetsAMD(f16sampler2DArray | | 1988 | sampler, f16vec3 P, | | 1989 | float16_t lod, | | 1990 | ivec2 offsets[4], | | 1991 | out f16vec4 texel | | 1992 | [, int comp]) | | 1993 +--------------------------------------------------------------+------------------------------+ 1994 1995Errors 1996 1997 None. 1998 1999New State 2000 2001 None. 2002 2003New Implementation Dependent State 2004 2005 None. 2006 2007Issues 2008 2009 (1) What is the intention of this extension? 2010 2011 RESOLVED: This extension is designed to support half-precision floating-point fetch 2012 operations in shader texture functions and shader image memory functions. We define new 2013 opaque types and built-in functions to achieve this goal and minimize type conversion between 2014 single-precision and half-precision floating-point. Data types, other than opaque sampler and 2015 image types, that could be half float include: texture lookup result, float texture 2016 coordinates, explicit float LOD, LOD bias, minimum LOD clamp, input data for image store, 2017 output data from image load. 2018 2019 (2) I see there are two half-precision floating-point forms for the same texture lookup 2020 function, why? 2021 2022 RESOLVED: The difference between these two forms are: in the one form, only texture lookup 2023 result and opaque sampler types are half-precision floating-point while in the other form, 2024 other arguments become half-precision floating-point as well, such as texture coordinates, 2025 explicit LOD, LOD bias, and minimum LOD clamp. The motive is to provide flexibility for the 2026 shader and to minimize type conversion that might be involved. 2027 2028 Still, you have to pay special attention to the depth reference value (denoted as <compare> 2029 or <refZ> in the function syntax). They are always single float typed. We do not want to 2030 introduce unexpected incorrectness of depth comparison because of insufficient precision of 2031 the depth reference value. 2032 2033Revision History 2034 2035 Rev. Date Author Changes 2036 ---- -------- -------- --------------------------------------------------------------------- 2037 6 3/9/18 rexu Add some missing function prototypes when this extension interacts 2038 with AMD_texture_gather_bias_lod. 2039 2040 5 9/20/17 dwitczak Fix incorrect definitions of some of the textureClampARB(), 2041 textureGradClampARB(), textureLod() and textureProjLodOffset() 2042 function prototypes. Remove duplicate function prototype definitions. 2043 2044 4 11/24/16 rexu Clarify that when <compare> is present in shadow forms of 2045 textureProj*(), the resulting <compare>, by divding its initial value 2046 with the last component of <P>, is used as <Dref>. 2047 2048 3 11/21/16 rexu Add the interaction with AMD_texture_gather_bias_lod. 2049 2050 2 11/14/16 rexu Rename this extension from AMD_gpu_shader_half_float_texture to 2051 AMD_gpu_shader_half_float_fetch. The former name is somewhat 2052 confusing, which could also refer to F16 texture internal format used 2053 in OpenGL APIs. Clarify that when half-precision floating-point 2054 opaque types are used in shader texture functions and shader image 2055 memory functions, the results are half-precision if they are 2056 floating-point typed. 2057 2058 1 11/03/16 rexu Initial draft. 2059