summaryrefslogtreecommitdiff
path: root/tests/experiments/generic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/experiments/generic')
-rw-r--r--tests/experiments/generic/type-to-value-4.slang13
-rw-r--r--tests/experiments/generic/type-to-value-4.slang.expected.txt4
2 files changed, 10 insertions, 7 deletions
diff --git a/tests/experiments/generic/type-to-value-4.slang b/tests/experiments/generic/type-to-value-4.slang
index 741b30791..8d768b54b 100644
--- a/tests/experiments/generic/type-to-value-4.slang
+++ b/tests/experiments/generic/type-to-value-4.slang
@@ -1,4 +1,4 @@
-//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
+//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
/* Test here is to try and associate a value with a type
@@ -52,26 +52,25 @@ interface IGetE
static Enum getE();
};
-public struct A : IGetE
+struct A : IGetE
{
static Enum getE() { return Enum::A; }
};
-public struct B : IGetE
+struct B : IGetE
{
static Enum getE() { return Enum::B; }
};
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
-{
- int index = dispatchThreadID.x;
+{
// Err.. even though IGetE doesn't require an instanciation, not clear how to set it. So lets try with instanciation
B b;
IGetE g = b;
let e = g.getE();
-
+
outputBuffer[dispatchThreadID.x] = int(e);
-} \ No newline at end of file
+}
diff --git a/tests/experiments/generic/type-to-value-4.slang.expected.txt b/tests/experiments/generic/type-to-value-4.slang.expected.txt
new file mode 100644
index 000000000..98fb6a686
--- /dev/null
+++ b/tests/experiments/generic/type-to-value-4.slang.expected.txt
@@ -0,0 +1,4 @@
+1
+1
+1
+1