summaryrefslogtreecommitdiff
path: root/tests/bugs/gh-841.slang.glsl
blob: 8dd37274a344b394321a966010e48e7d3985851f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//TEST_IGNORE_FILE:
#version 450

layout(location = 0)
out vec4 _S1;

layout(location = 0)
in vec4 _S2;

flat layout(location = 1)
in uint _S3;

struct RasterVertex_0
{
    vec4 c_0;
    uint u_0;
};

void main()
{
    vec4 result_0;
    RasterVertex_0 _S4 = RasterVertex_0(_S2, _S3);
    vec4 result_1 = _S4.c_0;

    if(bool(_S4.u_0 & uint(1)))
    {
        vec4 result_2 = result_1 + 1.0;
        result_0 = result_2;
    }
    else
    {
        result_0 = result_1;
    }
    _S1 = result_0;
    return;
}