blob: 12ca97c610e662457e77cb58b04e52699c14d00a (
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
|
// struct-default-init.slang
//TEST:SIMPLE(filecheck=HLSL): -target hlsl -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=GLSL): -target glsl -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=METAL): -target metal -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=CPP): -target cpp -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=CUDA): -target cuda -entry computeMain -stage compute
// HLSL: computeMain
// GLSL: main
// METAL: computeMain
// CPP: computeMain
// SPIRV: OpEntryPoint
// CUDA: computeMain
struct PowActivationEx : IDifferentiable
{
float power;
}
RWStructuredBuffer<float> return_value;
[numthreads(256, 1, 1)]
void computeMain()
{
PowActivationEx args;
return_value[0] = args.power;
}
|