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