diff options
| author | Yong He <yonghe@outlook.com> | 2025-06-04 13:05:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-04 13:05:58 -0700 |
| commit | 812e478989e27983b8dea7ab11964de751654ba2 (patch) | |
| tree | e6db6def9c7896ee48c5fe42926856644e81c0e6 /tests/language-feature/interfaces/zero-init-interface.slang | |
| parent | b9dc21d362f65f22bc707bede733a9537b80460a (diff) | |
Make interface types non c-style in Slang2026. (#7260)
* Make interface types non c-style.
* Make Optional<T> work with autodiff and existential types.
* Fix.
* patch behind slang 2026.
* Fix warnings.
* cleanup.
* Fix tests.
* Fix.
* Fix com interface lowering.
* Add comment to test.
* regenerate command line reference
* Add test for passing `none` to autodiff function.
* Fix recording of `getDynamicObjectRTTIBytes`.
* Fix nested Optional types.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'tests/language-feature/interfaces/zero-init-interface.slang')
| -rw-r--r-- | tests/language-feature/interfaces/zero-init-interface.slang | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/language-feature/interfaces/zero-init-interface.slang b/tests/language-feature/interfaces/zero-init-interface.slang deleted file mode 100644 index ed3b1eaa4..000000000 --- a/tests/language-feature/interfaces/zero-init-interface.slang +++ /dev/null @@ -1,33 +0,0 @@ -// Test that we can zero-init a struct with interface typed member. - -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUFFER): -shaderobj -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUFFER): -vk -shaderobj - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int> outputBuffer; - -interface IFoo -{ - int method(); -} - -//TEST_INPUT: type_conformance Impl1:IFoo = 0 -struct Impl1 : IFoo -{ - int data; - int method() { return data + 1; } -} - -struct MyType -{ - IFoo foo; -} - - -[numthreads(1, 1, 1)] -void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID) -{ - MyType t = {}; - // BUFFER: 1 - outputBuffer[0] = t.foo.method(); -} |
