From 5f0ee87dfde1ef65a6383ff54c3580cdc5eff3e2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 13 Mar 2024 12:17:01 -0700 Subject: Add wrapper type synthesis logic for constructors. (#3756) * Add wrapper type synthesis logic for constructors. * Fix. --- tools/gfx-unit-test/link-time-type.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/gfx-unit-test') 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 @@ -18,6 +18,8 @@ namespace gfx_test const char* moduleInterfaceSrc = R"( interface IBase : IDifferentiable { + [Differentiable] + __init(int x); [Differentiable] float getBaseValue(); [Differentiable] @@ -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 buffer) { - Foo foo; + Foo foo = Foo(0); foo.setValue(3.0); buffer[0] = foo.getValue() + foo.val2 + Foo.offset + foo.getBaseValue(); } -- cgit v1.2.3