yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
251f55c5e
master
1//TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain 2 3//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer 4RWStructuredBuffer<int> outputBuffer; 5 6// Print an error when the numLanes is an invalid value for WaveSize. 7// The value has to be a power of 2 between 4 and 128, inclusive. 8// In other words, the set: [4, 8, 16, 32, 64, 128]. 9 10// "5" is an invalid value for WaveSize 11// CHECK: error 31103: 12[WaveSize(5)] 13[numthreads(4, 1, 1)] 14void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) 15{ 16 int tid = dispatchThreadID.x; 17 outputBuffer[tid] = tid; 18}