Merge pull request #2892 from greg-lunarg/mb
[platform/upstream/glslang.git] / Test / hlsl.structarray.flatten.frag
1 SamplerState g_samp;
2 Texture1D    g_tex;
3
4 struct tex_t {
5     SamplerState samp;
6     Texture1D tex;
7     int nonopaque_thing;
8 };
9
10 struct tex_with_arrays_t {
11     SamplerState samp[2];
12     Texture1D tex[2];
13     int nonopaque_thing;
14 };
15
16 uniform tex_t g_texdata;
17 uniform tex_t g_texdata_array[3];
18 uniform tex_with_arrays_t g_texdata_array2[3];
19
20 struct PS_OUTPUT { float4 color : SV_Target0; };
21
22 void main(out PS_OUTPUT ps_output)
23 {
24     ps_output.color =
25         g_texdata.tex.Sample(g_texdata.samp, 0.5) +
26         g_texdata_array[1].tex.Sample(g_texdata_array[1].samp, 0.4) +
27         g_texdata_array2[1].tex[0].Sample(g_texdata_array2[1].samp[0], 0.3);
28 }