yum-mirror/slang

Making it easier to work with shaders

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

Yong HeUpdate SPIRV-Tools and fix new validation errors. (#6511)4485cf3ea

master
517 B23 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry main -stage compute
2
3struct Test1
4{
5    float2x3 a;     // 24B
6    float3x4 b;     // 48B
7    float16_t3x2 c; // 12B
8    float16_t2x4 d; // 16B
9};
10
11StructuredBuffer<Test1> dp;
12RWStructuredBuffer<float4> outputBuffer;
13
14// CHECK: outputBuffer{{.*}}._data[{{.*}}] =
15
16[numthreads(4, 4, 1)]
17void main(uint3 GTid : SV_GroupThreadID, 
18          uint GI    : SV_GroupIndex)
19{
20    var tmp = dp[0];
21    var rs = tmp.a[0][0] + tmp.a[0][1];
22    outputBuffer[GI] = float4(rs);
23}