diff options
author | Jonathan Gray <[email protected]> | 2013-06-17 01:11:01 +1000 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-06-17 17:22:28 +0200 |
commit | ebd68dd02998a8595cb10844c37a6b02dc3078a8 (patch) | |
tree | 913aa00684f4ac5f41d073a9c55147ccee5535a9 /src/gallium/drivers/r600/r600_shader.c | |
parent | 7807763dd84ae381e208f74a0f4b7476b70ffbe8 (diff) |
gallium: replace bswap_32 calls with util_bswap32
byteswap.h and bswap_32 aren't portable, replace them with calls to
gallium's util_bswap32 as suggested by Mark Kettenis. Lets these files
build on OpenBSD.
Signed-off-by: Jonathan Gray <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 81ed3cec4b7..3a734bc78b7 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -35,9 +35,9 @@ #include "tgsi/tgsi_scan.h" #include "tgsi/tgsi_dump.h" #include "util/u_memory.h" +#include "util/u_math.h" #include <stdio.h> #include <errno.h> -#include <byteswap.h> /* CAYMAN notes Why CAYMAN got loops for lots of instructions is explained here. @@ -194,7 +194,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx, ptr = r600_buffer_mmap_sync_with_rings(rctx, shader->bo, PIPE_TRANSFER_WRITE); if (R600_BIG_ENDIAN) { for (i = 0; i < shader->shader.bc.ndw; ++i) { - ptr[i] = bswap_32(shader->shader.bc.bytecode[i]); + ptr[i] = util_bswap32(shader->shader.bc.bytecode[i]); } } else { memcpy(ptr, shader->shader.bc.bytecode, shader->shader.bc.ndw * sizeof(*ptr)); |