summaryrefslogtreecommitdiff
path: root/tests/autodiff/bsdf
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-12-06 12:05:07 -0800
committerGitHub <noreply@github.com>2023-12-06 12:05:07 -0800
commit11111e5733b189127dc2c4934d67693b9bc6e764 (patch)
tree0ba84df3e856eb104abec2ecac47242bc70a7b7d /tests/autodiff/bsdf
parentfa6d8717d02912697c09f2d7de802723ac6d6e47 (diff)
Support visibility control and default to `internal`. (#3380)
* Support visibility control and default to `internal`. * Fix wip. * Fixes. * Fix. * Fix test. * Add legacy language detection and compatibility for existing code. * Add doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/autodiff/bsdf')
-rw-r--r--tests/autodiff/bsdf/bsdf-auto-rev.slang3
-rw-r--r--tests/autodiff/bsdf/bsdf-sample.slang5
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/autodiff/bsdf/bsdf-auto-rev.slang b/tests/autodiff/bsdf/bsdf-auto-rev.slang
index cd31f2097..1bb1989bf 100644
--- a/tests/autodiff/bsdf/bsdf-auto-rev.slang
+++ b/tests/autodiff/bsdf/bsdf-auto-rev.slang
@@ -1,4 +1,5 @@
//TEST_IGNORE_FILE:
+implementing "bsdf-sample";
struct ShadingData
{
@@ -103,4 +104,4 @@ float bsdfGGXPDF(in float3 hLocal, in Auto_Bwd_BSDFParameters params)
float d = ((cosTheta * a2 - cosTheta) * cosTheta + 1);
return (a2 / (d * d * 3.1415926)) * cosTheta;
-} \ No newline at end of file
+}
diff --git a/tests/autodiff/bsdf/bsdf-sample.slang b/tests/autodiff/bsdf/bsdf-sample.slang
index 8a9508791..9dfecf97e 100644
--- a/tests/autodiff/bsdf/bsdf-sample.slang
+++ b/tests/autodiff/bsdf/bsdf-sample.slang
@@ -2,9 +2,10 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
-RWStructuredBuffer<float> outputBuffer;
+module "bsdf-sample";
+__include bsdf_auto_rev;
-__exported import bsdf_auto_rev;
+RWStructuredBuffer<float> outputBuffer;
[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)