1#version 450 core 2 3#extension GL_ARB_sparse_texture2: enable 4#extension GL_ARB_sparse_texture_clamp: enable 5#extension GL_AMD_gpu_shader_half_float: enable 6#extension GL_AMD_gpu_shader_half_float_fetch: enable 7#extension GL_AMD_texture_gather_bias_lod: enable 8 9layout(set = 0, binding = 0) uniform f16sampler1D s1D; 10layout(set = 0, binding = 1) uniform f16sampler2D s2D; 11layout(set = 0, binding = 2) uniform f16sampler3D s3D; 12layout(set = 0, binding = 3) uniform f16sampler2DRect s2DRect; 13layout(set = 0, binding = 4) uniform f16samplerCube sCube; 14layout(set = 0, binding = 5) uniform f16samplerBuffer sBuffer; 15layout(set = 0, binding = 6) uniform f16sampler2DMS s2DMS; 16layout(set = 0, binding = 7) uniform f16sampler1DArray s1DArray; 17layout(set = 0, binding = 8) uniform f16sampler2DArray s2DArray; 18layout(set = 0, binding = 9) uniform f16samplerCubeArray sCubeArray; 19layout(set = 0, binding = 10) uniform f16sampler2DMSArray s2DMSArray; 20 21layout(set = 0, binding = 11) uniform f16sampler1DShadow s1DShadow; 22layout(set = 0, binding = 12) uniform f16sampler2DShadow s2DShadow; 23layout(set = 0, binding = 13) uniform f16sampler2DRectShadow s2DRectShadow; 24layout(set = 0, binding = 14) uniform f16samplerCubeShadow sCubeShadow; 25layout(set = 0, binding = 15) uniform f16sampler1DArrayShadow s1DArrayShadow; 26layout(set = 0, binding = 16) uniform f16sampler2DArrayShadow s2DArrayShadow; 27layout(set = 0, binding = 17) uniform f16samplerCubeArrayShadow sCubeArrayShadow; 28 29layout(set = 1, binding = 0) layout(rgba16f) uniform f16image1D i1D; 30layout(set = 1, binding = 1) layout(rgba16f) uniform f16image2D i2D; 31layout(set = 1, binding = 2) layout(rgba16f) uniform f16image3D i3D; 32layout(set = 1, binding = 3) layout(rgba16f) uniform f16image2DRect i2DRect; 33layout(set = 1, binding = 4) layout(rgba16f) uniform f16imageCube iCube; 34layout(set = 1, binding = 5) layout(rgba16f) uniform f16image1DArray i1DArray; 35layout(set = 1, binding = 6) layout(rgba16f) uniform f16image2DArray i2DArray; 36layout(set = 1, binding = 7) layout(rgba16f) uniform f16imageCubeArray iCubeArray; 37layout(set = 1, binding = 8) layout(rgba16f) uniform f16imageBuffer iBuffer; 38layout(set = 1, binding = 9) layout(rgba16f) uniform f16image2DMS i2DMS; 39layout(set = 1, binding = 10) layout(rgba16f) uniform f16image2DMSArray i2DMSArray; 40 41layout(set = 2, binding = 0) uniform f16texture1D t1D; 42layout(set = 2, binding = 1) uniform f16texture2D t2D; 43layout(set = 2, binding = 2) uniform f16texture3D t3D; 44layout(set = 2, binding = 3) uniform f16texture2DRect t2DRect; 45layout(set = 2, binding = 4) uniform f16textureCube tCube; 46layout(set = 2, binding = 5) uniform f16texture1DArray t1DArray; 47layout(set = 2, binding = 6) uniform f16texture2DArray t2DArray; 48layout(set = 2, binding = 7) uniform f16textureCubeArray tCubeArray; 49layout(set = 2, binding = 8) uniform f16textureBuffer tBuffer; 50layout(set = 2, binding = 9) uniform f16texture2DMS t2DMS; 51layout(set = 2, binding = 10) uniform f16texture2DMSArray t2DMSArray; 52 53layout(set = 2, binding = 11) uniform sampler s; 54layout(set = 2, binding = 12) uniform samplerShadow sShadow; 55 56layout(set = 3, binding = 0, input_attachment_index = 0) uniform f16subpassInput subpass; 57layout(set = 3, binding = 1, input_attachment_index = 0) uniform f16subpassInputMS subpassMS; 58 59layout(location = 0) in float c1; 60layout(location = 1) in vec2 c2; 61layout(location = 2) in vec3 c3; 62layout(location = 3) in vec4 c4; 63 64layout(location = 4) in float compare; 65layout(location = 5) in float lod; 66layout(location = 6) in float bias; 67layout(location = 7) in float lodClamp; 68 69layout(location = 8) in float dPdxy1; 70layout(location = 9) in vec2 dPdxy2; 71layout(location = 10) in vec3 dPdxy3; 72 73layout(location = 11) in float16_t f16c1; 74layout(location = 12) in f16vec2 f16c2; 75layout(location = 13) in f16vec3 f16c3; 76layout(location = 14) in f16vec4 f16c4; 77 78layout(location = 15) in float16_t f16lod; 79layout(location = 16) in float16_t f16bias; 80layout(location = 17) in float16_t f16lodClamp; 81 82layout(location = 18) in float16_t f16dPdxy1; 83layout(location = 19) in f16vec2 f16dPdxy2; 84layout(location = 20) in f16vec3 f16dPdxy3; 85 86const int offset1 = 1; 87const ivec2 offset2 = ivec2(1); 88const ivec3 offset3 = ivec3(1); 89const ivec2 offsets[4] = { offset2, offset2, offset2, offset2 }; 90 91layout(location = 0) out vec4 fragColor; 92 93f16vec4 testTexture() 94{ 95 f16vec4 texel = f16vec4(0.0hf); 96 97 texel += texture(s1D, c1); 98 texel += texture(s1D, f16c1, f16bias); 99 texel += texture(s2D, c2); 100 texel += texture(s2D, f16c2, f16bias); 101 texel += texture(s3D, c3); 102 texel += texture(s3D, f16c3, f16bias); 103 texel += texture(sCube, c3); 104 texel += texture(sCube, f16c3, f16bias); 105 texel.x += texture(s1DShadow, c3); 106 texel.x += texture(s1DShadow, f16c2, compare, f16bias); 107 texel.x += texture(s2DShadow, c3); 108 texel.x += texture(s2DShadow, f16c2, compare, f16bias); 109 texel.x += texture(sCubeShadow, c4); 110 texel.x += texture(sCubeShadow, f16c3, compare, f16bias); 111 texel += texture(s1DArray, c2); 112 texel += texture(s1DArray, f16c2, f16bias); 113 texel += texture(s2DArray, c3); 114 texel += texture(s2DArray, f16c3, f16bias); 115 texel += texture(sCubeArray, c4); 116 texel += texture(sCubeArray, f16c4, f16bias); 117 texel.x += texture(s1DArrayShadow, c3); 118 texel.x += texture(s1DArrayShadow, f16c2, compare, f16bias); 119 texel.x += texture(s2DArrayShadow, c4); 120 texel.x += texture(s2DArrayShadow, f16c3, compare); 121 texel += texture(s2DRect, c2); 122 texel += texture(s2DRect, f16c2); 123 texel.x += texture(s2DRectShadow, c3); 124 texel.x += texture(s2DRectShadow, f16c2, compare); 125 texel.x += texture(sCubeArrayShadow, c4, compare); 126 texel.x += texture(sCubeArrayShadow, f16c4, compare); 127 128 return texel; 129} 130 131f16vec4 testTextureProj() 132{ 133 f16vec4 texel = f16vec4(0.0hf); 134 135 texel += textureProj(s1D, c2); 136 texel += textureProj(s1D, f16c2, f16bias); 137 texel += textureProj(s1D, c4); 138 texel += textureProj(s1D, f16c4, f16bias); 139 texel += textureProj(s2D, c3); 140 texel += textureProj(s2D, f16c3, f16bias); 141 texel += textureProj(s2D, c4); 142 texel += textureProj(s2D, f16c4, f16bias); 143 texel += textureProj(s3D, c4); 144 texel += textureProj(s3D, f16c4, f16bias); 145 texel.x += textureProj(s1DShadow, c4); 146 texel.x += textureProj(s1DShadow, f16c3, compare, f16bias); 147 texel.x += textureProj(s2DShadow, c4); 148 texel.x += textureProj(s2DShadow, f16c3, compare, f16bias); 149 texel += textureProj(s2DRect, c3); 150 texel += textureProj(s2DRect, f16c3); 151 texel += textureProj(s2DRect, c4); 152 texel += textureProj(s2DRect, f16c4); 153 texel.x += textureProj(s2DRectShadow, c4); 154 texel.x += textureProj(s2DRectShadow, f16c3, compare); 155 156 return texel; 157} 158 159f16vec4 testTextureLod() 160{ 161 f16vec4 texel = f16vec4(0.0hf); 162 163 texel += textureLod(s1D, c1, lod); 164 texel += textureLod(s1D, f16c1, f16lod); 165 texel += textureLod(s2D, c2, lod); 166 texel += textureLod(s2D, f16c2, f16lod); 167 texel += textureLod(s3D, c3, lod); 168 texel += textureLod(s3D, f16c3, f16lod); 169 texel += textureLod(sCube, c3, lod); 170 texel += textureLod(sCube, f16c3, f16lod); 171 texel.x += textureLod(s1DShadow, c3, lod); 172 texel.x += textureLod(s1DShadow, f16c2, compare, f16lod); 173 texel.x += textureLod(s2DShadow, c3, lod); 174 texel.x += textureLod(s2DShadow, f16c2, compare, f16lod); 175 texel += textureLod(s1DArray, c2, lod); 176 texel += textureLod(s1DArray, f16c2, f16lod); 177 texel += textureLod(s2DArray, c3, lod); 178 texel += textureLod(s2DArray, f16c3, f16lod); 179 texel.x += textureLod(s1DArrayShadow, c3, lod); 180 texel.x += textureLod(s1DArrayShadow, f16c2, compare, f16lod); 181 texel += textureLod(sCubeArray, c4, lod); 182 texel += textureLod(sCubeArray, f16c4, f16lod); 183 184 return texel; 185} 186 187f16vec4 testTextureOffset() 188{ 189 f16vec4 texel = f16vec4(0.0hf); 190 191 texel += textureOffset(s1D, c1, offset1); 192 texel += textureOffset(s1D, f16c1, offset1, f16bias); 193 texel += textureOffset(s2D, c2, offset2); 194 texel += textureOffset(s2D, f16c2, offset2, f16bias); 195 texel += textureOffset(s3D, c3, offset3); 196 texel += textureOffset(s3D, f16c3, offset3, f16bias); 197 texel += textureOffset(s2DRect, c2, offset2); 198 texel += textureOffset(s2DRect, f16c2, offset2); 199 texel.x += textureOffset(s2DRectShadow, c3, offset2); 200 texel.x += textureOffset(s2DRectShadow, f16c2, compare, offset2); 201 texel.x += textureOffset(s1DShadow, c3, offset1); 202 texel.x += textureOffset(s1DShadow, f16c2, compare, offset1, f16bias); 203 texel.x += textureOffset(s2DShadow, c3, offset2); 204 texel.x += textureOffset(s2DShadow, f16c2, compare, offset2, f16bias); 205 texel += textureOffset(s1DArray, c2, offset1); 206 texel += textureOffset(s1DArray, f16c2, offset1, f16bias); 207 texel += textureOffset(s2DArray, c3, offset2); 208 texel += textureOffset(s2DArray, f16c3, offset2, f16bias); 209 texel.x += textureOffset(s1DArrayShadow, c3, offset1); 210 texel.x += textureOffset(s1DArrayShadow, f16c2, compare, offset1, f16bias); 211 texel.x += textureOffset(s2DArrayShadow, c4, offset2); 212 texel.x += textureOffset(s2DArrayShadow, f16c3, compare, offset2); 213 214 return texel; 215} 216 217f16vec4 testTextureProjOffset() 218{ 219 f16vec4 texel = f16vec4(0.0hf); 220 221 texel += textureProjOffset(s1D, c2, offset1); 222 texel += textureProjOffset(s1D, f16c2, offset1, f16bias); 223 texel += textureProjOffset(s1D, c4, offset1); 224 texel += textureProjOffset(s1D, f16c4, offset1, f16bias); 225 texel += textureProjOffset(s2D, c3, offset2); 226 texel += textureProjOffset(s2D, f16c3, offset2, f16bias); 227 texel += textureProjOffset(s2D, c4, offset2); 228 texel += textureProjOffset(s2D, f16c4, offset2, f16bias); 229 texel += textureProjOffset(s3D, c4, offset3); 230 texel += textureProjOffset(s3D, f16c4, offset3, f16bias); 231 texel += textureProjOffset(s2DRect, c3, offset2); 232 texel += textureProjOffset(s2DRect, f16c3, offset2); 233 texel += textureProjOffset(s2DRect, c4, offset2); 234 texel += textureProjOffset(s2DRect, f16c4, offset2); 235 texel.x += textureProjOffset(s2DRectShadow, c4, offset2); 236 texel.x += textureProjOffset(s2DRectShadow, f16c3, compare, offset2); 237 texel.x += textureProjOffset(s1DShadow, c4, offset1); 238 texel.x += textureProjOffset(s1DShadow, f16c3, compare, offset1, f16bias); 239 texel.x += textureProjOffset(s2DShadow, c4, offset2); 240 texel.x += textureProjOffset(s2DShadow, f16c3, compare, offset2, f16bias); 241 242 return texel; 243} 244 245f16vec4 testTextureLodOffset() 246{ 247 f16vec4 texel = f16vec4(0.0hf); 248 249 texel += textureLodOffset(s1D, c1, lod, offset1); 250 texel += textureLodOffset(s1D, f16c1, f16lod, offset1); 251 texel += textureLodOffset(s2D, c2, lod, offset2); 252 texel += textureLodOffset(s2D, f16c2, f16lod, offset2); 253 texel += textureLodOffset(s3D, c3, lod, offset3); 254 texel += textureLodOffset(s3D, f16c3, f16lod, offset3); 255 texel.x += textureLodOffset(s1DShadow, c3, lod, offset1); 256 texel.x += textureLodOffset(s1DShadow, f16c2, compare, f16lod, offset1); 257 texel.x += textureLodOffset(s2DShadow, c3, lod, offset2); 258 texel.x += textureLodOffset(s2DShadow, f16c2, compare, f16lod, offset2); 259 texel += textureLodOffset(s1DArray, c2, lod, offset1); 260 texel += textureLodOffset(s1DArray, f16c2, f16lod, offset1); 261 texel += textureLodOffset(s2DArray, c3, lod, offset2); 262 texel += textureLodOffset(s2DArray, f16c3, f16lod, offset2); 263 texel.x += textureLodOffset(s1DArrayShadow, c3, lod, offset1); 264 texel.x += textureLodOffset(s1DArrayShadow, f16c2, compare, f16lod, offset1); 265 266 return texel; 267} 268 269f16vec4 testTextureProjLodOffset() 270{ 271 f16vec4 texel = f16vec4(0.0hf); 272 273 texel += textureProjLodOffset(s1D, c2, lod, offset1); 274 texel += textureProjLodOffset(s1D, f16c2, f16lod, offset1); 275 texel += textureProjLodOffset(s1D, c4, lod, offset1); 276 texel += textureProjLodOffset(s1D, f16c4, f16lod, offset1); 277 texel += textureProjLodOffset(s2D, c3, lod, offset2); 278 texel += textureProjLodOffset(s2D, f16c3, f16lod, offset2); 279 texel += textureProjLodOffset(s2D, c4, lod, offset2); 280 texel += textureProjLodOffset(s2D, f16c4, f16lod, offset2); 281 texel += textureProjLodOffset(s3D, c4, lod, offset3); 282 texel += textureProjLodOffset(s3D, f16c4, f16lod, offset3); 283 texel.x += textureProjLodOffset(s1DShadow, c4, lod, offset1); 284 texel.x += textureProjLodOffset(s1DShadow, f16c3, compare, f16lod, offset1); 285 texel.x += textureProjLodOffset(s2DShadow, c4, lod, offset2); 286 texel.x += textureProjLodOffset(s2DShadow, f16c3, compare, f16lod, offset2); 287 288 return texel; 289} 290 291f16vec4 testTexelFetch() 292{ 293 f16vec4 texel = f16vec4(0.0hf); 294 295 texel += texelFetch(s1D, int(c1), int(lod)); 296 texel += texelFetch(s2D, ivec2(c2), int(lod)); 297 texel += texelFetch(s3D, ivec3(c3), int(lod)); 298 texel += texelFetch(s2DRect, ivec2(c2)); 299 texel += texelFetch(s1DArray, ivec2(c2), int(lod)); 300 texel += texelFetch(s2DArray, ivec3(c3), int(lod)); 301 texel += texelFetch(sBuffer, int(c1)); 302 texel += texelFetch(s2DMS, ivec2(c2), 1); 303 texel += texelFetch(s2DMSArray, ivec3(c3), 2); 304 305 return texel; 306} 307 308f16vec4 testTexelFetchOffset() 309{ 310 f16vec4 texel = f16vec4(0.0hf); 311 312 texel += texelFetchOffset(s1D, int(c1), int(lod), offset1); 313 texel += texelFetchOffset(s2D, ivec2(c2), int(lod), offset2); 314 texel += texelFetchOffset(s3D, ivec3(c3), int(lod), offset3); 315 texel += texelFetchOffset(s2DRect, ivec2(c2), offset2); 316 texel += texelFetchOffset(s1DArray, ivec2(c2), int(lod), offset1); 317 texel += texelFetchOffset(s2DArray, ivec3(c3), int(lod), offset2); 318 319 return texel; 320} 321 322f16vec4 testTextureGrad() 323{ 324 f16vec4 texel = f16vec4(0.0hf); 325 326 texel += textureGrad(s1D, c1, dPdxy1, dPdxy1); 327 texel += textureGrad(s1D, f16c1, f16dPdxy1, f16dPdxy1); 328 texel += textureGrad(s2D, c2, dPdxy2, dPdxy2); 329 texel += textureGrad(s2D, f16c2, f16dPdxy2, f16dPdxy2); 330 texel += textureGrad(s3D, c3, dPdxy3, dPdxy3); 331 texel += textureGrad(s3D, f16c3, f16dPdxy3, f16dPdxy3); 332 texel += textureGrad(sCube, c3, dPdxy3, dPdxy3); 333 texel += textureGrad(sCube, f16c3, f16dPdxy3, f16dPdxy3); 334 texel += textureGrad(s2DRect, c2, dPdxy2, dPdxy2); 335 texel += textureGrad(s2DRect, f16c2, f16dPdxy2, f16dPdxy2); 336 texel.x += textureGrad(s2DRectShadow, c3, dPdxy2, dPdxy2); 337 texel.x += textureGrad(s2DRectShadow, f16c2, compare, f16dPdxy2, f16dPdxy2); 338 texel.x += textureGrad(s1DShadow, c3, dPdxy1, dPdxy1); 339 texel.x += textureGrad(s1DShadow, f16c2, compare, f16dPdxy1, f16dPdxy1); 340 texel.x += textureGrad(s2DShadow, c3, dPdxy2, dPdxy2); 341 texel.x += textureGrad(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2); 342 texel.x += textureGrad(sCubeShadow, c4, dPdxy3, dPdxy3); 343 texel.x += textureGrad(sCubeShadow, f16c3, compare, f16dPdxy3, f16dPdxy3); 344 texel += textureGrad(s1DArray, c2, dPdxy1, dPdxy1); 345 texel += textureGrad(s1DArray, f16c2, f16dPdxy1, f16dPdxy1); 346 texel += textureGrad(s2DArray, c3, dPdxy2, dPdxy2); 347 texel += textureGrad(s2DArray, f16c3, f16dPdxy2, f16dPdxy2); 348 texel.x += textureGrad(s1DArrayShadow, c3, dPdxy1, dPdxy1); 349 texel.x += textureGrad(s1DArrayShadow, f16c2, compare, f16dPdxy1, f16dPdxy1); 350 texel.x += textureGrad(s2DArrayShadow, c4, dPdxy2, dPdxy2); 351 texel.x += textureGrad(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2); 352 texel += textureGrad(sCubeArray, c4, dPdxy3, dPdxy3); 353 texel += textureGrad(sCubeArray, f16c4, f16dPdxy3, f16dPdxy3); 354 355 return texel; 356} 357 358f16vec4 testTextureGradOffset() 359{ 360 f16vec4 texel = f16vec4(0.0hf); 361 362 texel += textureGradOffset(s1D, c1, dPdxy1, dPdxy1, offset1); 363 texel += textureGradOffset(s1D, f16c1, f16dPdxy1, f16dPdxy1, offset1); 364 texel += textureGradOffset(s2D, c2, dPdxy2, dPdxy2, offset2); 365 texel += textureGradOffset(s2D, f16c2, f16dPdxy2, f16dPdxy2, offset2); 366 texel += textureGradOffset(s3D, c3, dPdxy3, dPdxy3, offset3); 367 texel += textureGradOffset(s3D, f16c3, f16dPdxy3, f16dPdxy3, offset3); 368 texel += textureGradOffset(s2DRect, c2, dPdxy2, dPdxy2, offset2); 369 texel += textureGradOffset(s2DRect, f16c2, f16dPdxy2, f16dPdxy2, offset2); 370 texel.x += textureGradOffset(s2DRectShadow, c3, dPdxy2, dPdxy2, offset2); 371 texel.x += textureGradOffset(s2DRectShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, offset2); 372 texel.x += textureGradOffset(s1DShadow, c3, dPdxy1, dPdxy1, offset1); 373 texel.x += textureGradOffset(s1DShadow, f16c2, compare, f16dPdxy1, f16dPdxy1, offset1); 374 texel.x += textureGradOffset(s2DShadow, c3, dPdxy2, dPdxy2, offset2); 375 texel.x += textureGradOffset(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, offset2); 376 texel += textureGradOffset(s1DArray, c2, dPdxy1, dPdxy1, offset1); 377 texel += textureGradOffset(s1DArray, f16c2, f16dPdxy1, f16dPdxy1, offset1); 378 texel += textureGradOffset(s2DArray, c3, dPdxy2, dPdxy2, offset2); 379 texel += textureGradOffset(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, offset2); 380 texel.x += textureGradOffset(s1DArrayShadow, c3, dPdxy1, dPdxy1, offset1); 381 texel.x += textureGradOffset(s1DArrayShadow, f16c2, compare, f16dPdxy1, f16dPdxy1, offset1); 382 texel.x += textureGradOffset(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2); 383 texel.x += textureGradOffset(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, offset2); 384 385 return texel; 386} 387 388f16vec4 testTextureProjGrad() 389{ 390 f16vec4 texel = f16vec4(0.0hf); 391 392 texel += textureProjGrad(s1D, c2, dPdxy1, dPdxy1); 393 texel += textureProjGrad(s1D, f16c2, f16dPdxy1, f16dPdxy1); 394 texel += textureProjGrad(s1D, c4, dPdxy1, dPdxy1); 395 texel += textureProjGrad(s1D, f16c4, f16dPdxy1, f16dPdxy1); 396 texel += textureProjGrad(s2D, c3, dPdxy2, dPdxy2); 397 texel += textureProjGrad(s2D, f16c3, f16dPdxy2, f16dPdxy2); 398 texel += textureProjGrad(s2D, c4, dPdxy2, dPdxy2); 399 texel += textureProjGrad(s2D, f16c4, f16dPdxy2, f16dPdxy2); 400 texel += textureProjGrad(s3D, c4, dPdxy3, dPdxy3); 401 texel += textureProjGrad(s3D, f16c4, f16dPdxy3, f16dPdxy3); 402 texel += textureProjGrad(s2DRect, c3, dPdxy2, dPdxy2); 403 texel += textureProjGrad(s2DRect, f16c3, f16dPdxy2, f16dPdxy2); 404 texel += textureProjGrad(s2DRect, c4, dPdxy2, dPdxy2); 405 texel += textureProjGrad(s2DRect, f16c4, f16dPdxy2, f16dPdxy2); 406 texel.x += textureProjGrad(s2DRectShadow, c4, dPdxy2, dPdxy2); 407 texel.x += textureProjGrad(s2DRectShadow, f16c3, compare, f16dPdxy2, f16dPdxy2); 408 texel.x += textureProjGrad(s1DShadow, c4, dPdxy1, dPdxy1); 409 texel.x += textureProjGrad(s1DShadow, f16c3, compare, f16dPdxy1, f16dPdxy1); 410 texel.x += textureProjGrad(s2DShadow, c4, dPdxy2, dPdxy2); 411 texel.x += textureProjGrad(s2DShadow, f16c3, compare, f16dPdxy2, f16dPdxy2); 412 413 return texel; 414} 415 416f16vec4 testTextureProjGradoffset() 417{ 418 f16vec4 texel = f16vec4(0.0hf); 419 420 texel += textureProjGradOffset(s1D, c2, dPdxy1, dPdxy1, offset1); 421 texel += textureProjGradOffset(s1D, f16c2, f16dPdxy1, f16dPdxy1, offset1); 422 texel += textureProjGradOffset(s1D, c4, dPdxy1, dPdxy1, offset1); 423 texel += textureProjGradOffset(s1D, f16c4, f16dPdxy1, f16dPdxy1, offset1); 424 texel += textureProjGradOffset(s2D, c3, dPdxy2, dPdxy2, offset2); 425 texel += textureProjGradOffset(s2D, f16c3, f16dPdxy2, f16dPdxy2, offset2); 426 texel += textureProjGradOffset(s2D, c4, dPdxy2, dPdxy2, offset2); 427 texel += textureProjGradOffset(s2D, f16c4, f16dPdxy2, f16dPdxy2, offset2); 428 texel += textureProjGradOffset(s2DRect, c3, dPdxy2, dPdxy2, offset2); 429 texel += textureProjGradOffset(s2DRect, f16c3, f16dPdxy2, f16dPdxy2, offset2); 430 texel += textureProjGradOffset(s2DRect, c4, dPdxy2, dPdxy2, offset2); 431 texel += textureProjGradOffset(s2DRect, f16c4, f16dPdxy2, f16dPdxy2, offset2); 432 texel.x += textureProjGradOffset(s2DRectShadow, c4, dPdxy2, dPdxy2, offset2); 433 texel.x += textureProjGradOffset(s2DRectShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, offset2); 434 texel += textureProjGradOffset(s3D, c4, dPdxy3, dPdxy3, offset3); 435 texel += textureProjGradOffset(s3D, f16c4, f16dPdxy3, f16dPdxy3, offset3); 436 texel.x += textureProjGradOffset(s1DShadow, c4, dPdxy1, dPdxy1, offset1); 437 texel.x += textureProjGradOffset(s1DShadow, f16c3, compare, f16dPdxy1, f16dPdxy1, offset1); 438 texel.x += textureProjGradOffset(s2DShadow, c4, dPdxy2, dPdxy2, offset2); 439 texel.x += textureProjGradOffset(s2DShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, offset2); 440 441 return texel; 442} 443 444f16vec4 testTextureGather() 445{ 446 f16vec4 texel = f16vec4(0.0hf); 447 448 texel += textureGather(s2D, c2, 0); 449 texel += textureGather(s2D, f16c2, 0, f16bias); 450 texel += textureGather(s2DArray, c3, 0); 451 texel += textureGather(s2DArray, f16c3, 0, f16bias); 452 texel += textureGather(sCube, c3, 0); 453 texel += textureGather(sCube, f16c3, 0, f16bias); 454 texel += textureGather(sCubeArray, c4, 0); 455 texel += textureGather(sCubeArray, f16c4, 0, f16bias); 456 texel += textureGather(s2DRect, c2, 0); 457 texel += textureGather(s2DRect, f16c2, 0); 458 texel += textureGather(s2DShadow, c2, compare); 459 texel += textureGather(s2DShadow, f16c2, compare); 460 texel += textureGather(s2DArrayShadow, c3, compare); 461 texel += textureGather(s2DArrayShadow, f16c3, compare); 462 texel += textureGather(sCubeShadow, c3, compare); 463 texel += textureGather(sCubeShadow, f16c3, compare); 464 texel += textureGather(sCubeArrayShadow, c4, compare); 465 texel += textureGather(sCubeArrayShadow, f16c4, compare); 466 texel += textureGather(s2DRectShadow, c2, compare); 467 texel += textureGather(s2DRectShadow, f16c2, compare); 468 469 return texel; 470} 471 472f16vec4 testTextureGatherOffset() 473{ 474 f16vec4 texel = f16vec4(0.0hf); 475 476 texel += textureGatherOffset(s2D, c2, offset2, 0); 477 texel += textureGatherOffset(s2D, f16c2, offset2, 0, f16bias); 478 texel += textureGatherOffset(s2DArray, c3, offset2, 0); 479 texel += textureGatherOffset(s2DArray, f16c3, offset2, 0, f16bias); 480 texel += textureGatherOffset(s2DRect, c2, offset2, 0); 481 texel += textureGatherOffset(s2DRect, f16c2, offset2, 0); 482 texel += textureGatherOffset(s2DShadow, c2, compare, offset2); 483 texel += textureGatherOffset(s2DShadow, f16c2, compare, offset2); 484 texel += textureGatherOffset(s2DArrayShadow, c3, compare, offset2); 485 texel += textureGatherOffset(s2DArrayShadow, f16c3, compare, offset2); 486 texel += textureGatherOffset(s2DRectShadow, c2, compare, offset2); 487 texel += textureGatherOffset(s2DRectShadow, f16c2, compare, offset2); 488 489 return texel; 490} 491 492f16vec4 testTextureGatherOffsets() 493{ 494 f16vec4 texel = f16vec4(0.0hf); 495 496 texel += textureGatherOffsets(s2D, c2, offsets, 0); 497 texel += textureGatherOffsets(s2D, f16c2, offsets, 0, f16bias); 498 texel += textureGatherOffsets(s2DArray, c3, offsets, 0); 499 texel += textureGatherOffsets(s2DArray, f16c3, offsets, 0, f16bias); 500 texel += textureGatherOffsets(s2DRect, c2, offsets, 0); 501 texel += textureGatherOffsets(s2DRect, f16c2, offsets, 0); 502 texel += textureGatherOffsets(s2DShadow, c2, compare, offsets); 503 texel += textureGatherOffsets(s2DShadow, f16c2, compare, offsets); 504 texel += textureGatherOffsets(s2DArrayShadow, c3, compare, offsets); 505 texel += textureGatherOffsets(s2DArrayShadow, f16c3, compare, offsets); 506 texel += textureGatherOffsets(s2DRectShadow, c2, compare, offsets); 507 texel += textureGatherOffsets(s2DRectShadow, f16c2, compare, offsets); 508 509 return texel; 510} 511 512f16vec4 testTextureGatherLod() 513{ 514 f16vec4 texel = f16vec4(0.0hf); 515 516 texel += textureGatherLodAMD(s2D, c2, lod, 0); 517 texel += textureGatherLodAMD(s2D, f16c2, f16lod, 0); 518 texel += textureGatherLodAMD(s2DArray, c3, lod, 0); 519 texel += textureGatherLodAMD(s2DArray, f16c3, f16lod, 0); 520 texel += textureGatherLodAMD(sCube, c3, lod, 0); 521 texel += textureGatherLodAMD(sCube, f16c3, f16lod, 0); 522 texel += textureGatherLodAMD(sCubeArray, c4, lod, 0); 523 texel += textureGatherLodAMD(sCubeArray, f16c4, f16lod, 0); 524 525 return texel; 526} 527 528f16vec4 testTextureGatherLodOffset() 529{ 530 f16vec4 texel = f16vec4(0.0hf); 531 532 texel += textureGatherLodOffsetAMD(s2D, c2, lod, offset2, 0); 533 texel += textureGatherLodOffsetAMD(s2D, f16c2, f16lod, offset2, 0); 534 texel += textureGatherLodOffsetAMD(s2DArray, c3, lod, offset2, 0); 535 texel += textureGatherLodOffsetAMD(s2DArray, f16c3, f16lod, offset2, 0); 536 537 return texel; 538} 539 540f16vec4 testTextureGatherLodOffsets() 541{ 542 f16vec4 texel = f16vec4(0.0hf); 543 544 texel += textureGatherLodOffsetsAMD(s2D, c2, lod, offsets, 0); 545 texel += textureGatherLodOffsetsAMD(s2D, f16c2, f16lod, offsets, 0); 546 texel += textureGatherLodOffsetsAMD(s2DArray, c3, lod, offsets, 0); 547 texel += textureGatherLodOffsetsAMD(s2DArray, f16c3, f16lod, offsets, 0); 548 549 return texel; 550} 551 552ivec4 testTextureSize() 553{ 554 ivec4 size = ivec4(0); 555 556 size.x += textureSize(s1D, int(lod)); 557 size.xy += textureSize(s2D, int(lod)); 558 size.xyz += textureSize(s3D, int(lod)); 559 size.xy += textureSize(sCube, int(lod)); 560 size.x += textureSize(s1DShadow, int(lod)); 561 size.xy += textureSize(s2DShadow, int(lod)); 562 size.xy += textureSize(sCubeShadow, int(lod)); 563 size.xyz += textureSize(sCubeArray, int(lod)); 564 size.xyz += textureSize(sCubeArrayShadow, int(lod)); 565 size.xy += textureSize(s2DRect); 566 size.xy += textureSize(s2DRectShadow); 567 size.xy += textureSize(s1DArray, int(lod)); 568 size.xyz += textureSize(s2DArray, int(lod)); 569 size.xy += textureSize(s1DArrayShadow, int(lod)); 570 size.xyz += textureSize(s2DArrayShadow, int(lod)); 571 size.x += textureSize(sBuffer); 572 size.xy += textureSize(s2DMS); 573 size.xyz += textureSize(s2DMSArray); 574 575 return size; 576} 577 578vec2 testTextureQueryLod() 579{ 580 vec2 lod = vec2(0.0); 581 582 lod += textureQueryLod(s1D, c1); 583 lod += textureQueryLod(s1D, f16c1); 584 lod += textureQueryLod(s2D, c2); 585 lod += textureQueryLod(s2D, f16c2); 586 lod += textureQueryLod(s3D, c3); 587 lod += textureQueryLod(s3D, f16c3); 588 lod += textureQueryLod(sCube, c3); 589 lod += textureQueryLod(sCube, f16c3); 590 lod += textureQueryLod(s1DArray, c1); 591 lod += textureQueryLod(s1DArray, f16c1); 592 lod += textureQueryLod(s2DArray, c2); 593 lod += textureQueryLod(s2DArray, f16c2); 594 lod += textureQueryLod(sCubeArray, c3); 595 lod += textureQueryLod(sCubeArray, f16c3); 596 lod += textureQueryLod(s1DShadow, c1); 597 lod += textureQueryLod(s1DShadow, f16c1); 598 lod += textureQueryLod(s2DShadow, c2); 599 lod += textureQueryLod(s2DShadow, f16c2); 600 lod += textureQueryLod(sCubeArrayShadow, c3); 601 lod += textureQueryLod(sCubeArrayShadow, f16c3); 602 lod += textureQueryLod(s1DArrayShadow, c1); 603 lod += textureQueryLod(s1DArrayShadow, f16c1); 604 lod += textureQueryLod(s2DArrayShadow, c2); 605 lod += textureQueryLod(s2DArrayShadow, f16c2); 606 lod += textureQueryLod(sCubeArrayShadow, c3); 607 lod += textureQueryLod(sCubeArrayShadow, f16c3); 608 609 return lod; 610} 611 612int testTextureQueryLevels() 613{ 614 int levels = 0; 615 616 levels += textureQueryLevels(s1D); 617 levels += textureQueryLevels(s2D); 618 levels += textureQueryLevels(s3D); 619 levels += textureQueryLevels(sCube); 620 levels += textureQueryLevels(s1DShadow); 621 levels += textureQueryLevels(s2DShadow); 622 levels += textureQueryLevels(sCubeShadow); 623 levels += textureQueryLevels(sCubeArray); 624 levels += textureQueryLevels(sCubeArrayShadow); 625 levels += textureQueryLevels(s1DArray); 626 levels += textureQueryLevels(s2DArray); 627 levels += textureQueryLevels(s1DArrayShadow); 628 levels += textureQueryLevels(s2DArrayShadow); 629 630 return levels; 631} 632 633int testTextureSamples() 634{ 635 int samples = 0; 636 637 samples += textureSamples(s2DMS); 638 samples += textureSamples(s2DMSArray); 639 640 return samples; 641} 642 643f16vec4 testImageLoad() 644{ 645 f16vec4 texel = f16vec4(0.0hf); 646 647 texel += imageLoad(i1D, int(c1)); 648 texel += imageLoad(i2D, ivec2(c2)); 649 texel += imageLoad(i3D, ivec3(c3)); 650 texel += imageLoad(i2DRect, ivec2(c2)); 651 texel += imageLoad(iCube, ivec3(c3)); 652 texel += imageLoad(iBuffer, int(c1)); 653 texel += imageLoad(i1DArray, ivec2(c2)); 654 texel += imageLoad(i2DArray, ivec3(c3)); 655 texel += imageLoad(iCubeArray, ivec3(c3)); 656 texel += imageLoad(i2DMS, ivec2(c2), 1); 657 texel += imageLoad(i2DMSArray, ivec3(c3), 1); 658 659 return texel; 660} 661 662void testImageStore(f16vec4 data) 663{ 664 imageStore(i1D, int(c1), data); 665 imageStore(i2D, ivec2(c2), data); 666 imageStore(i3D, ivec3(c3), data); 667 imageStore(i2DRect, ivec2(c2), data); 668 imageStore(iCube, ivec3(c3), data); 669 imageStore(iBuffer, int(c1), data); 670 imageStore(i1DArray, ivec2(c2), data); 671 imageStore(i2DArray, ivec3(c3), data); 672 imageStore(iCubeArray, ivec3(c3), data); 673 imageStore(i2DMS, ivec2(c2), 1, data); 674 imageStore(i2DMSArray, ivec3(c3), 1, data); 675} 676 677f16vec4 testSparseTexture() 678{ 679 f16vec4 texel = f16vec4(0.0hf); 680 681 sparseTextureARB(s2D, c2, texel); 682 sparseTextureARB(s2D, f16c2, texel, f16bias); 683 sparseTextureARB(s3D, c3, texel); 684 sparseTextureARB(s3D, f16c3, texel, f16bias); 685 sparseTextureARB(sCube, c3, texel); 686 sparseTextureARB(sCube, f16c3, texel, f16bias); 687 sparseTextureARB(s2DShadow, c3, texel.x); 688 sparseTextureARB(s2DShadow, f16c2, compare, texel.x, f16bias); 689 sparseTextureARB(sCubeShadow, c4, texel.x); 690 sparseTextureARB(sCubeShadow, f16c3, compare, texel.x, f16bias); 691 sparseTextureARB(s2DArray, c3, texel); 692 sparseTextureARB(s2DArray, f16c3, texel, f16bias); 693 sparseTextureARB(sCubeArray, c4, texel); 694 sparseTextureARB(sCubeArray, f16c4, texel, f16bias); 695 sparseTextureARB(s2DArrayShadow, c4, texel.x); 696 sparseTextureARB(s2DArrayShadow, f16c3, compare, texel.x); 697 sparseTextureARB(s2DRect, c2, texel); 698 sparseTextureARB(s2DRect, f16c2, texel); 699 sparseTextureARB(s2DRectShadow, c3, texel.x); 700 sparseTextureARB(s2DRectShadow, f16c2, compare, texel.x); 701 sparseTextureARB(sCubeArrayShadow, c4, compare, texel.x); 702 sparseTextureARB(sCubeArrayShadow, f16c4, compare, texel.x); 703 704 return texel; 705} 706 707f16vec4 testSparseTextureLod() 708{ 709 f16vec4 texel = f16vec4(0.0hf); 710 711 sparseTextureLodARB(s2D, c2, lod, texel); 712 sparseTextureLodARB(s2D, f16c2, f16lod, texel); 713 sparseTextureLodARB(s3D, c3, lod, texel); 714 sparseTextureLodARB(s3D, f16c3, f16lod, texel); 715 sparseTextureLodARB(sCube, c3, lod, texel); 716 sparseTextureLodARB(sCube, f16c3, f16lod, texel); 717 sparseTextureLodARB(s2DShadow, c3, lod, texel.x); 718 sparseTextureLodARB(s2DShadow, f16c2, compare, f16lod, texel.x); 719 sparseTextureLodARB(s2DArray, c3, lod, texel); 720 sparseTextureLodARB(s2DArray, f16c3, f16lod, texel); 721 sparseTextureLodARB(sCubeArray, c4, lod, texel); 722 sparseTextureLodARB(sCubeArray, f16c4, f16lod, texel); 723 724 return texel; 725} 726 727f16vec4 testSparseTextureOffset() 728{ 729 f16vec4 texel = f16vec4(0.0hf); 730 731 sparseTextureOffsetARB(s2D, c2, offset2, texel); 732 sparseTextureOffsetARB(s2D, f16c2, offset2, texel, f16bias); 733 sparseTextureOffsetARB(s3D, c3, offset3, texel); 734 sparseTextureOffsetARB(s3D, f16c3, offset3, texel, f16bias); 735 sparseTextureOffsetARB(s2DRect, c2, offset2, texel); 736 sparseTextureOffsetARB(s2DRect, f16c2, offset2, texel); 737 sparseTextureOffsetARB(s2DRectShadow, c3, offset2, texel.x); 738 sparseTextureOffsetARB(s2DRectShadow, f16c2, compare, offset2, texel.x); 739 sparseTextureOffsetARB(s2DShadow, c3, offset2, texel.x); 740 sparseTextureOffsetARB(s2DShadow, f16c2, compare, offset2, texel.x, f16bias); 741 sparseTextureOffsetARB(s2DArray, c3, offset2, texel); 742 sparseTextureOffsetARB(s2DArray, f16c3, offset2, texel, f16bias); 743 sparseTextureOffsetARB(s2DArrayShadow, c4, offset2, texel.x); 744 sparseTextureOffsetARB(s2DArrayShadow, f16c3, compare, offset2, texel.x); 745 746 return texel; 747} 748 749f16vec4 testSparseTextureLodOffset() 750{ 751 f16vec4 texel = f16vec4(0.0hf); 752 753 sparseTextureLodOffsetARB(s2D, c2, lod, offset2, texel); 754 sparseTextureLodOffsetARB(s2D, f16c2, f16lod, offset2, texel); 755 sparseTextureLodOffsetARB(s3D, c3, lod, offset3, texel); 756 sparseTextureLodOffsetARB(s3D, f16c3, f16lod, offset3, texel); 757 sparseTextureLodOffsetARB(s2DShadow, c3, lod, offset2, texel.x); 758 sparseTextureLodOffsetARB(s2DShadow, f16c2, compare, f16lod, offset2, texel.x); 759 sparseTextureLodOffsetARB(s2DArray, c3, lod, offset2, texel); 760 sparseTextureLodOffsetARB(s2DArray, f16c3, f16lod, offset2, texel); 761 762 return texel; 763} 764 765f16vec4 testSparseTextureGrad() 766{ 767 f16vec4 texel = f16vec4(0.0hf); 768 769 sparseTextureGradARB(s2D, c2, dPdxy2, dPdxy2, texel); 770 sparseTextureGradARB(s2D, f16c2, f16dPdxy2, f16dPdxy2, texel); 771 sparseTextureGradARB(s3D, c3, dPdxy3, dPdxy3, texel); 772 sparseTextureGradARB(s3D, f16c3, f16dPdxy3, f16dPdxy3, texel); 773 sparseTextureGradARB(sCube, c3, dPdxy3, dPdxy3, texel); 774 sparseTextureGradARB(sCube, f16c3, f16dPdxy3, f16dPdxy3, texel); 775 sparseTextureGradARB(s2DRect, c2, dPdxy2, dPdxy2, texel); 776 sparseTextureGradARB(s2DRect, f16c2, f16dPdxy2, f16dPdxy2, texel); 777 sparseTextureGradARB(s2DRectShadow, c3, dPdxy2, dPdxy2, texel.x); 778 sparseTextureGradARB(s2DRectShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, texel.x); 779 sparseTextureGradARB(s2DShadow, c3, dPdxy2, dPdxy2, texel.x); 780 sparseTextureGradARB(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, texel.x); 781 sparseTextureGradARB(sCubeShadow, c4, dPdxy3, dPdxy3, texel.x); 782 sparseTextureGradARB(sCubeShadow, f16c3, compare, f16dPdxy3, f16dPdxy3, texel.x); 783 sparseTextureGradARB(s2DArray, c3, dPdxy2, dPdxy2, texel); 784 sparseTextureGradARB(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, texel); 785 sparseTextureGradARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, texel.x); 786 sparseTextureGradARB(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, texel.x); 787 sparseTextureGradARB(sCubeArray, c4, dPdxy3, dPdxy3, texel); 788 sparseTextureGradARB(sCubeArray, f16c4, f16dPdxy3, f16dPdxy3, texel); 789 790 return texel; 791} 792 793f16vec4 testSparseTextureGradOffset() 794{ 795 f16vec4 texel = f16vec4(0.0hf); 796 797 sparseTextureGradOffsetARB(s2D, c2, dPdxy2, dPdxy2, offset2, texel); 798 sparseTextureGradOffsetARB(s2D, f16c2, f16dPdxy2, f16dPdxy2, offset2, texel); 799 sparseTextureGradOffsetARB(s3D, c3, dPdxy3, dPdxy3, offset3, texel); 800 sparseTextureGradOffsetARB(s3D, f16c3, f16dPdxy3, f16dPdxy3, offset3, texel); 801 sparseTextureGradOffsetARB(s2DRect, c2, dPdxy2, dPdxy2, offset2, texel); 802 sparseTextureGradOffsetARB(s2DRect, f16c2, f16dPdxy2, f16dPdxy2, offset2, texel); 803 sparseTextureGradOffsetARB(s2DRectShadow, c3, dPdxy2, dPdxy2, offset2, texel.x); 804 sparseTextureGradOffsetARB(s2DRectShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, offset2, texel.x); 805 sparseTextureGradOffsetARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, texel.x); 806 sparseTextureGradOffsetARB(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, offset2, texel.x); 807 sparseTextureGradOffsetARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, texel); 808 sparseTextureGradOffsetARB(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, offset2, texel); 809 sparseTextureGradOffsetARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, texel.x); 810 sparseTextureGradOffsetARB(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, offset2, texel.x); 811 812 return texel; 813} 814 815f16vec4 testSparseTexelFetch() 816{ 817 f16vec4 texel = f16vec4(0.0hf); 818 819 sparseTexelFetchARB(s2D, ivec2(c2), int(lod), texel); 820 sparseTexelFetchARB(s3D, ivec3(c3), int(lod), texel); 821 sparseTexelFetchARB(s2DRect, ivec2(c2), texel); 822 sparseTexelFetchARB(s2DArray, ivec3(c3), int(lod), texel); 823 sparseTexelFetchARB(s2DMS, ivec2(c2), 1, texel); 824 sparseTexelFetchARB(s2DMSArray, ivec3(c3), 2, texel); 825 826 return texel; 827} 828 829f16vec4 testSparseTexelFetchOffset() 830{ 831 f16vec4 texel = f16vec4(0.0hf); 832 833 sparseTexelFetchOffsetARB(s2D, ivec2(c2), int(lod), offset2, texel); 834 sparseTexelFetchOffsetARB(s3D, ivec3(c3), int(lod), offset3, texel); 835 sparseTexelFetchOffsetARB(s2DRect, ivec2(c2), offset2, texel); 836 sparseTexelFetchOffsetARB(s2DArray, ivec3(c3), int(lod), offset2, texel); 837 838 return texel; 839} 840 841f16vec4 testSparseTextureGather() 842{ 843 f16vec4 texel = f16vec4(0.0hf); 844 845 sparseTextureGatherARB(s2D, c2, texel, 0); 846 sparseTextureGatherARB(s2D, f16c2, texel, 0, f16bias); 847 sparseTextureGatherARB(s2DArray, c3, texel, 0); 848 sparseTextureGatherARB(s2DArray, f16c3, texel, 0, f16bias); 849 sparseTextureGatherARB(sCube, c3, texel, 0); 850 sparseTextureGatherARB(sCube, f16c3, texel, 0, f16bias); 851 sparseTextureGatherARB(sCubeArray, c4, texel, 0); 852 sparseTextureGatherARB(sCubeArray, f16c4, texel, 0, f16bias); 853 sparseTextureGatherARB(s2DRect, c2, texel, 0); 854 sparseTextureGatherARB(s2DRect, f16c2, texel, 0); 855 sparseTextureGatherARB(s2DShadow, c2, compare, texel); 856 sparseTextureGatherARB(s2DShadow, f16c2, compare, texel); 857 sparseTextureGatherARB(s2DArrayShadow, c3, compare, texel); 858 sparseTextureGatherARB(s2DArrayShadow, f16c3, compare, texel); 859 sparseTextureGatherARB(sCubeShadow, c3, compare, texel); 860 sparseTextureGatherARB(sCubeShadow, f16c3, compare, texel); 861 sparseTextureGatherARB(sCubeArrayShadow, c4, compare, texel); 862 sparseTextureGatherARB(sCubeArrayShadow, f16c4, compare, texel); 863 sparseTextureGatherARB(s2DRectShadow, c2, compare, texel); 864 sparseTextureGatherARB(s2DRectShadow, f16c2, compare, texel); 865 866 return texel; 867} 868 869f16vec4 testSparseTextureGatherOffset() 870{ 871 f16vec4 texel = f16vec4(0.0hf); 872 873 sparseTextureGatherOffsetARB(s2D, c2, offset2, texel, 0); 874 sparseTextureGatherOffsetARB(s2D, f16c2, offset2, texel, 0, f16bias); 875 sparseTextureGatherOffsetARB(s2DArray, c3, offset2, texel, 0); 876 sparseTextureGatherOffsetARB(s2DArray, f16c3, offset2, texel, 0, f16bias); 877 sparseTextureGatherOffsetARB(s2DRect, c2, offset2, texel, 0); 878 sparseTextureGatherOffsetARB(s2DRect, f16c2, offset2, texel, 0); 879 sparseTextureGatherOffsetARB(s2DShadow, c2, compare, offset2, texel); 880 sparseTextureGatherOffsetARB(s2DShadow, f16c2, compare, offset2, texel); 881 sparseTextureGatherOffsetARB(s2DArrayShadow, c3, compare, offset2, texel); 882 sparseTextureGatherOffsetARB(s2DArrayShadow, f16c3, compare, offset2, texel); 883 sparseTextureGatherOffsetARB(s2DRectShadow, c2, compare, offset2, texel); 884 sparseTextureGatherOffsetARB(s2DRectShadow, f16c2, compare, offset2, texel); 885 886 return texel; 887} 888 889f16vec4 testSparseTextureGatherOffsets() 890{ 891 f16vec4 texel = f16vec4(0.0hf); 892 893 sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel, 0); 894 sparseTextureGatherOffsetsARB(s2D, f16c2, offsets, texel, 0, f16bias); 895 sparseTextureGatherOffsetsARB(s2DArray, c3, offsets, texel, 0); 896 sparseTextureGatherOffsetsARB(s2DArray, f16c3, offsets, texel, 0, f16bias); 897 sparseTextureGatherOffsetsARB(s2DRect, c2, offsets, texel, 0); 898 sparseTextureGatherOffsetsARB(s2DRect, f16c2, offsets, texel, 0); 899 sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, offsets, texel); 900 sparseTextureGatherOffsetsARB(s2DShadow, f16c2, compare, offsets, texel); 901 sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, offsets, texel); 902 sparseTextureGatherOffsetsARB(s2DArrayShadow, f16c3, compare, offsets, texel); 903 sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, offsets, texel); 904 sparseTextureGatherOffsetsARB(s2DRectShadow, f16c2, compare, offsets, texel); 905 906 return texel; 907} 908 909f16vec4 testSparseTextureGatherLod() 910{ 911 f16vec4 texel = f16vec4(0.0hf); 912 913 sparseTextureGatherLodAMD(s2D, c2, lod, texel, 0); 914 sparseTextureGatherLodAMD(s2D, f16c2, f16lod, texel, 0); 915 sparseTextureGatherLodAMD(s2DArray, c3, lod, texel, 0); 916 sparseTextureGatherLodAMD(s2DArray, f16c3, f16lod, texel, 0); 917 sparseTextureGatherLodAMD(sCube, c3, lod, texel, 0); 918 sparseTextureGatherLodAMD(sCube, f16c3, f16lod, texel, 0); 919 sparseTextureGatherLodAMD(sCubeArray, c4, lod, texel, 0); 920 sparseTextureGatherLodAMD(sCubeArray, f16c4, f16lod, texel, 0); 921 922 return texel; 923} 924 925f16vec4 testSparseTextureGatherLodOffset() 926{ 927 f16vec4 texel = f16vec4(0.0hf); 928 929 sparseTextureGatherLodOffsetAMD(s2D, c2, lod, offset2, texel, 0); 930 sparseTextureGatherLodOffsetAMD(s2D, f16c2, f16lod, offset2, texel, 0); 931 sparseTextureGatherLodOffsetAMD(s2DArray, c3, lod, offset2, texel, 0); 932 sparseTextureGatherLodOffsetAMD(s2DArray, f16c3, f16lod, offset2, texel, 0); 933 934 return texel; 935} 936 937f16vec4 testSparseTextureGatherLodOffsets() 938{ 939 f16vec4 texel = f16vec4(0.0hf); 940 941 sparseTextureGatherLodOffsetsAMD(s2D, c2, lod, offsets, texel, 0); 942 sparseTextureGatherLodOffsetsAMD(s2D, f16c2, f16lod, offsets, texel, 0); 943 sparseTextureGatherLodOffsetsAMD(s2DArray, c3, lod, offsets, texel, 0); 944 sparseTextureGatherLodOffsetsAMD(s2DArray, f16c3, f16lod, offsets, texel, 0); 945 946 return texel; 947} 948 949f16vec4 testSparseImageLoad() 950{ 951 f16vec4 texel = f16vec4(0.0hf); 952 953 sparseImageLoadARB(i2D, ivec2(c2), texel); 954 sparseImageLoadARB(i3D, ivec3(c3), texel); 955 sparseImageLoadARB(i2DRect, ivec2(c2), texel); 956 sparseImageLoadARB(iCube, ivec3(c3), texel); 957 sparseImageLoadARB(i2DArray, ivec3(c3), texel); 958 sparseImageLoadARB(iCubeArray, ivec3(c3), texel); 959 sparseImageLoadARB(i2DMS, ivec2(c2), 1, texel); 960 sparseImageLoadARB(i2DMSArray, ivec3(c3), 2, texel); 961 962 return texel; 963} 964 965f16vec4 testSparseTextureClamp() 966{ 967 f16vec4 texel = f16vec4(0.0hf); 968 969 sparseTextureClampARB(s2D, c2, lodClamp, texel); 970 sparseTextureClampARB(s2D, f16c2, f16lodClamp, texel, f16bias); 971 sparseTextureClampARB(s3D, c3, lodClamp, texel); 972 sparseTextureClampARB(s3D, f16c3, f16lodClamp, texel, f16bias); 973 sparseTextureClampARB(sCube, c3, lodClamp, texel); 974 sparseTextureClampARB(sCube, f16c3, f16lodClamp, texel, f16bias); 975 sparseTextureClampARB(s2DShadow, c3, lodClamp, texel.x); 976 sparseTextureClampARB(s2DShadow, f16c2, compare, f16lodClamp, texel.x, f16bias); 977 sparseTextureClampARB(sCubeShadow, c4, lodClamp, texel.x); 978 sparseTextureClampARB(sCubeShadow, f16c3, compare, f16lodClamp, texel.x, f16bias); 979 sparseTextureClampARB(s2DArray, c3, lodClamp, texel); 980 sparseTextureClampARB(s2DArray, f16c3, f16lodClamp, texel, f16bias); 981 sparseTextureClampARB(sCubeArray, c4, lodClamp, texel); 982 sparseTextureClampARB(sCubeArray, f16c4, f16lodClamp, texel, f16bias); 983 sparseTextureClampARB(s2DArrayShadow, c4, lodClamp, texel.x); 984 sparseTextureClampARB(s2DArrayShadow, f16c3, compare, f16lodClamp, texel.x); 985 sparseTextureClampARB(sCubeArrayShadow, c4, compare, lodClamp, texel.x); 986 sparseTextureClampARB(sCubeArrayShadow, f16c4, compare, f16lodClamp, texel.x); 987 988 return texel; 989} 990 991f16vec4 testTextureClamp() 992{ 993 f16vec4 texel = f16vec4(0.0hf); 994 995 texel += textureClampARB(s1D, c1, lodClamp); 996 texel += textureClampARB(s1D, f16c1, f16lodClamp, f16bias); 997 texel += textureClampARB(s2D, c2, lodClamp); 998 texel += textureClampARB(s2D, f16c2, f16lodClamp, f16bias); 999 texel += textureClampARB(s3D, c3, lodClamp); 1000 texel += textureClampARB(s3D, f16c3, f16lodClamp, f16bias); 1001 texel += textureClampARB(sCube, c3, lodClamp); 1002 texel += textureClampARB(sCube, f16c3, f16lodClamp, f16bias); 1003 texel.x += textureClampARB(s1DShadow, c3, lodClamp); 1004 texel.x += textureClampARB(s1DShadow, f16c2, compare, f16lodClamp, f16bias); 1005 texel.x += textureClampARB(s2DShadow, c3, lodClamp); 1006 texel.x += textureClampARB(s2DShadow, f16c2, compare, f16lodClamp, f16bias); 1007 texel.x += textureClampARB(sCubeShadow, c4, lodClamp); 1008 texel.x += textureClampARB(sCubeShadow, f16c3, compare, f16lodClamp, f16bias); 1009 texel += textureClampARB(s1DArray, c2, lodClamp); 1010 texel += textureClampARB(s1DArray, f16c2, f16lodClamp, f16bias); 1011 texel += textureClampARB(s2DArray, c3, lodClamp); 1012 texel += textureClampARB(s2DArray, f16c3, f16lodClamp, f16bias); 1013 texel += textureClampARB(sCubeArray, c4, lodClamp); 1014 texel += textureClampARB(sCubeArray, f16c4, f16lodClamp, f16bias); 1015 texel.x += textureClampARB(s1DArrayShadow, c3, lodClamp); 1016 texel.x += textureClampARB(s1DArrayShadow, f16c2, compare, f16lodClamp, f16bias); 1017 texel.x += textureClampARB(s2DArrayShadow, c4, lodClamp); 1018 texel.x += textureClampARB(s2DArrayShadow, f16c3, compare, f16lodClamp); 1019 texel.x += textureClampARB(sCubeArrayShadow, c4, compare, lodClamp); 1020 texel.x += textureClampARB(sCubeArrayShadow, f16c4, compare, f16lodClamp); 1021 1022 return texel; 1023} 1024 1025f16vec4 testSparseTextureOffsetClamp() 1026{ 1027 f16vec4 texel = f16vec4(0.0hf); 1028 1029 sparseTextureOffsetClampARB(s2D, c2, offset2, lodClamp, texel); 1030 sparseTextureOffsetClampARB(s2D, f16c2, offset2, f16lodClamp, texel, f16bias); 1031 sparseTextureOffsetClampARB(s3D, c3, offset3, lodClamp, texel); 1032 sparseTextureOffsetClampARB(s3D, f16c3, offset3, f16lodClamp, texel, f16bias); 1033 sparseTextureOffsetClampARB(s2DShadow, c3, offset2, lodClamp, texel.x); 1034 sparseTextureOffsetClampARB(s2DShadow, f16c2, compare, offset2, f16lodClamp, texel.x, f16bias); 1035 sparseTextureOffsetClampARB(s2DArray, c3, offset2, lodClamp, texel); 1036 sparseTextureOffsetClampARB(s2DArray, f16c3, offset2, f16lodClamp, texel, f16bias); 1037 sparseTextureOffsetClampARB(s2DArrayShadow, c4, offset2, lodClamp, texel.x); 1038 sparseTextureOffsetClampARB(s2DArrayShadow, f16c3, compare, offset2, f16lodClamp, texel.x); 1039 1040 return texel; 1041} 1042 1043f16vec4 testTextureOffsetClamp() 1044{ 1045 f16vec4 texel = f16vec4(0.0hf); 1046 1047 texel += textureOffsetClampARB(s1D, c1, offset1, lodClamp); 1048 texel += textureOffsetClampARB(s1D, f16c1, offset1, f16lodClamp, f16bias); 1049 texel += textureOffsetClampARB(s2D, c2, offset2, lodClamp); 1050 texel += textureOffsetClampARB(s2D, f16c2, offset2, f16lodClamp, f16bias); 1051 texel += textureOffsetClampARB(s3D, c3, offset3, lodClamp); 1052 texel += textureOffsetClampARB(s3D, f16c3, offset3, f16lodClamp, f16bias); 1053 texel.x += textureOffsetClampARB(s1DShadow, c3, offset1, lodClamp); 1054 texel.x += textureOffsetClampARB(s1DShadow, f16c2, compare, offset1, f16lodClamp, f16bias); 1055 texel.x += textureOffsetClampARB(s2DShadow, c3, offset2, lodClamp); 1056 texel.x += textureOffsetClampARB(s2DShadow, f16c2, compare, offset2, f16lodClamp, f16bias); 1057 texel += textureOffsetClampARB(s1DArray, c2, offset1, lodClamp); 1058 texel += textureOffsetClampARB(s1DArray, f16c2, offset1, f16lodClamp, f16bias); 1059 texel += textureOffsetClampARB(s2DArray, c3, offset2, lodClamp); 1060 texel += textureOffsetClampARB(s2DArray, f16c3, offset2, f16lodClamp, f16bias); 1061 texel.x += textureOffsetClampARB(s1DArrayShadow, c3, offset1, lodClamp); 1062 texel.x += textureOffsetClampARB(s1DArrayShadow, f16c2, compare, offset1, f16lodClamp, f16bias); 1063 texel.x += textureOffsetClampARB(s2DArrayShadow, c4, offset2, lodClamp); 1064 texel.x += textureOffsetClampARB(s2DArrayShadow, f16c3, compare, offset2, f16lodClamp); 1065 1066 return texel; 1067} 1068 1069f16vec4 testSparseTextureGradClamp() 1070{ 1071 f16vec4 texel = f16vec4(0.0hf); 1072 1073 sparseTextureGradClampARB(s2D, c2, dPdxy2, dPdxy2, lodClamp, texel); 1074 sparseTextureGradClampARB(s2D, f16c2, f16dPdxy2, f16dPdxy2, f16lodClamp, texel); 1075 sparseTextureGradClampARB(s3D, c3, dPdxy3, dPdxy3, lodClamp, texel); 1076 sparseTextureGradClampARB(s3D, f16c3, f16dPdxy3, f16dPdxy3, f16lodClamp, texel); 1077 sparseTextureGradClampARB(sCube, c3, dPdxy3, dPdxy3, lodClamp, texel); 1078 sparseTextureGradClampARB(sCube, f16c3, f16dPdxy3, f16dPdxy3, f16lodClamp, texel); 1079 sparseTextureGradClampARB(s2DShadow, c3, dPdxy2, dPdxy2, lodClamp, texel.x); 1080 sparseTextureGradClampARB(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, f16lodClamp, texel.x); 1081 sparseTextureGradClampARB(sCubeShadow, c4, dPdxy3, dPdxy3, lodClamp, texel.x); 1082 sparseTextureGradClampARB(sCubeShadow, f16c3, compare, f16dPdxy3, f16dPdxy3, f16lodClamp, texel.x); 1083 sparseTextureGradClampARB(s2DArray, c3, dPdxy2, dPdxy2, lodClamp, texel); 1084 sparseTextureGradClampARB(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, f16lodClamp, texel); 1085 sparseTextureGradClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, lodClamp, texel.x); 1086 sparseTextureGradClampARB(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, f16lodClamp, texel.x); 1087 sparseTextureGradClampARB(sCubeArray, c4, dPdxy3, dPdxy3, lodClamp, texel); 1088 sparseTextureGradClampARB(sCubeArray, f16c4, f16dPdxy3, f16dPdxy3, f16lodClamp, texel); 1089 1090 return texel; 1091} 1092 1093f16vec4 testTextureGradClamp() 1094{ 1095 f16vec4 texel = f16vec4(0.0hf); 1096 1097 texel += textureGradClampARB(s1D, c1, dPdxy1, dPdxy1, lodClamp); 1098 texel += textureGradClampARB(s1D, f16c1, f16dPdxy1, f16dPdxy1, f16lodClamp); 1099 texel += textureGradClampARB(s2D, c2, dPdxy2, dPdxy2, lodClamp); 1100 texel += textureGradClampARB(s2D, f16c2, f16dPdxy2, f16dPdxy2, f16lodClamp); 1101 texel += textureGradClampARB(s3D, c3, dPdxy3, dPdxy3, lodClamp); 1102 texel += textureGradClampARB(s3D, f16c3, f16dPdxy3, f16dPdxy3, f16lodClamp); 1103 texel += textureGradClampARB(sCube, c3, dPdxy3, dPdxy3, lodClamp); 1104 texel += textureGradClampARB(sCube, f16c3, f16dPdxy3, f16dPdxy3, f16lodClamp); 1105 texel.x += textureGradClampARB(s1DShadow, c3, dPdxy1, dPdxy1, lodClamp); 1106 texel.x += textureGradClampARB(s1DShadow, f16c2, compare, f16dPdxy1, f16dPdxy1, f16lodClamp); 1107 texel.x += textureGradClampARB(s2DShadow, c3, dPdxy2, dPdxy2, lodClamp); 1108 texel.x += textureGradClampARB(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, f16lodClamp); 1109 texel.x += textureGradClampARB(sCubeShadow, c4, dPdxy3, dPdxy3, lodClamp); 1110 texel.x += textureGradClampARB(sCubeShadow, f16c3, compare, f16dPdxy3, f16dPdxy3, f16lodClamp); 1111 texel += textureGradClampARB(s1DArray, c2, dPdxy1, dPdxy1, lodClamp); 1112 texel += textureGradClampARB(s1DArray, f16c2, f16dPdxy1, f16dPdxy1, f16lodClamp); 1113 texel += textureGradClampARB(s2DArray, c3, dPdxy2, dPdxy2, lodClamp); 1114 texel += textureGradClampARB(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, f16lodClamp); 1115 texel.x += textureGradClampARB(s1DArrayShadow, c3, dPdxy1, dPdxy1, lodClamp); 1116 texel.x += textureGradClampARB(s1DArrayShadow, f16c2, compare, f16dPdxy1, f16dPdxy1, f16lodClamp); 1117 texel.x += textureGradClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, lodClamp); 1118 texel.x += textureGradClampARB(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, f16lodClamp); 1119 texel += textureGradClampARB(sCubeArray, c4, dPdxy3, dPdxy3, lodClamp); 1120 texel += textureGradClampARB(sCubeArray, f16c4, f16dPdxy3, f16dPdxy3, f16lodClamp); 1121 1122 return texel; 1123} 1124 1125f16vec4 testSparseTextureGradOffsetClamp() 1126{ 1127 f16vec4 texel = f16vec4(0.0hf); 1128 1129 sparseTextureGradOffsetClampARB(s2D, c2, dPdxy2, dPdxy2, offset2, lodClamp, texel); 1130 sparseTextureGradOffsetClampARB(s2D, f16c2, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp, texel); 1131 sparseTextureGradOffsetClampARB(s3D, c3, dPdxy3, dPdxy3, offset3, lodClamp, texel); 1132 sparseTextureGradOffsetClampARB(s3D, f16c3, f16dPdxy3, f16dPdxy3, offset3, f16lodClamp, texel); 1133 sparseTextureGradOffsetClampARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, lodClamp, texel.x); 1134 sparseTextureGradOffsetClampARB(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp, texel.x); 1135 sparseTextureGradOffsetClampARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, lodClamp, texel); 1136 sparseTextureGradOffsetClampARB(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp, texel); 1137 sparseTextureGradOffsetClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, lodClamp, texel.x); 1138 sparseTextureGradOffsetClampARB(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp, texel.x); 1139 1140 return texel; 1141} 1142 1143f16vec4 testTextureGradOffsetClamp() 1144{ 1145 f16vec4 texel = f16vec4(0.0hf); 1146 1147 texel += textureGradOffsetClampARB(s1D, c1, dPdxy1, dPdxy1, offset1, lodClamp); 1148 texel += textureGradOffsetClampARB(s1D, f16c1, f16dPdxy1, f16dPdxy1, offset1, f16lodClamp); 1149 texel += textureGradOffsetClampARB(s2D, c2, dPdxy2, dPdxy2, offset2, lodClamp); 1150 texel += textureGradOffsetClampARB(s2D, f16c2, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp); 1151 texel += textureGradOffsetClampARB(s3D, c3, dPdxy3, dPdxy3, offset3, lodClamp); 1152 texel += textureGradOffsetClampARB(s3D, f16c3, f16dPdxy3, f16dPdxy3, offset3, f16lodClamp); 1153 texel.x += textureGradOffsetClampARB(s1DShadow, c3, dPdxy1, dPdxy1, offset1, lodClamp); 1154 texel.x += textureGradOffsetClampARB(s1DShadow, f16c2, compare, f16dPdxy1, f16dPdxy1, offset1, f16lodClamp); 1155 texel.x += textureGradOffsetClampARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, lodClamp); 1156 texel.x += textureGradOffsetClampARB(s2DShadow, f16c2, compare, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp); 1157 texel += textureGradOffsetClampARB(s1DArray, c2, dPdxy1, dPdxy1, offset1, lodClamp); 1158 texel += textureGradOffsetClampARB(s1DArray, f16c2, f16dPdxy1, f16dPdxy1, offset1, f16lodClamp); 1159 texel += textureGradOffsetClampARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, lodClamp); 1160 texel += textureGradOffsetClampARB(s2DArray, f16c3, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp); 1161 texel.x += textureGradOffsetClampARB(s1DArrayShadow, c3, dPdxy1, dPdxy1, offset1, lodClamp); 1162 texel.x += textureGradOffsetClampARB(s1DArrayShadow, f16c2, compare, f16dPdxy1, f16dPdxy1, offset1, f16lodClamp); 1163 texel.x += textureGradOffsetClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, lodClamp); 1164 texel.x += textureGradOffsetClampARB(s2DArrayShadow, f16c3, compare, f16dPdxy2, f16dPdxy2, offset2, f16lodClamp); 1165 1166 return texel; 1167} 1168 1169f16vec4 testCombinedTextureSampler() 1170{ 1171 f16vec4 texel = f16vec4(0.0hf); 1172 1173 texel += texture(f16sampler1D(t1D, s), c1); 1174 texel += texture(f16sampler1D(t1D, s), f16c1, f16bias); 1175 texel += texture(f16sampler2D(t2D, s), c2); 1176 texel += texture(f16sampler2D(t2D, s), f16c2, f16bias); 1177 texel += texture(f16sampler3D(t3D, s), c3); 1178 texel += texture(f16sampler3D(t3D, s), f16c3, f16bias); 1179 texel += texture(f16samplerCube(tCube, s), c3); 1180 texel += texture(f16samplerCube(tCube, s), f16c3, f16bias); 1181 texel.x += texture(f16sampler1DShadow(t1D, sShadow), c3); 1182 texel.x += texture(f16sampler1DShadow(t1D, sShadow), f16c2, compare, f16bias); 1183 texel.x += texture(f16sampler2DShadow(t2D, sShadow), c3); 1184 texel.x += texture(f16sampler2DShadow(t2D, sShadow), f16c2, compare, f16bias); 1185 texel.x += texture(f16samplerCubeShadow(tCube, sShadow), c4); 1186 texel.x += texture(f16samplerCubeShadow(tCube, sShadow), f16c3, compare, f16bias); 1187 texel += texture(f16sampler1DArray(t1DArray, s), c2); 1188 texel += texture(f16sampler1DArray(t1DArray, s), f16c2, f16bias); 1189 texel += texture(f16sampler2DArray(t2DArray, s), c3); 1190 texel += texture(f16sampler2DArray(t2DArray, s), f16c3, f16bias); 1191 texel += texture(f16samplerCubeArray(tCubeArray, s), c4); 1192 texel += texture(f16samplerCubeArray(tCubeArray, s), f16c4, f16bias); 1193 texel.x += texture(f16sampler1DArrayShadow(t1DArray, sShadow), c3); 1194 texel.x += texture(f16sampler1DArrayShadow(t1DArray, sShadow), f16c2, compare, f16bias); 1195 texel.x += texture(f16sampler2DArrayShadow(t2DArray, sShadow), c4); 1196 texel.x += texture(f16sampler2DArrayShadow(t2DArray, sShadow), f16c3, compare); 1197 texel += texture(f16sampler2DRect(t2DRect, s), c2); 1198 texel += texture(f16sampler2DRect(t2DRect, s), f16c2); 1199 texel.x += texture(f16sampler2DRectShadow(t2DRect, sShadow), c3); 1200 texel.x += texture(f16sampler2DRectShadow(t2DRect, sShadow), f16c2, compare); 1201 texel.x += texture(f16samplerCubeArrayShadow(tCubeArray, sShadow), c4, compare); 1202 texel.x += texture(f16samplerCubeArrayShadow(tCubeArray, sShadow), f16c4, compare); 1203 1204 return texel; 1205} 1206 1207f16vec4 testSubpassLoad() 1208{ 1209 return subpassLoad(subpass) + subpassLoad(subpassMS, 2); 1210} 1211 1212void main() 1213{ 1214 f16vec4 result = f16vec4(0.0hf); 1215 1216 result += testTexture(); 1217 result += testTextureProj(); 1218 result += testTextureLod(); 1219 result += testTextureOffset(); 1220 result += testTextureLodOffset(); 1221 result += testTextureProjLodOffset(); 1222 result += testTexelFetch(); 1223 result += testTexelFetchOffset(); 1224 result += testTextureGrad(); 1225 result += testTextureGradOffset(); 1226 result += testTextureProjGrad(); 1227 result += testTextureProjGradoffset(); 1228 result += testTextureGather(); 1229 result += testTextureGatherOffset(); 1230 result += testTextureGatherOffsets(); 1231 result += testTextureGatherLod(); 1232 result += testTextureGatherLodOffset(); 1233 result += testTextureGatherLodOffsets(); 1234 1235 result += f16vec4(testTextureSize()); 1236 result.xy += f16vec2(testTextureQueryLod()); 1237 result.x += float16_t(testTextureQueryLevels()); 1238 result.x += float16_t(testTextureSamples()); 1239 1240 result += testImageLoad(); 1241 testImageStore(result); 1242 1243 result += testSparseTexture(); 1244 result += testSparseTextureLod(); 1245 result += testSparseTextureOffset(); 1246 result += testSparseTextureLodOffset(); 1247 result += testSparseTextureGrad(); 1248 result += testSparseTextureGradOffset(); 1249 result += testSparseTexelFetch(); 1250 result += testSparseTexelFetchOffset(); 1251 result += testSparseTextureGather(); 1252 result += testSparseTextureGatherOffset(); 1253 result += testSparseTextureGatherOffsets(); 1254 result += testSparseTextureGatherLod(); 1255 result += testSparseTextureGatherLodOffset(); 1256 result += testSparseTextureGatherLodOffsets(); 1257 1258 result += testSparseImageLoad(); 1259 1260 result += testSparseTextureClamp(); 1261 result += testTextureClamp(); 1262 result += testSparseTextureOffsetClamp(); 1263 result += testTextureOffsetClamp(); 1264 result += testSparseTextureGrad(); 1265 result += testTextureGrad(); 1266 result += testSparseTextureGradOffsetClamp(); 1267 result += testTextureGradOffsetClamp(); 1268 1269 result += testCombinedTextureSampler(); 1270 result += testSubpassLoad(); 1271 1272 fragColor = result; 1273} 1274