summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2010-12-15 20:00:42 +0100
committerAlex Deucher <alexdeucher@gmail.com>2010-12-29 11:04:32 -0500
commitaa196d047c2d42835f3f6f25ac304b312f33f4f9 (patch)
tree7b54d9d5042584a208c369b4cc2d8f90c5557963
parent747279c21cabef8c55842d5b8ca04f0f63e53c2d (diff)
r600g: fix pow(0, 0) evaluating to NaN
We have to use the non-IEEE compliant version of MUL here, since log2(0) is -inf, and 0 * -inf is NaN in IEEE arithmetic. candidates for 7.10 branch
-rw-r--r--src/gallium/drivers/r600/r600_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index d6455023a3a..9c7b7f0a578 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1451,7 +1451,7 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
return r;
/* b * LOG2(a) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
- alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE);
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
r = tgsi_src(ctx, &inst->Src[1], &alu.src[0]);
if (r)
return r;