test/amdgpu: fix compiler warnings

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>
main
Christian König 2018-01-07 10:10:15 +01:00
parent 07ea20d5be
commit de807d1a74
1 changed files with 4 additions and 4 deletions

View File

@ -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