diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2022-08-07 01:26:10 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-09 16:47:24 +0000 |
commit | ecfda9a0fa02a12a8f5b22f5682d5db45a6f5a27 (patch) | |
tree | e823069f36c32afd324ecf65d66cbe4b4964f212 /src/microsoft | |
parent | c67e60ae8fefaeadbe06bf0cbd8ad2ee267a6c0e (diff) | |
download | mesa-ecfda9a0fa02a12a8f5b22f5682d5db45a6f5a27.tar.gz mesa-ecfda9a0fa02a12a8f5b22f5682d5db45a6f5a27.tar.bz2 mesa-ecfda9a0fa02a12a8f5b22f5682d5db45a6f5a27.zip |
microsoft/clc: Fixes compiling errors with clang/mingw64 in clc/clc_compiler_test.cpp
clc_compiler_test.cpp:1322:67: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list
log(0.0f) / log(2), log(1.0f) / log(2), log(2.0f) / log(2), log(3.0f) / log(2)
clc_compiler_test.cpp:2306:25: error: non-constant-expression cannot be narrowed from type 'std::vector<unsigned int>::size_type' (aka 'unsigned long long') to 'unsigned int' in initializer list
CompileArgs args = { inout.size(), 1, 1 };
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17926>
Diffstat (limited to 'src/microsoft')
-rw-r--r-- | src/microsoft/clc/clc_compiler_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/microsoft/clc/clc_compiler_test.cpp b/src/microsoft/clc/clc_compiler_test.cpp index 19ec352d931..3dc9075634a 100644 --- a/src/microsoft/clc/clc_compiler_test.cpp +++ b/src/microsoft/clc/clc_compiler_test.cpp @@ -1319,7 +1319,7 @@ TEST_F(ComputeTest, log2) }\n"; auto inout = ShaderArg<float>({ 0.0f, 1.0f, 2.0f, 3.0f }, SHADER_ARG_INOUT); const float expected[] = { - log(0.0f) / log(2), log(1.0f) / log(2), log(2.0f) / log(2), log(3.0f) / log(2) + log(0.0f) / log(2.0f), log(1.0f) / log(2.0f), log(2.0f) / log(2.0f), log(3.0f) / log(2.0f) }; run_shader(kernel_source, inout.size(), 1, 1, inout); for (int i = 0; i < inout.size(); ++i) @@ -2303,7 +2303,7 @@ TEST_F(ComputeTest, spec_constant) const uint32_t expected[] = { 0x00000005, 0x60000006, 0x000e000e, 0x20081018 }; - CompileArgs args = { inout.size(), 1, 1 }; + CompileArgs args = { (unsigned)inout.size(), 1, 1 }; run_shader(spec_shader, args, inout); for (int i = 0; i < inout.size(); ++i) EXPECT_EQ(inout[i], expected[i]); |