From 271ae7165915cf9910e2de0224159ea0fdd8ce72 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Mon, 3 Apr 2023 11:46:03 +0800 Subject: 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 --- tests/compute/half-rw-texture-simple.slang | 2 +- tests/compute/half-texture-simple.slang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/compute') 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 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 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; -- cgit v1.2.3