yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
6dc24ffa
16.4.0
1#version 450 2#extension GL_ARB_sparse_texture2 : enable 3 4uniform sampler2D s2D ; 5uniform sampler3D s3D ; 6uniform sampler2DShadow s2DShadow ; 7uniform samplerCubeShadow sCubeShadow ; 8uniform sampler2DArrayShadow s2DArrayShadow ; 9uniform sampler2DRectShadow s2DRectShadow ; 10uniform samplerCubeArrayShadow sCubeArrayShadow ; 11uniform sampler2DMS s2DMS ; 12 13uniform isamplerCube isCube ; 14uniform isampler2DArray is2DArray ; 15 16uniform usamplerCubeArray usCubeArray ; 17uniform usampler2DRect us2DRect ; 18 19layout ( rgba32f ) uniform image2D i2D ; 20layout ( rgba32i ) uniform iimage3D ii3D ; 21layout ( rgba32f ) uniform image2DMS i2DMS ; 22 23in vec2 c2 ; 24in vec3 c3 ; 25in vec4 c4 ; 26 27in flat ivec2 ic2 ; 28in flat ivec3 ic3 ; 29 30out vec4 outColor ; 31 32void main () 33{ 34int resident = 0 ; 35vec4 texel = vec4 ( 0.0 ) ; 36ivec4 itexel = ivec4 ( 0 ) ; 37uvec4 utexel = uvec4 ( 0 ) ; 38 39resident |= sparseTextureARB ( s2D , c2 , texel ) ; 40resident |= sparseTextureARB ( s3D , c3 , texel , 2.0 ) ; 41resident |= sparseTextureARB ( isCube , c3 , itexel ) ; 42resident |= sparseTextureARB ( s2DShadow , c3 , texel . x ) ; 43resident |= sparseTextureARB ( sCubeArrayShadow , c4 , 1.0 , texel . x ) ; 44 45resident |= sparseTextureLodARB ( s2D , c2 , 2.0 , texel ) ; 46resident |= sparseTextureLodARB ( usCubeArray , c4 , 1.0 , utexel ) ; 47resident |= sparseTextureLodARB ( s2DShadow , c3 , 2.0 , texel . y ) ; 48 49resident |= sparseTextureOffsetARB ( s3D , c3 , ivec3 ( 2 ) , texel , 2.0 ) ; 50resident |= sparseTextureOffsetARB ( us2DRect , c2 , ivec2 ( 3 ) , utexel ) ; 51resident |= sparseTextureOffsetARB ( s2DArrayShadow , c4 , ivec2 ( 5 ) , texel . z ) ; 52 53resident |= sparseTexelFetchARB ( s2D , ivec2 ( c2 ) , 2 , texel ) ; 54resident |= sparseTexelFetchARB ( us2DRect , ivec2 ( c2 ) , utexel ) ; 55resident |= sparseTexelFetchARB ( s2DMS , ivec2 ( c2 ) , 4 , texel ) ; 56 57resident |= sparseTexelFetchOffsetARB ( s3D , ivec3 ( c3 ) , 2 , ivec3 ( 4 ) , texel ) ; 58resident |= sparseTexelFetchOffsetARB ( us2DRect , ivec2 ( c2 ) , ivec2 ( 3 ) , utexel ) ; 59 60resident |= sparseTextureLodOffsetARB ( s2D , c2 , 2.0 , ivec2 ( 5 ) , texel ) ; 61resident |= sparseTextureLodOffsetARB ( is2DArray , c3 , 2.0 , ivec2 ( 6 ) , itexel ) ; 62resident |= sparseTextureLodOffsetARB ( s2DShadow , c3 , 2.0 , ivec2 ( 7 ) , texel . z ) ; 63 64resident |= sparseTextureGradARB ( s3D , c3 , c3 , c3 , texel ) ; 65resident |= sparseTextureGradARB ( sCubeShadow , c4 , c3 , c3 , texel . y ) ; 66resident |= sparseTextureGradARB ( usCubeArray , c4 , c3 , c3 , utexel ) ; 67 68resident |= sparseTextureGradOffsetARB ( s2D , c2 , c2 , c2 , ivec2 ( 5 ) , texel ) ; 69resident |= sparseTextureGradOffsetARB ( s2DRectShadow , c3 , c2 , c2 , ivec2 ( 6 ) , texel . w ) ; 70resident |= sparseTextureGradOffsetARB ( is2DArray , c3 , c2 , c2 , ivec2 ( 2 ) , itexel ) ; 71 72resident |= sparseTextureGatherARB ( s2D , c2 , texel ) ; 73resident |= sparseTextureGatherARB ( is2DArray , c3 , itexel , 2 ) ; 74resident |= sparseTextureGatherARB ( s2DArrayShadow , c3 , 2.0 , texel ) ; 75 76resident |= sparseTextureGatherOffsetARB ( s2D , c2 , ivec2 ( 4 ) , texel ) ; 77resident |= sparseTextureGatherOffsetARB ( is2DArray , c3 , ivec2 ( 5 ) , itexel , 2 ) ; 78resident |= sparseTextureGatherOffsetARB ( s2DRectShadow , c2 , 2.0 , ivec2 ( 7 ) , texel ) ; 79 80const ivec2 constOffsets [ 4 ] = ivec2 [ 4 ]( ivec2 ( 1 , 2 ) , ivec2 ( 3 , 4 ) , ivec2 ( 15 , 16 ) , ivec2 ( - 2 , 0 )) ; 81resident |= sparseTextureGatherOffsetsARB ( s2D , c2 , constOffsets , texel ) ; 82resident |= sparseTextureGatherOffsetsARB ( is2DArray , c3 , constOffsets , itexel , 2 ) ; 83resident |= sparseTextureGatherOffsetsARB ( s2DRectShadow , c2 , 2.0 , constOffsets , texel ) ; 84 85resident |= sparseImageLoadARB ( i2D , ic2 , texel ) ; 86resident |= sparseImageLoadARB ( ii3D , ic3 , itexel ) ; 87resident |= sparseImageLoadARB ( i2DMS , ic2 , 3 , texel ) ; 88 89outColor = sparseTexelsResidentARB ( resident ) ? texel : vec4 ( itexel ) + vec4 ( utexel ) ; 90}