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
582 B20 linesraw
1// Test that StructuredBuffer of struct with unbounded array is 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// StructuredBuffer of struct with unbounded array - should error
13//CHECK: ([[# @LINE+1]]): error 30028
14StructuredBuffer<StructWithUnbounded> myBuffer;
15
16[numthreads(1, 1, 1)]
17void computeMain()
18{
19    // Empty - we're just testing the declarations
20}