blob: 1a9da673839ed703af9ac6f9a9b37e9f97a25ecf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
//TEST:SIMPLE(filecheck=METAL): -entry taskMain -stage amplification -target metal
//TEST:SIMPLE(filecheck=METALLIB): -entry taskMain -stage amplification -target metallib
// METALLIB-NOT: error :
// METALLIB: @taskMain
cbuffer Uniforms
{
float4x4 modelViewProjection;
}
//
// Task shader
//
struct MeshPayload
{
int exponent;
};
// METAL: MeshPayload_0 object_data* _slang_mesh_payload
// METAL: mesh_grid_properties _slang_mgp
[numthreads(1,1,1)]
void taskMain()
{
// METAL: _slang_mesh_payload
// METAL: _slang_mgp.set_threadgroups_per_grid
MeshPayload p;
p.exponent = 3;
DispatchMesh(1, 1, 1, p);
}
|