yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
96df31a9f
master
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): 2 3// Test: Array of nested struct containing ParameterBlock - should error 4 5struct Inner 6{ 7 ParameterBlock<float> pb; 8} 9 10struct NestedStruct 11{ 12 Inner nested; 13 float value; 14} 15 16RWStructuredBuffer<float> outputBuffer; 17 18[numthreads(4, 1, 1)] 19void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 20{ 21 // Force usage of the array to prevent optimization 22 outputBuffer[dispatchThreadID.x] = arrayOfNestedStruct[dispatchThreadID.x % 2].nested.pb; 23} 24 25//CHECK: ([[# @LINE+1]]): error 30027 26uniform NestedStruct arrayOfNestedStruct[2];