diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-08-30 14:59:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-30 11:59:34 -0700 |
| commit | 4261185764ecae96466d243b8ce376a6a69c118c (patch) | |
| tree | a2b63617e9c05fc70306a58a05b9d33efe0ebda2 /tests/autodiff/material2/diff-bwd-falcor-material-system.slang | |
| parent | bb15f5b494b20e957127f0ffa6040c94349da0d0 (diff) | |
Fix subtle corner-case with vars getting hoisted out of the loop creating unnecessary loop state (#3165)
* Extend the unit tests for MxLayeredMaterial
* Add breaking loop test
* Fix subtle corner-case with vars getting hoisted out of the loop creating unnecessary loop state
* remove whitespace changes
* Create loop-init.slang.expected.txt
* Add filecheck tests to ensure correct loop state
* Update comment
---------
Co-authored-by: winmad <winmad.wlf@gmail.com>
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/autodiff/material2/diff-bwd-falcor-material-system.slang')
| -rw-r--r-- | tests/autodiff/material2/diff-bwd-falcor-material-system.slang | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/autodiff/material2/diff-bwd-falcor-material-system.slang b/tests/autodiff/material2/diff-bwd-falcor-material-system.slang index 2b873af77..bf57b8238 100644 --- a/tests/autodiff/material2/diff-bwd-falcor-material-system.slang +++ b/tests/autodiff/material2/diff-bwd-falcor-material-system.slang @@ -2,16 +2,19 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type // outputBuffer is defined in IBSDF.slang -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0], stride=4):out,name=outputBuffer +//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer import MaterialSystem; import DiffuseMaterial; import DiffuseMaterialInstance; import GlossyMaterial; import GlossyMaterialInstance; +import MxLayeredMaterial; +import MxLayeredMaterialInstance; //TEST_INPUT: type_conformance DiffuseMaterial:IMaterial = 0 //TEST_INPUT: type_conformance GlossyMaterial:IMaterial = 1 +//TEST_INPUT: type_conformance MxLayeredMaterial:IMaterial = 2 [BackwardDifferentiable] float3 evalBSDF(int type) @@ -31,4 +34,5 @@ void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID) { __bwd_diff(evalBSDF)(0, float3(1.f)); __bwd_diff(evalBSDF)(1, float3(1.f)); + __bwd_diff(evalBSDF)(2, float3(1.f)); } |
