Mesa (main): microsoft/clc: Fixes narrowing error in clc_compiler_test.cpp with mingw/gcc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 23 10:06:39 UTC 2022
Module: Mesa
Branch: main
Commit: e1e94f8c81c4142b8ba53ad4cd054457be342d5d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1e94f8c81c4142b8ba53ad4cd054457be342d5d
Author: Yonggang Luo <luoyonggang at gmail.com>
Date: Sat May 7 09:46:21 2022 +0800
microsoft/clc: Fixes narrowing error in clc_compiler_test.cpp with mingw/gcc
errors:
../../src/microsoft/clc/clc_compiler_test.cpp:563:19: error: narrowing conversion of '268435457' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing]
563 | 0x00000000, 0x10000001, 0x20000020, 0x30000300,
| ^~~~~~~~~~
../../src/microsoft/clc/clc_compiler_test.cpp:563:31: error: narrowing conversion of '536870944' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing]
563 | 0x00000000, 0x10000001, 0x20000020, 0x30000300,
| ^~~~~~~~~~
../../src/microsoft/clc/clc_compiler_test.cpp:563:43: error: narrowing conversion of '805307136' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing]
563 | 0x00000000, 0x10000001, 0x20000020, 0x30000300,
Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Acked-by: Daniel Stone <daniels at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>
---
src/microsoft/clc/clc_compiler_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/microsoft/clc/clc_compiler_test.cpp b/src/microsoft/clc/clc_compiler_test.cpp
index f84565f4b6f..4a02e39cf7c 100644
--- a/src/microsoft/clc/clc_compiler_test.cpp
+++ b/src/microsoft/clc/clc_compiler_test.cpp
@@ -559,7 +559,7 @@ TEST_F(ComputeTest, DISABLED_complex_types_local_array_long)
inout[idx] = tmp[idx];\n\
}\n";
auto inout = ShaderArg<uint64_t>({ 0, 0, 0, 0 }, SHADER_ARG_INOUT);
- const uint16_t expected[] = {
+ const uint64_t expected[] = {
0x00000000, 0x10000001, 0x20000020, 0x30000300,
};
run_shader(kernel_source, inout.size(), 1, 1, inout);
More information about the mesa-commit
mailing list