yum-mirror/slang

Making it easier to work with shaders

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

Ellie HermaszewskaFix segfault on arrays of structs containing parameter blocks (#8555)96df31a9f

master
587 B20 linesraw
1// Test that arrays of structs containing unbounded arrays are not allowed
2
3//TEST:SIMPLE(filecheck=CHECK): -target spirv -allow-glsl -stage compute -entry computeMain
4
5// Struct containing unbounded array (must be last member)
6struct StructWithUnbounded
7{
8    float value;
9    int data[];  // Unbounded array must be last member
10}
11
12// Array of struct containing unbounded array - should error (struct is NonAddressable)
13//CHECK: ([[# @LINE+1]]): error 30027
14StructWithUnbounded myArray[2];
15
16[numthreads(1, 1, 1)]
17void computeMain()
18{
19    // Empty - we're just testing the declarations
20}