projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07ea20d
)
test/amdgpu: fix compiler warnings
author
Christian König
<christian.koenig@amd.com>
Sun, 7 Jan 2018 09:10:15 +0000
(10:10 +0100)
committer
Christian König
<christian.koenig@amd.com>
Tue, 9 Jan 2018 16:15:13 +0000
(17:15 +0100)
SWAP_32() should mask first and then shift.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
tests/amdgpu/basic_tests.c
patch
|
blob
|
history
diff --git
a/tests/amdgpu/basic_tests.c
b/tests/amdgpu/basic_tests.c
index
474a679
..
9c91895
100644
(file)
--- a/
tests/amdgpu/basic_tests.c
+++ b/
tests/amdgpu/basic_tests.c
@@
-253,10
+253,10
@@
CU_TestInfo basic_tests[] = {
-#define SWAP_32(num) ((
num>>24)&0xff
) | \
-
((num<<8)&0xff0000
) | \
-
((num>>8)&0xff00
) | \
-
((num<<24)&0xff000000
)
+#define SWAP_32(num) ((
(num & 0xff000000) >> 24
) | \
+
((num & 0x0000ff00) << 8
) | \
+
((num & 0x00ff0000) >> 8
) | \
+
((num & 0x000000ff) << 24)
)
/* Shader code