summaryrefslogtreecommitdiffstats
path: root/tests/bugs/infer-var-type-constant-folding.slang
blob: 658abed1796386f671e54dbd87722ef5f4691006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl
//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly

//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
//BUF: B

RWStructuredBuffer<int> outputBuffer;

static const let C = float(3);
static const let D = int(4+4+int(C));

void computeMain()
{
    outputBuffer[0] = D;
}