From a6628ab468048a899da6b4e3d5f99ae9bad67930 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Mon, 25 Nov 2024 12:55:31 +0800 Subject: [PATCH] Add missing WGSL intrinsics to test Closes https://github.com/shader-slang/slang/issues/5263 --- tests/autodiff/custom-intrinsic-1.slang | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/autodiff/custom-intrinsic-1.slang b/tests/autodiff/custom-intrinsic-1.slang index 1fe204b58a..f1d5116274 100644 --- a/tests/autodiff/custom-intrinsic-1.slang +++ b/tests/autodiff/custom-intrinsic-1.slang @@ -1,7 +1,5 @@ //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type -// slang-test/WGPU: IR opcode during code emit #5263 -//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu //TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer outputBuffer; @@ -19,6 +17,7 @@ namespace myintrinsiclib __target_intrinsic(cpp, "$P_exp($0)") __target_intrinsic(spirv, "12 resultType resultId glsl450 27 _0") __target_intrinsic(metal, "exp($0)") + __target_intrinsic(wgsl, "exp($0)") [ForwardDerivative(d_myexp)] T myexp(T x); @@ -39,6 +38,7 @@ namespace myintrinsiclib __target_intrinsic(cuda, "$P_sin($0)") __target_intrinsic(cpp, "$P_sin($0)") __target_intrinsic(spirv, "12 resultType resultId glsl450 13 _0") + __target_intrinsic(wgsl, "sin($0)") [ForwardDerivative(d_mysin)] T mysin(T x); @@ -58,6 +58,7 @@ namespace myintrinsiclib __target_intrinsic(cuda, "$P_cos($0)") __target_intrinsic(cpp, "$P_cos($0)") __target_intrinsic(spirv, "12 resultType resultId glsl450 14 _0") + __target_intrinsic(wgsl, "cos($0)") [ForwardDerivative(d_mycos)] T mycos(T x);