diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-13 12:17:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 12:17:01 -0700 |
| commit | 5f0ee87dfde1ef65a6383ff54c3580cdc5eff3e2 (patch) | |
| tree | 89155f3efc043671bd0278be24c2da9408d11bd6 /tools/gfx-unit-test/link-time-type.cpp | |
| parent | 9fd74379c22af14f794d48fdc22e772d47f61ca3 (diff) | |
Add wrapper type synthesis logic for constructors. (#3756)
* Add wrapper type synthesis logic for constructors.
* Fix.
Diffstat (limited to 'tools/gfx-unit-test/link-time-type.cpp')
| -rw-r--r-- | tools/gfx-unit-test/link-time-type.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gfx-unit-test/link-time-type.cpp b/tools/gfx-unit-test/link-time-type.cpp index 66a886c16..39496b3fe 100644 --- a/tools/gfx-unit-test/link-time-type.cpp +++ b/tools/gfx-unit-test/link-time-type.cpp @@ -19,6 +19,8 @@ namespace gfx_test interface IBase : IDifferentiable { [Differentiable] + __init(int x); + [Differentiable] float getBaseValue(); [Differentiable] static float getBaseValueS(); @@ -44,6 +46,8 @@ namespace gfx_test get { return val + 2.0; } set { val = newValue; } } + [Differentiable] + __init(int x) { val = x; } }; )"; const char* module0Src = R"( @@ -53,7 +57,7 @@ namespace gfx_test [numthreads(1,1,1)] void computeMain(uniform RWStructuredBuffer<float> buffer) { - Foo foo; + Foo foo = Foo(0); foo.setValue(3.0); buffer[0] = foo.getValue() + foo.val2 + Foo.offset + foo.getBaseValue(); } |
