From b2ad8e99a82884bb157e1be76b1ad7eb0e481457 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 26 Aug 2021 10:30:35 -0700 Subject: Add API to control interface specialization. (#1925) --- tests/compute/dynamic-dispatch-16.slang | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/compute') 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 gOutputBuffer; -//TEST_INPUT: set gObj = new StructuredBuffer[new UserDefinedPackedType{[1.0, 0.0, 0.0], 0}, new UserDefinedPackedType{[2.0, 3.0, 4.0], 1}]; +//TEST_INPUT: set gObj = new StructuredBuffer[new UserDefinedPackedType{[1.0, 2.0, 3.0], 3}, new UserDefinedPackedType{[2.0, 3.0, 4.0], 4}]; RWStructuredBuffer 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() -- cgit v1.2.3