diff options
author | Matt Turner <[email protected]> | 2016-07-28 12:38:21 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-08-01 12:09:17 -0700 |
commit | 8e68f35d3208b313a106853a85994792446d0b72 (patch) | |
tree | 6e4efa35f70f928690ea0612fb5bd90418a2a04c /src/gallium/drivers/r600/r600_asm.c | |
parent | d2838f77ec9149149a2c87f8bd547239e1560a70 (diff) |
r600g: Avoid aliasing violations.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_asm.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index e2f54cb2ffd..f85993d4511 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -27,6 +27,7 @@ #include "r600d.h" #include <errno.h> +#include "util/u_bitcast.h" #include "util/u_dump.h" #include "util/u_memory.h" #include "util/u_math.h" @@ -1956,7 +1957,7 @@ static int print_src(struct r600_bytecode_alu *alu, unsigned idx) need_chan = 1; break; case V_SQ_ALU_SRC_LITERAL: - o += fprintf(stderr, "[0x%08X %f]", src->value, *(float*)&src->value); + o += fprintf(stderr, "[0x%08X %f]", src->value, u_bitcast_u2f(src->value)); break; case V_SQ_ALU_SRC_0_5: o += fprintf(stderr, "0.5"); |