yum-mirror/slang

Making it easier to work with shaders

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

James Helferty (NVIDIA)Enable metal tests (#8446)8086adc90

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