Module: Mesa
Branch: master
Commit: 570d5b79929554a45d8aebd294bbd67969396ba5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=570d5b79929554a45d8aebd294bbd67969396ba5

Author: Roland Scheidegger <srol...@vmware.com>
Date:   Thu Nov  9 19:50:41 2017 +0100

r600: use ieee version of rsq

Both r600 and evergreen used the clamped version, whereas cayman used the
ieee one. I don't think there's a valid reason for this discrepancy, so let's
switch to the ieee version for r600 and evergreen too, since we generally
want to stick to ieee arithmetic.
With this, behavior for both rcp and rsq should now be the same for all of
r600, eg, cm, all using ieee versions (albeit note rsq retains the abs
behavior for everybody, which may not be a good idea ultimately).

Reviewed-by: Dave Airlie <airl...@redhat.com>

---

 src/gallium/drivers/r600/r600_shader.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index 547eebac12..b1a164e594 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -4865,11 +4865,7 @@ static int tgsi_rsq(struct r600_shader_ctx *ctx)
 
        memset(&alu, 0, sizeof(struct r600_bytecode_alu));
 
-       /* XXX:
-        * For state trackers other than OpenGL, we'll want to use
-        * _RECIPSQRT_IEEE instead.
-        */
-       alu.op = ALU_OP1_RECIPSQRT_CLAMPED;
+       alu.op = ALU_OP1_RECIPSQRT_IEEE;
 
        for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
                r600_bytecode_src(&alu.src[i], &ctx->src[i], 0);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to