yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
10ae0e16
main
1#version 460 2#extension GL_QCOM_tile_shading : enable 3 4precision highp int ; 5precision highp float ; 6 7layout (non_coherent_attachment_readQCOM) in ; 8 9layout (set = 0 , binding = 0 , tile_attachmentQCOM, rgba32f) uniform highp image2D input0; 10layout (set = 0 , binding = 1 , tile_attachmentQCOM, rgba32f) uniform highp image2D color0; 11layout (set = 0 , binding = 2 , tile_attachmentQCOM, rgba32i) uniform highp iimage2D color1; 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 17layout (location = 0 ) out vec4 fragColor; 18 19void main() 20{ 21// integer coordinates of the center of tile. 22uvec2 o2 = uvec2( 8 , 4 ); 23o2 = o2 / uvec2( 2 ); 24ivec2 offset = ivec2(gl_TileOffsetQCOM + (gl_TileDimensionQCOM/uvec3( 2 )). xy ); 25 26// read from attachments 27vec4 colorA = imageLoad( color0, offset ); 28ivec4 icolorB = imageLoad( color1, offset ); 29vec4 colorB = vec4(icolorB); 30vec4 colorC = imageLoad( input0, offset ); 31float d = imageLoad( depth, offset ). x ; 32uint s = imageLoad( stencil, offset ). x ; 3334 // compute output value 35vec4 outColor = ( colorB + colorB + colorC + d + s ); 3637 // write to attachments 38imageStore( color0, offset, outColor ); 39imageStore( depth, offset, vec4(outColor) ); 40imageStore( stencil, offset, uvec4(outColor) ); 4142 // write to color attachment 0 via fragment output 43fragColor = outColor + vec4( 1.0 , 0.0 , 0.0 , 1.0 ); 44}