yum-mirror/slang

Making it easier to work with shaders

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

Yong HeFix spirv lowering logic around pointer to unsized array. (#5243)ac6f04c15

master
428 B23 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3// CHECK: OpPtrAccessChain
4
5struct MeshVertex {
6    float3 Pos;
7    float2 TexCoord;
8};
9struct MeshData { 
10    float4x4 ModelMat;
11    MeshVertex Vertices[];
12};
13struct DispatchParams {
14    MeshData* Mesh;
15    float3* Dest;
16};
17
18[vk::push_constant] DispatchParams pc;
19
20[numthreads(64)]
21void ComputeMain(uint tid: SV_DispatchThreadID) {
22    pc.Dest[tid] = pc.Mesh->Vertices[tid].Pos;
23}