yum-mirror/slang

Making it easier to work with shaders

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

Yong HeSPIRV `Block` decoration fixes. (#4303)9a23a9aab

master
390 B21 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3struct T2 {
4    float4 _m0;
5};
6
7[[vk::binding(0)]]
8cbuffer ubo : register(b0)
9{
10    int in_val;
11    // CHECK: ([[# @LINE+1]]): error 31215
12    T2 _z0[]; // error 31215: cannot use unsized type 'T2[]' in a constant buffer.
13}
14
15[shader("fragment")]
16float4 main() : SV_TARGET
17{
18    uint x = in_val;
19    float4 data = _z0[x]._m0;
20    return data;
21}