mesa: fix some broken /= operators
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 15 Jul 2008 21:32:53 +0000 (15:32 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 15 Jul 2008 22:41:19 +0000 (16:41 -0600)
src/mesa/shader/slang/library/slang_core.gc

index 82828a826c0dc673cf91f7b6ae8909df6dd4a481..0fd2b7e6b338cbf08c535a597ba6f5950a670842 100644 (file)
@@ -1226,6 +1226,7 @@ void __operator /= (inout int a, const int b)
    float invB;
    __asm float_rcp invB, b;
    __asm vec4_multiply a, a, invB;
+   __asm float_to_int __retVal, a;
 }
 
 
@@ -1518,7 +1519,7 @@ void __operator /= (inout vec2 v, const float a)
 {
    float invA;
    __asm float_rcp invA, a;
-   __asm vec4_multiply v.xy, v.xy, a.xx;
+   __asm vec4_multiply v.xy, v.xy, invA.xx;
 }
 
 
@@ -1543,7 +1544,7 @@ void __operator /= (inout vec3 v, const float a)
 {
    float invA;
    __asm float_rcp invA, a;
-   __asm vec4_multiply v.xyz, v.xyz, a.xxx;
+   __asm vec4_multiply v.xyz, v.xyz, invA.xxx;
 }
 
 
@@ -1568,7 +1569,7 @@ void __operator /= (inout vec4 v, const float a)
 {
    float invA;
    __asm float_rcp invA, a;
-   __asm vec4_multiply v, v, a.xxxx;
+   __asm vec4_multiply v, v, invA.xxxx;
 }