fix rsq
authorZack Rusin <zack@tungstengraphics.com>
Fri, 16 May 2008 21:35:47 +0000 (17:35 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Sat, 17 May 2008 17:58:44 +0000 (13:58 -0400)
src/gallium/auxiliary/gallivm/soabuiltins.c

index 64c02aa967539a6f54c22b84b43a2d855d5f73b1..62c75f18f48aae175808dfbedf846b88bdd6ef4e 100644 (file)
@@ -182,7 +182,7 @@ void rsq(float4 *res,
 {
    const float4 onevec = (float4) {1., 1., 1., 1.};
    res[0] = onevec/sqrtvec(absvec(tmp0x));
-   res[1] = res[0];
-   res[2] = res[0];
-   res[3] = res[0];
+   res[1] = onevec/sqrtvec(absvec(tmp0y));
+   res[2] = onevec/sqrtvec(absvec(tmp0z));
+   res[3] = onevec/sqrtvec(absvec(tmp0w));
 }