From 1a0bbb53c116e6e5f89ed577803341e6aa1bce82 Mon Sep 17 00:00:00 2001 From: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:46:38 -0400 Subject: use `nullptr' for IRStructKey with `IRDerivativeMemberDecoration` (#4623) --- tests/compute/struct-autodiff-default-init.slang | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/compute/struct-autodiff-default-init.slang (limited to 'tests/compute') diff --git a/tests/compute/struct-autodiff-default-init.slang b/tests/compute/struct-autodiff-default-init.slang new file mode 100644 index 000000000..3d6548125 --- /dev/null +++ b/tests/compute/struct-autodiff-default-init.slang @@ -0,0 +1,25 @@ +// 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 + +// HLSL: computeMain +// GLSL: main +// METAL: computeMain +// CPP: computeMain +// SPIRV: OpEntryPoint + +struct PowActivationEx : IDifferentiable +{ + float power; +} +RWStructuredBuffer return_value; + +[numthreads(256, 1, 1)] +void computeMain() +{ + PowActivationEx args; + return_value[0] = args.power; +} \ No newline at end of file -- cgit v1.2.3