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