diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/infer-var-type-constant-folding.slang | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/bugs/infer-var-type-constant-folding.slang b/tests/bugs/infer-var-type-constant-folding.slang new file mode 100644 index 000000000..658abed17 --- /dev/null +++ b/tests/bugs/infer-var-type-constant-folding.slang @@ -0,0 +1,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; +}
\ No newline at end of file |
