summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-04-03 11:46:03 +0800
committerGitHub <noreply@github.com>2023-04-02 20:46:03 -0700
commit271ae7165915cf9910e2de0224159ea0fdd8ce72 (patch)
tree9b4db47ec7c4ee59af46ea2ccc1c1caa074d618d /tests
parentd7ba60c993366b4aaf6ef8ee7d8eab940d61eac8 (diff)
Fix several silently failing tests (#2767)
* Add missing expected.txt for test * Diagnostics -> StdWriters in render test * Allow specifying several test prefixes to run `slang-test -- tests/foo tests/bar` * Squash warnings in some tests * Enable gfx debug layer in gfx test util Makes this issue present consistently: https://github.com/shader-slang/slang/issues/2766 * Allow DebugDevice to return interfaces instantiated by the debugged object * Check that we actaully have a shader cache for shader cache tests --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/autodiff/high-order-backward-diff-3.slang.expected.txt5
-rw-r--r--tests/bugs/generic-groupshared.slang2
-rw-r--r--tests/compute/half-rw-texture-simple.slang2
-rw-r--r--tests/compute/half-texture-simple.slang2
4 files changed, 8 insertions, 3 deletions
diff --git a/tests/autodiff/high-order-backward-diff-3.slang.expected.txt b/tests/autodiff/high-order-backward-diff-3.slang.expected.txt
index e69de29bb..0f08247f0 100644
--- a/tests/autodiff/high-order-backward-diff-3.slang.expected.txt
+++ b/tests/autodiff/high-order-backward-diff-3.slang.expected.txt
@@ -0,0 +1,5 @@
+type: float
+192.000000
+0.000000
+0.000000
+0.000000
diff --git a/tests/bugs/generic-groupshared.slang b/tests/bugs/generic-groupshared.slang
index c5ed8cf40..b352e7382 100644
--- a/tests/bugs/generic-groupshared.slang
+++ b/tests/bugs/generic-groupshared.slang
@@ -17,7 +17,7 @@ struct S<let n : int>
int doSomething()
{
table<M>(0) = M;
- return table<M>(0);
+ return int(table<M>(0));
}
}
diff --git a/tests/compute/half-rw-texture-simple.slang b/tests/compute/half-rw-texture-simple.slang
index 8077b36a6..739abfab7 100644
--- a/tests/compute/half-rw-texture-simple.slang
+++ b/tests/compute/half-rw-texture-simple.slang
@@ -25,7 +25,7 @@ RWStructuredBuffer<float> outputBuffer;
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
- int idx = dispatchThreadID.x;
+ uint idx = dispatchThreadID.x;
float val = 0.0f;
diff --git a/tests/compute/half-texture-simple.slang b/tests/compute/half-texture-simple.slang
index 124755534..5ddd84d64 100644
--- a/tests/compute/half-texture-simple.slang
+++ b/tests/compute/half-texture-simple.slang
@@ -35,7 +35,7 @@ RWStructuredBuffer<float> outputBuffer;
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
- int idx = dispatchThreadID.x;
+ uint idx = dispatchThreadID.x;
float u = idx * (1.0f / 4);
float val = 0.0f;