yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeOverhaul global inst deduplication and cpp/cuda backend. (#2654)4c4826d47

master
536 B27 linesraw
1// function-static-const.slang
2//TEST_IGNORE_FILE
3
4#pragma pack_matrix(column_major)
5
6struct SLANG_ParameterGroup_C_0
7{
8    int index_0;
9};
10
11cbuffer C_0 : register(b0)
12{
13    SLANG_ParameterGroup_C_0 C_0;
14}
15
16static const int kArray_0[int(16)] = { int(1), int(2), int(3), int(4), int(5), int(6), int(7), int(8), int(9), int(10), int(11), int(12), int(13), int(14), int(15), int(16) };
17
18int test_0(int val_0)
19{
20    return kArray_0[val_0];
21}
22
23float4 main() : SV_TARGET
24{
25    int _S1 = test_0(C_0.index_0);
26    return (float4) float(_S1);
27}