xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/spv.tpipBlockMatchSSD.frag (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1#version 450
2#extension GL_QCOM_image_processing : require
3
4precision highp float;
5
6// fragment shader inputs and outputs
7layout (location = 0) in vec4 v_texcoord;
8
9layout (location = 0) out vec4 fragColor;
10
11// fragment shader resources
12layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights;
13layout(set = 0, binding = 1) uniform texture2D tex2D_src1;
14layout(set = 0, binding = 2) uniform texture2D tex2D_src2;
15layout(set = 0, binding = 3) uniform sampler samp;
16layout(set = 0, binding = 4) uniform sampler2D target_samp;
17layout(set = 0, binding = 5) uniform sampler2D ref_samp;
18
19void main()
20{
21
22    uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y);
23    uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w);
24    uvec2 blockSize = uvec2(4, 4);
25    fragColor = textureBlockMatchSSDQCOM(
26                    sampler2D(tex2D_src1, samp),                   // target texture
27                    tgt_coords,                                    // target coords
28                    sampler2D(tex2D_src2, samp),                   // reference texture
29                    ref_coords,                                    // reference coords
30                    blockSize);                                    // block size
31    fragColor = textureBlockMatchSSDQCOM(
32                    target_samp,                                   // target texture
33                    tgt_coords,                                    // target coords
34                    ref_samp,                                      // reference texture
35                    ref_coords,                                    // reference coords
36                    blockSize);                                    // block size
37}
38
39