diff options
Diffstat (limited to 'tests/autodiff')
| -rw-r--r-- | tests/autodiff/differential-visibility.slang | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/autodiff/differential-visibility.slang b/tests/autodiff/differential-visibility.slang new file mode 100644 index 000000000..368155678 --- /dev/null +++ b/tests/autodiff/differential-visibility.slang @@ -0,0 +1,26 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv +// CHECK: OpEntryPoint +public interface IBSDF +{ + public float3 get_value(); +} + +public struct AnisotropicGGX // : IDifferentiable +{ + float2 alpha = {}; + public __init() { } +}; + +public struct TestDiffVisibility : IBSDF, IDifferentiable +{ + public AnisotropicGGX D = {}; + public __init() { } + public float3 get_value() { return { 0.3 }; } +}; + +[numthreads(1,1,1)] +void main() +{ + TestDiffVisibility test = {}; + test.get_value(); +} |
