diff options
| author | Yong He <yonghe@outlook.com> | 2021-08-26 10:30:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-26 10:30:35 -0700 |
| commit | b2ad8e99a82884bb157e1be76b1ad7eb0e481457 (patch) | |
| tree | 3f5357083b5972761d516b70cb51a4fa7ab72cd5 /tests | |
| parent | 33f7e1599cbecb32c23787b37b2bf3b34bdd5c84 (diff) | |
Add API to control interface specialization. (#1925)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/compute/dynamic-dispatch-16.slang | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/compute/dynamic-dispatch-16.slang b/tests/compute/dynamic-dispatch-16.slang index 5ceb75cd7..b9fecb966 100644 --- a/tests/compute/dynamic-dispatch-16.slang +++ b/tests/compute/dynamic-dispatch-16.slang @@ -19,9 +19,12 @@ struct UserDefinedPackedType //TEST_INPUT:ubuffer(data=[0], stride=4):out,name=gOutputBuffer RWStructuredBuffer<float> gOutputBuffer; -//TEST_INPUT: set gObj = new StructuredBuffer<UserDefinedPackedType>[new UserDefinedPackedType{[1.0, 0.0, 0.0], 0}, new UserDefinedPackedType{[2.0, 3.0, 4.0], 1}]; +//TEST_INPUT: set gObj = new StructuredBuffer<UserDefinedPackedType>[new UserDefinedPackedType{[1.0, 2.0, 3.0], 3}, new UserDefinedPackedType{[2.0, 3.0, 4.0], 4}]; RWStructuredBuffer<UserDefinedPackedType> gObj; +//TEST_INPUT: type_conformance FloatVal:IInterface = 3 +//TEST_INPUT: type_conformance Float4Val:IInterface = 4 + [numthreads(1, 1, 1)] void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { @@ -35,8 +38,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) gOutputBuffer[0] = result; } -// Type must be marked `public` to ensure it is visible in the generated DLL. -public struct FloatVal : IInterface +struct FloatVal : IInterface { float val; float run() @@ -46,7 +48,7 @@ public struct FloatVal : IInterface }; interface ISomething{void g();} struct Float4Struct : ISomething { float4 val; void g() {} } -public struct Float4Val : IInterface +struct Float4Val : IInterface { Float4Struct val; float run() |
