From 3bbac5f16e9dd47acd2132c0bb2a43393831c450 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 13 Apr 2023 16:40:36 -0700 Subject: Warn on float-to-double coercion for arguments. (#2802) * Warn on float-to-double coercion for arguments. * Fix test. * Rename. * Fixup. --------- Co-authored-by: Yong He --- tests/hlsl-intrinsic/matrix-double.slang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/hlsl-intrinsic/matrix-double.slang b/tests/hlsl-intrinsic/matrix-double.slang index 08bd78cee..31ec54f8e 100644 --- a/tests/hlsl-intrinsic/matrix-double.slang +++ b/tests/hlsl-intrinsic/matrix-double.slang @@ -101,7 +101,7 @@ void test1(inout FloatMatrix ft, inout FloatMatrix f, int idx) { float scalarVs[] = { 1, 10, 100, 1000 }; - ft += FloatMatrix(IntMatrix(log10(makeFloatMatrix(scalarVs[idx])) + makeFloatMatrix(0.5f))); + ft += FloatMatrix(IntMatrix(log10(makeFloatMatrix(Float(scalarVs[idx]))) + makeFloatMatrix(0.5f))); } ft += abs(f * makeFloatMatrix(4) - makeFloatMatrix(2.0f)); -- cgit v1.2.3