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 struct containing ParameterBlock - should error 4 5struct StructWithParameterBlock 6{ 7 ParameterBlock<float> pb; 8 int other; 9} 10 11RWStructuredBuffer<float> outputBuffer; 12 13[numthreads(4, 1, 1)] 14void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 15{ 16 // Force usage of the array to prevent optimization 17 outputBuffer[dispatchThreadID.x] = arrayOfStructWithPB[dispatchThreadID.x % 3].pb; 18} 19 20//CHECK: ([[# @LINE+1]]): error 30027 21uniform StructWithParameterBlock arrayOfStructWithPB[3];