yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
10ae0e16
vulkan-sdk-1.4.357.0
1#version 460 2#extension GL_QCOM_tile_shading : enable 3 4layout ( local_size_x = 16 , local_size_y = 16 , local_size_z = 1 ) in ; 5 6layout ( set = 0 , binding = 0 , tile_attachmentQCOM , rgba32f ) uniform highp image2D input0 ; 7 8// tile color attachments (new syntax) 9layout ( set = 0 , binding = 1 , tile_attachmentQCOM , rgba32f ) uniform highp image2D color0 ; // attachment0 10layout ( set = 0 , binding = 2 , tile_attachmentQCOM , rgba32i ) uniform highp iimage2D color1 ; // attachment1 11 12 13// depth/stencil attachments 14layout ( set = 0 , binding = 3 , tile_attachmentQCOM , rgba32f ) uniform highp image2D depth ; 15layout ( set = 0 , binding = 4 , tile_attachmentQCOM , rgba32ui ) uniform highp uimage2D stencil ; 16 17void main () 18{ 19uvec2 uoffset = clamp ( gl_GlobalInvocationID . xy , gl_TileOffsetQCOM , gl_TileOffsetQCOM + gl_TileDimensionQCOM . xy - uvec2 ( 1.1 )) ; 20ivec2 offset = ivec2 ( uoffset ) ; 21 22// read from attachments 23vec4 colorA = imageLoad ( color0 , offset ) ; 24ivec4 icolorB = imageLoad ( color1 , offset ) ; 25vec4 colorC = imageLoad ( input0 , offset ) ; 26float d = imageLoad ( depth , offset ) . x ; 27uint s = imageLoad ( stencil , offset ) . x ; 28 29// compute output values 30vec4 outColor = ( colorA + vec4 ( icolorB ) + colorC ) * 0.33f ; 31float outDepth = d * 2.0f ; 32uint outStencil = s + uint ( 1 ) ; 33 34// write to attachments 35imageStore ( color0 , offset , outColor ) ; 36imageStore ( depth , offset , vec4 ( outDepth ) ) ; 37imageStore ( stencil , offset , uvec4 ( outStencil ) ) ; 38}