Bump github/codeql-action from 3.27.1 to 3.27.4
[glslang.git] / Test / spv.tpipTextureArrays.frag
blob332acb318c390746e01505dcc4d4e2d38b3b1623
1 #version 450
2 #extension GL_QCOM_image_processing : require
4 precision highp float;
6 // fragment shader inputs and outputs
7 layout (location = 0) in vec4 v_texcoord;
9 layout (location = 0) out vec4 fragColor;
11 // fragment shader resources
12 layout(set = 0, binding = 3) uniform sampler samp;
15 layout(set = 0, binding = 4) uniform texture2D tex2D_srcs[8];
16 layout(set = 0, binding = 5) uniform sampler2D samplers[3];
18 void main()
21     uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y);
22     uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w);
23     uvec2 blockSize = uvec2(4, 4);
24     uint  ii = tgt_coords.x % 8;
25     fragColor = textureBlockMatchSSDQCOM(
26                     samplers[0],                                   // target texture
27                     tgt_coords,                                    // target coords
28                     sampler2D(tex2D_srcs[ii], samp),               // reference texture
29                     ref_coords,                                    // reference coords
30                     blockSize);                                    // block size
32     fragColor = textureBlockMatchSADQCOM(
33                     sampler2D(tex2D_srcs[1], samp),                // target texture
34                     tgt_coords,                                    // target coords
35                     samplers[1],                                   // reference texture
36                     ref_coords,                                    // reference coords
37                     blockSize);                                    // block size