yum-mirror/slang

Making it easier to work with shaders

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

Harsh Aggarwal (NVIDIA)Fix#8082: Batch-6: Enable cuda tests (#8266)53fa12e1b

master
826 B27 linesraw
1// struct-default-init.slang
2//TEST:SIMPLE(filecheck=HLSL): -target hlsl -entry computeMain -stage compute
3//TEST:SIMPLE(filecheck=GLSL): -target glsl -entry computeMain -stage compute
4//TEST:SIMPLE(filecheck=METAL): -target metal -entry computeMain -stage compute
5//TEST:SIMPLE(filecheck=CPP): -target cpp -entry computeMain -stage compute
6//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry computeMain -stage compute
7//TEST:SIMPLE(filecheck=CUDA): -target cuda -entry computeMain -stage compute
8
9// HLSL: computeMain
10// GLSL: main
11// METAL: computeMain
12// CPP: computeMain
13// SPIRV: OpEntryPoint
14// CUDA: computeMain
15
16struct PowActivationEx : IDifferentiable
17{
18	float power;
19}
20RWStructuredBuffer<float> return_value;
21
22[numthreads(256, 1, 1)]
23void computeMain()
24{
25    PowActivationEx args;
26	return_value[0] = args.power;
27}