summaryrefslogtreecommitdiff
path: root/tests/compute/interface-assoc-type-param.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-05-21 16:38:33 -0700
committerGitHub <noreply@github.com>2021-05-21 16:38:33 -0700
commit7f8a9994d0bd99a171a1daa0bce46d92c02ccffd (patch)
tree0b187e63ab5b9ce6f5ab41266fedaec44091a217 /tests/compute/interface-assoc-type-param.slang
parent172538fdb418f7a2faab1f5a410f3b2cb8e18ba5 (diff)
[gfx] Support StructuredBuffer<IInterface>. (#1851)
Co-authored-by: T. Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tests/compute/interface-assoc-type-param.slang')
-rw-r--r--tests/compute/interface-assoc-type-param.slang10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/compute/interface-assoc-type-param.slang b/tests/compute/interface-assoc-type-param.slang
index b315dd5f9..805f673a2 100644
--- a/tests/compute/interface-assoc-type-param.slang
+++ b/tests/compute/interface-assoc-type-param.slang
@@ -1,7 +1,7 @@
// Tests using associated types through an existential-struct-typed param.
-//DISABLED_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cuda -shaderobj
-//DISABLED_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cpu -shaderobj
+//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cuda -shaderobj
+//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cpu -shaderobj
[anyValueSize(8)]
interface IInterface
@@ -16,7 +16,7 @@ interface IEval
uint eval();
}
-struct Impl : IInterface
+public struct Impl : IInterface
{
uint val;
struct TEval : IEval
@@ -48,11 +48,9 @@ void compute(uint tid, Params p)
gOutputBuffer[tid] = p.obj[0].getEval().eval();
}
-//TEST_INPUT: entryPointExistentialType Impl
-
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID,
-//TEST_INPUT:ubuffer(data=[0 0 0 0 1 0], stride=4):name=params.obj
+//TEST_INPUT:set params.obj = new StructuredBuffer<IInterface>{ new Impl{1}}
uniform Params params)
{
uint tid = dispatchThreadID.x;