diff options
| author | Yong He <yonghe@outlook.com> | 2021-05-21 16:38:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-21 16:38:33 -0700 |
| commit | 7f8a9994d0bd99a171a1daa0bce46d92c02ccffd (patch) | |
| tree | 0b187e63ab5b9ce6f5ab41266fedaec44091a217 /tests/compute/dynamic-dispatch-14.slang | |
| parent | 172538fdb418f7a2faab1f5a410f3b2cb8e18ba5 (diff) | |
[gfx] Support StructuredBuffer<IInterface>. (#1851)
Co-authored-by: T. Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tests/compute/dynamic-dispatch-14.slang')
| -rw-r--r-- | tests/compute/dynamic-dispatch-14.slang | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/compute/dynamic-dispatch-14.slang b/tests/compute/dynamic-dispatch-14.slang index 4dce1c2ed..8361cd317 100644 --- a/tests/compute/dynamic-dispatch-14.slang +++ b/tests/compute/dynamic-dispatch-14.slang @@ -1,9 +1,12 @@ // Test using interface typed shader parameters with associated types. -//DISABLED_TEST(compute):COMPARE_COMPUTE:-dx11 -//DISABLED_TEST(compute):COMPARE_COMPUTE:-cpu -shaderobj -//DISABLED_TEST(compute):COMPARE_COMPUTE:-vk -//DISABLED_TEST(compute):COMPARE_COMPUTE:-cuda -shaderobj +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -profile sm_6_0 -use-dxil +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx11 -profile sm_5_0 +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -gl -profile glsl440 +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -vk -profile glsl440 +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cpu + + [anyValueSize(8)] interface IAssoc @@ -21,10 +24,13 @@ interface IInterface //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=gOutputBuffer RWStructuredBuffer<int> gOutputBuffer; -//TEST_INPUT:ubuffer(data=[rtti(MyImpl) witness(MyImpl, IInterface) 1 0], stride=4):name=gCb + +// Specialize gCb1, but not gCb2 +//TEST_INPUT: set gCb = new StructuredBuffer<IInterface>{new MyImpl{1}}; RWStructuredBuffer<IInterface> gCb; -//TEST_INPUT:ubuffer(data=[rtti(MyImpl) witness(MyImpl, IInterface) 1 0], stride=4):name=gCb1 +// Add two elements into the structured buffer to prevent specialization. +//TEST_INPUT: set gCb1 = new StructuredBuffer<IInterface>{new MyImpl{1}, new MyImpl2{2}}; RWStructuredBuffer<IInterface> gCb1; [numthreads(4, 1, 1)] @@ -40,9 +46,6 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) gOutputBuffer[tid] = outputVal; } -// Specialize gCb1, but not gCb2 -//TEST_INPUT: globalExistentialType MyImpl -//TEST_INPUT: globalExistentialType __Dynamic // Type must be marked `public` to ensure it is visible in the generated DLL. public struct MyImpl : IInterface { |
