summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/zero-initialize/missing-zero-init.slang
blob: a3deeabe3d0371bf7f3e6c8f7c3139c20600ba6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//DISABLE_TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain
//DISABLE_TEST:SIMPLE(filecheck=CHECK): -target glsl -stage compute -entry computeMain

// CHECK-NOT: {{.* }}= 0;
// CHECK-NOT: return 0;

RWStructuredBuffer<int> outputBuffer;

[noinline]
int returnInt()
{
    int myInt;
    return myInt;
}

[numthreads(1, 1, 1)]
void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
{
// BUF: 1
    outputBuffer[0] = true
        && returnInt() == 0
        ;
}