Module: Mesa Branch: 8.0 Commit: b3088ccee0f2ab6a10fa5d4f06935d02a149f0a7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3088ccee0f2ab6a10fa5d4f06935d02a149f0a7
Author: Marek Olšák <[email protected]> Date: Tue Sep 25 17:20:38 2012 +0200 r600g: fix RSQ of negative value on Cayman NOTE: This is a candidate for the stable branches. (cherry picked from commit fd5c5384648a0d6191c19748a2d1f1148c5ee98f) --- src/gallium/drivers/r600/r600_shader.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index d63309e..59ea340 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -1461,6 +1461,11 @@ static int cayman_emit_float_instr(struct r600_shader_ctx *ctx) alu.inst = ctx->inst_info->r600_opcode; for (j = 0; j < inst->Instruction.NumSrcRegs; j++) { r600_bytecode_src(&alu.src[j], &ctx->src[j], 0); + + /* RSQ should take the absolute value of src */ + if (ctx->inst_info->tgsi_opcode == TGSI_OPCODE_RSQ) { + r600_bytecode_src_set_abs(&alu.src[j]); + } } tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
