From 165a95ebb2e9dbdc1b92bdc103470438a5114500 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 22 Jul 2025 16:14:07 -0700 Subject: Fix visibility of synthesized Differential typedefs. (#7865) * Fix visibility of synthesized `Differential` typedefs. * Delete incorrect test. --- tests/autodiff/differential-visibility.slang | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/autodiff/differential-visibility.slang (limited to 'tests/autodiff') 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(); +} -- cgit v1.2.3