From 1308ca6d2168c5c2f81a8e675687e9d9a4db1a28 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 5 Aug 2008 16:18:39 -0600 Subject: mesa: glsl: re-org of intermediate/temp storage Simplify the code for allocating storage for intermediate results. Use fewer temps in some cases. Also, use new asm vec4_move intrinsic instead of regular assigments in various constructors. For example: float f; vec3 v; v.xyz = f; is not legal GLSL, so do this instead: __asm vec4_move v.xyz, f; // note: f will auto-expand into f.xxxx Plus, fix assorted bugs in structure comparison. --- .../shader/slang/library/slang_common_builtin.gc | 2 +- src/mesa/shader/slang/library/slang_core.gc | 275 +++++++++------------ 2 files changed, 118 insertions(+), 159 deletions(-) (limited to 'src/mesa/shader/slang/library') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 3726335471..f41d1fb603 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1418,7 +1418,7 @@ bvec4 greaterThan(const vec4 u, const vec4 v) bvec2 greaterThan(const ivec2 u, const ivec2 v) { - __asm vec4_sgt __retVal.xy, u, v; + __asm vec4_sgt __retVal.xy, u.xy, v.xy; } bvec3 greaterThan(const ivec3 u, const ivec3 v) diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 218383e001..840a0814c5 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -107,7 +107,7 @@ int __constructor(const float f) { - __asm float_to_int __retVal, f; + __asm vec4_to_ivec4 __retVal, f; } int __constructor(const bool b) @@ -122,14 +122,12 @@ int __constructor(const int i) bool __constructor(const int i) { - const float zero = 0.0; - __asm vec4_sne __retVal, i, zero; + __asm vec4_sne __retVal, i, 0.0; } bool __constructor(const float f) { - const float zero = 0.0; - __asm vec4_sne __retVal, f, zero; + __asm vec4_sne __retVal, f, 0.0; } bool __constructor(const bool b) @@ -139,12 +137,12 @@ bool __constructor(const bool b) float __constructor(const int i) { - __asm int_to_float __retVal, i; + __asm ivec4_to_vec4 __retVal, i; } float __constructor(const bool b) { - __retVal = b; + __asm ivec4_to_vec4 __retVal, b; } float __constructor(const float f) @@ -163,32 +161,33 @@ vec2 __constructor(const float x, const float y) vec2 __constructor(const float f) { - __retVal.xy = f.xx; + __asm vec4_move __retVal.xy, f; } vec2 __constructor(const int i) { - __retVal.xy = i.xx; + __asm ivec4_to_vec4 __retVal.xy, i; } vec2 __constructor(const bool b) { - __retVal.xy = b.xx; + __asm ivec4_to_vec4 __retVal.xy, b; } vec2 __constructor(const bvec2 b) { - __retVal = b; +// __retVal = b; + __asm ivec4_to_vec4 __retVal.xy, b; } vec2 __constructor(const vec3 v) { - __retVal.xy = v.xy; + __asm vec4_move __retVal.xy, v.xy; } vec2 __constructor(const vec4 v) { - __retVal.st = v.xy; + __asm vec4_move __retVal.xy, v.xy; } @@ -203,27 +202,28 @@ vec3 __constructor(const float x, const float y, const float z) vec3 __constructor(const float f) { - __retVal.xyz = f.xxx; + // Note: this could be "__retVal.xyz = f" but that's an illegal assignment + __asm vec4_move __retVal.xyz, f; } vec3 __constructor(const int i) { - __asm int_to_float __retVal.xyz, i.xxx; + __asm ivec4_to_vec4 __retVal.xyz, i; } vec3 __constructor(const bool b) { - __retVal.xyz = b.xxx; + __asm ivec4_to_vec4 __retVal.xyz, b; } vec3 __constructor(const bvec3 b) { - __retVal = b; + __asm ivec4_to_vec4 __retVal.xyz, b; } vec3 __constructor(const vec4 v) { - __retVal.xyz = v.xyz; + __asm vec4_move __retVal.xyz, v; } @@ -239,27 +239,28 @@ vec4 __constructor(const float x, const float y, const float z, const float w) vec4 __constructor(const float f) { - __retVal = f.xxxx; + // Note: this could be "__retVal = f" but that's an illegal assignment + __asm vec4_move __retVal, f; } vec4 __constructor(const int i) { - __retVal = i.xxxx; + __asm ivec4_to_vec4 __retVal, i; } vec4 __constructor(const bool b) { - __retVal = b.xxxx; + __asm ivec4_to_vec4 __retVal, b; } vec4 __constructor(const bvec4 b) { - __retVal = b; + __asm ivec4_to_vec4 __retVal, b; } vec4 __constructor(const ivec4 i) { - __retVal = i; + __asm ivec4_to_vec4 __retVal, i; } vec4 __constructor(const vec3 v3, const float f) @@ -288,17 +289,17 @@ ivec2 __constructor(const int i, const int j) ivec2 __constructor(const int i) { - __retVal.xy = i.xx; + __asm vec4_move __retVal.xy, i; } ivec2 __constructor(const float f) { - __asm float_to_int __retVal.xy, f.xx; + __asm vec4_to_ivec4 __retVal.xy, f; } ivec2 __constructor(const bool b) { - __asm float_to_int __retVal.xy, b.xx; + __asm vec4_to_ivec4 __retVal.xy, b; } @@ -313,17 +314,17 @@ ivec3 __constructor(const int i, const int j, const int k) ivec3 __constructor(const int i) { - __retVal.xyz = i.xxx; + __asm vec4_move __retVal.xyz, i; } ivec3 __constructor(const float f) { - __retVal.xyz = f.xxx; + __asm vec4_to_ivec4 __retVal.xyz, f; } ivec3 __constructor(const bool b) { - __retVal.xyz = b.xxx; + __asm vec4_move __retVal.xyz, b; } @@ -339,17 +340,17 @@ ivec4 __constructor(const int x, const int y, const int z, const int w) ivec4 __constructor(const int i) { - __retVal = i.xxxx; + __asm vec4_move __retVal, i; } ivec4 __constructor(const float f) { - __asm float_to_int __retVal, f.xxxx; + __asm vec4_to_ivec4 __retVal, f; } ivec4 __constructor(const bool b) { - __retVal = b.xxxx; + __asm vec4_to_ivec4 __retVal, b; } @@ -363,19 +364,17 @@ bvec2 __constructor(const bool b1, const bool b2) bvec2 __constructor(const bool b) { - __retVal.xy = b.xx; + __asm vec4_move __retVal.xy, b; } bvec2 __constructor(const float f) { - const vec2 zero = vec2(0.0, 0.0); - __asm vec4_sne __retVal.xy, f.xx, zero; + __asm vec4_sne __retVal.xy, f, 0.0; } bvec2 __constructor(const int i) { - const ivec2 zero = ivec2(0, 0); - __asm vec4_sne __retVal.xy, i.xx, zero; + __asm vec4_sne __retVal.xy, i, 0.0; } bvec2 __constructor(const vec2 v) @@ -385,8 +384,7 @@ bvec2 __constructor(const vec2 v) bvec2 __constructor(const ivec2 v) { - const ivec2 zero = ivec2(0, 0); - __asm vec4_sne __retVal.xy, v, zero; + __asm vec4_sne __retVal.xy, v, 0.0; } @@ -402,31 +400,27 @@ bvec3 __constructor(const bool b1, const bool b2, const bool b3) bvec3 __constructor(const bool b) { - __retVal.xyz = b.xxx; + __asm vec4_move __retVal.xyz, b; } bvec3 __constructor(const float f) { - const vec3 zero = vec3(0.0, 0.0, 0.0); - __asm vec4_sne __retVal.xyz, f.xxx, zero; + __asm vec4_sne __retVal.xyz, f, 0.0; } bvec3 __constructor(const int i) { - const ivec3 zero = ivec3(0, 0, 0); - __asm vec4_sne __retVal.xyz, i.xxx, zero; + __asm vec4_sne __retVal.xyz, i, 0.0; } bvec3 __constructor(const vec3 v) { - const vec3 zero = vec3(0.0, 0.0, 0.0); - __asm vec4_sne __retVal.xyz, v, zero; + __asm vec4_sne __retVal.xyz, v, 0.0; } bvec3 __constructor(const ivec3 v) { - const ivec3 zero = ivec3(0, 0, 0); - __asm vec4_sne __retVal.xyz, v, zero; + __asm vec4_sne __retVal.xyz, v, 0.0; } @@ -452,31 +446,27 @@ bvec4 __constructor(const float f1, const float f2, const float f3, const float bvec4 __constructor(const bool b) { - __retVal.xyzw = b.xxxx; + __asm vec4_move __retVal.xyzw, b; } bvec4 __constructor(const float f) { - const vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); - __asm vec4_sne __retVal, f.xxxx, zero; + __asm vec4_sne __retVal.xyzw, f, 0.0; } bvec4 __constructor(const int i) { - const ivec4 zero = ivec4(0, 0, 0, 0); - __asm vec4_sne __retVal, i.xxxx, zero; + __asm vec4_sne __retVal.xyzw, i, 0.0; } bvec4 __constructor(const vec4 v) { - const vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); - __asm vec4_sne __retVal, v, zero; + __asm vec4_sne __retVal.xyzw, v, 0.0; } bvec4 __constructor(const ivec4 v) { - const ivec4 zero = ivec4(0, 0, 0, 0); - __asm vec4_sne __retVal, v, zero; + __asm vec4_sne __retVal.xyzw, v, 0.0; } @@ -619,30 +609,17 @@ mat4 __constructor(const vec4 c0, const vec4 c1, const vec4 c2, const vec4 c3) int __operator + (const int a, const int b) { -// XXX If we ever have int registers, we'll do something like this: -// XXX For now, mostly treat ints as floats. -// float x, y; -// __asm int_to_float x, a; -// __asm int_to_float y, b; -// __asm vec4_add x.x, x.x, y.x; -// __asm float_to_int __retVal, x; - float x; - __asm vec4_add x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_add __retVal, a, b; } int __operator - (const int a, const int b) { - float x; - __asm vec4_subtract x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_subtract __retVal, a, b; } int __operator * (const int a, const int b) { - float x; - __asm vec4_multiply x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_multiply __retVal, a, b; } int __operator / (const int a, const int b) @@ -650,7 +627,7 @@ int __operator / (const int a, const int b) float bInv, x; __asm float_rcp bInv, b; __asm vec4_multiply x, a, bInv; - __asm float_to_int __retVal, x; + __asm vec4_to_ivec4 __retVal, x; } @@ -658,23 +635,17 @@ int __operator / (const int a, const int b) ivec2 __operator + (const ivec2 a, const ivec2 b) { - vec2 x; - __asm vec4_add x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_add __retVal, a, b; } ivec2 __operator - (const ivec2 a, const ivec2 b) { - vec2 x; - __asm vec4_subtract x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_subtract __retVal, a, b; } ivec2 __operator * (const ivec2 a, const ivec2 b) { - vec2 x; - __asm vec4_multiply x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_multiply __retVal, a, b; } ivec2 __operator / (const ivec2 a, const ivec2 b) @@ -683,7 +654,7 @@ ivec2 __operator / (const ivec2 a, const ivec2 b) __asm float_rcp bInv.x, b.x; __asm float_rcp bInv.y, b.y; __asm vec4_multiply x, a, bInv; - __asm float_to_int __retVal, x; + __asm vec4_to_ivec4 __retVal, x; } @@ -691,23 +662,17 @@ ivec2 __operator / (const ivec2 a, const ivec2 b) ivec3 __operator + (const ivec3 a, const ivec3 b) { - vec3 x; - __asm vec4_add x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_add __retVal, a, b; } ivec3 __operator - (const ivec3 a, const ivec3 b) { - vec3 x; - __asm vec4_subtract x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_subtract __retVal, a, b; } ivec3 __operator * (const ivec3 a, const ivec3 b) { - vec3 x; - __asm vec4_multiply x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_multiply __retVal, a, b; } ivec3 __operator / (const ivec3 a, const ivec3 b) @@ -717,7 +682,7 @@ ivec3 __operator / (const ivec3 a, const ivec3 b) __asm float_rcp bInv.y, b.y; __asm float_rcp bInv.z, b.z; __asm vec4_multiply x, a, bInv; - __asm float_to_int __retVal, x; + __asm vec4_to_ivec4 __retVal, x; } @@ -725,23 +690,17 @@ ivec3 __operator / (const ivec3 a, const ivec3 b) ivec4 __operator + (const ivec4 a, const ivec4 b) { - vec3 x; - __asm vec4_add x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_add __retVal, a, b; } ivec4 __operator - (const ivec4 a, const ivec4 b) { - vec4 x; - __asm vec4_subtract x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_subtract __retVal, a, b; } ivec4 __operator * (const ivec4 a, const ivec4 b) { - vec4 x; - __asm vec4_multiply x, a, b; - __asm float_to_int __retVal, x; + __asm vec4_multiply __retVal, a, b; } ivec4 __operator / (const ivec4 a, const ivec4 b) @@ -752,7 +711,7 @@ ivec4 __operator / (const ivec4 a, const ivec4 b) __asm float_rcp bInv.z, b.z; __asm float_rcp bInv.w, b.w; __asm vec4_multiply x, a, bInv; - __asm float_to_int __retVal, x; + __asm vec4_to_ivec4 __retVal, x; } @@ -760,24 +719,24 @@ ivec4 __operator / (const ivec4 a, const ivec4 b) float __operator + (const float a, const float b) { - __asm vec4_add __retVal.x, a, b; + __asm vec4_add __retVal, a, b; } float __operator - (const float a, const float b) { - __asm vec4_subtract __retVal.x, a, b; + __asm vec4_subtract __retVal, a, b; } float __operator * (const float a, const float b) { - __asm vec4_multiply __retVal.x, a, b; + __asm vec4_multiply __retVal, a, b; } float __operator / (const float a, const float b) { float bInv; - __asm float_rcp bInv.x, b.x; - __asm vec4_multiply __retVal.x, a, bInv; + __asm float_rcp bInv.x, b; + __asm vec4_multiply __retVal, a, bInv; } @@ -868,32 +827,32 @@ vec4 __operator / (const vec4 v, const vec4 u) vec2 __operator + (const float a, const vec2 u) { - __asm vec4_add __retVal.xy, a.xx, u.xy; + __asm vec4_add __retVal.xy, a, u.xy; } vec2 __operator + (const vec2 v, const float b) { - __asm vec4_add __retVal.xy, v.xy, b.xx; + __asm vec4_add __retVal.xy, v.xy, b; } vec2 __operator - (const float a, const vec2 u) { - __asm vec4_subtract __retVal.xy, a.xx, u.xy; + __asm vec4_subtract __retVal.xy, a, u.xy; } vec2 __operator - (const vec2 v, const float b) { - __asm vec4_subtract __retVal.xy, v.xy, b.xx; + __asm vec4_subtract __retVal.xy, v.xy, b; } vec2 __operator * (const float a, const vec2 u) { - __asm vec4_multiply __retVal.xy, a.xx, u.xy; + __asm vec4_multiply __retVal.xy, a, u.xy; } vec2 __operator * (const vec2 v, const float b) { - __asm vec4_multiply __retVal.xy, v.xy, b.xx; + __asm vec4_multiply __retVal.xy, v.xy, b; } vec2 __operator / (const float a, const vec2 u) @@ -901,14 +860,14 @@ vec2 __operator / (const float a, const vec2 u) vec2 invU; __asm float_rcp invU.x, u.x; __asm float_rcp invU.y, u.y; - __asm vec4_multiply __retVal.xy, a.xx, invU.xy; + __asm vec4_multiply __retVal.xy, a, invU.xy; } vec2 __operator / (const vec2 v, const float b) { float invB; __asm float_rcp invB, b; - __asm vec4_multiply __retVal.xy, v.xy, invB.xx; + __asm vec4_multiply __retVal.xy, v.xy, invB; } @@ -916,32 +875,32 @@ vec2 __operator / (const vec2 v, const float b) vec3 __operator + (const float a, const vec3 u) { - __asm vec4_add __retVal.xyz, a.xxx, u.xyz; + __asm vec4_add __retVal.xyz, a, u.xyz; } vec3 __operator + (const vec3 v, const float b) { - __asm vec4_add __retVal.xyz, v.xyz, b.xxx; + __asm vec4_add __retVal.xyz, v.xyz, b; } vec3 __operator - (const float a, const vec3 u) { - __asm vec4_subtract __retVal.xyz, a.xxx, u.xyz; + __asm vec4_subtract __retVal.xyz, a, u.xyz; } vec3 __operator - (const vec3 v, const float b) { - __asm vec4_subtract __retVal.xyz, v.xyz, b.xxx; + __asm vec4_subtract __retVal.xyz, v.xyz, b; } vec3 __operator * (const float a, const vec3 u) { - __asm vec4_multiply __retVal.xyz, a.xxx, u.xyz; + __asm vec4_multiply __retVal.xyz, a, u.xyz; } vec3 __operator * (const vec3 v, const float b) { - __asm vec4_multiply __retVal.xyz, v.xyz, b.xxx; + __asm vec4_multiply __retVal.xyz, v.xyz, b; } vec3 __operator / (const float a, const vec3 u) @@ -950,14 +909,14 @@ vec3 __operator / (const float a, const vec3 u) __asm float_rcp invU.x, u.x; __asm float_rcp invU.y, u.y; __asm float_rcp invU.z, u.z; - __asm vec4_multiply __retVal.xyz, a.xxx, invU.xyz; + __asm vec4_multiply __retVal.xyz, a, invU.xyz; } vec3 __operator / (const vec3 v, const float b) { float invB; __asm float_rcp invB, b; - __asm vec4_multiply __retVal.xyz, v.xyz, invB.xxx; + __asm vec4_multiply __retVal.xyz, v.xyz, invB; } @@ -965,32 +924,32 @@ vec3 __operator / (const vec3 v, const float b) vec4 __operator + (const float a, const vec4 u) { - __asm vec4_add __retVal, a.xxxx, u; + __asm vec4_add __retVal, a, u; } vec4 __operator + (const vec4 v, const float b) { - __asm vec4_add __retVal, v, b.xxxx; + __asm vec4_add __retVal, v, b; } vec4 __operator - (const float a, const vec4 u) { - __asm vec4_subtract __retVal, a.xxxx, u; + __asm vec4_subtract __retVal, a, u; } vec4 __operator - (const vec4 v, const float b) { - __asm vec4_subtract __retVal, v, b.xxxx; + __asm vec4_subtract __retVal, v, b; } vec4 __operator * (const float a, const vec4 u) { - __asm vec4_multiply __retVal, a.xxxx, u; + __asm vec4_multiply __retVal, a, u; } vec4 __operator * (const vec4 v, const float b) { - __asm vec4_multiply __retVal, v, b.xxxx; + __asm vec4_multiply __retVal, v, b; } vec4 __operator / (const float a, const vec4 u) @@ -1000,14 +959,14 @@ vec4 __operator / (const float a, const vec4 u) __asm float_rcp invU.y, u.y; __asm float_rcp invU.z, u.z; __asm float_rcp invU.w, u.w; - __asm vec4_multiply __retVal, a.xxxx, invU; + __asm vec4_multiply __retVal, a, invU; } vec4 __operator / (const vec4 v, const float b) { float invB; __asm float_rcp invB, b; - __asm vec4_multiply __retVal, v, invB.xxxx; + __asm vec4_multiply __retVal, v, invB; } @@ -1254,7 +1213,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 a, a; + __asm vec4_to_ivec4 a, a; } @@ -1281,7 +1240,7 @@ void __operator /= (inout ivec2 v, const ivec2 u) __asm float_rcp inv.x, u.x; __asm float_rcp inv.y, u.y; __asm vec4_multiply z, v, inv; - __asm float_to_int v, z; + __asm vec4_to_ivec4 v, z; } @@ -1308,7 +1267,7 @@ void __operator /= (inout ivec3 v, const ivec3 u) __asm float_rcp inv.x, u.x; __asm float_rcp inv.y, u.y; __asm vec4_multiply z, v, inv; - __asm float_to_int v, z; + __asm vec4_to_ivec4 v, z; } @@ -1335,7 +1294,7 @@ void __operator /= (inout ivec4 v, const ivec4 u) __asm float_rcp inv.x, u.x; __asm float_rcp inv.y, u.y; __asm vec4_multiply z, v, inv; - __asm float_to_int v, z; + __asm vec4_to_ivec4 v, z; } @@ -1450,17 +1409,17 @@ void __operator /= (inout vec4 v, const vec4 u) void __operator += (inout ivec2 v, const int a) { - __asm vec4_add v.xy, v.xy, a.xx; + __asm vec4_add v.xy, v.xy, a; } void __operator -= (inout ivec2 v, const int a) { - __asm vec4_subtract v.xy, v.xy, a.xx; + __asm vec4_subtract v.xy, v.xy, a; } void __operator *= (inout ivec2 v, const int a) { - __asm vec4_multiply v.xy, v.xy, a.xx; + __asm vec4_multiply v.xy, v.xy, a; v.x *= a; v.y *= a; } @@ -1477,17 +1436,17 @@ void __operator /= (inout ivec2 v, const int a) void __operator += (inout ivec3 v, const int a) { - __asm vec4_add v.xyz, v.xyz, a.xxx; + __asm vec4_add v.xyz, v.xyz, a; } void __operator -= (inout ivec3 v, const int a) { - __asm vec4_subtract v.xyz, v.xyz, a.xxx; + __asm vec4_subtract v.xyz, v.xyz, a; } void __operator *= (inout ivec3 v, const int a) { - __asm vec4_multiply v.xyz, v.xyz, a.xxx; + __asm vec4_multiply v.xyz, v.xyz, a; } void __operator /= (inout ivec3 v, const int a) @@ -1503,17 +1462,17 @@ void __operator /= (inout ivec3 v, const int a) void __operator += (inout ivec4 v, const int a) { - __asm vec4_add v, v, a.xxxx; + __asm vec4_add v, v, a; } void __operator -= (inout ivec4 v, const int a) { - __asm vec4_subtract v, v, a.xxxx; + __asm vec4_subtract v, v, a; } void __operator *= (inout ivec4 v, const int a) { - __asm vec4_multiply v, v, a.xxxx; + __asm vec4_multiply v, v, a; } void __operator /= (inout ivec4 v, const int a) @@ -1530,24 +1489,24 @@ void __operator /= (inout ivec4 v, const int a) void __operator += (inout vec2 v, const float a) { - __asm vec4_add v.xy, v, a.xx; + __asm vec4_add v.xy, v, a; } void __operator -= (inout vec2 v, const float a) { - __asm vec4_subtract v.xy, v, a.xx; + __asm vec4_subtract v.xy, v, a; } void __operator *= (inout vec2 v, const float a) { - __asm vec4_multiply v.xy, v, a.xx; + __asm vec4_multiply v.xy, v, a; } void __operator /= (inout vec2 v, const float a) { float invA; __asm float_rcp invA, a; - __asm vec4_multiply v.xy, v.xy, invA.xx; + __asm vec4_multiply v.xy, v.xy, invA; } @@ -1555,24 +1514,24 @@ void __operator /= (inout vec2 v, const float a) void __operator += (inout vec3 v, const float a) { - __asm vec4_add v.xyz, v, a.xxx; + __asm vec4_add v.xyz, v, a; } void __operator -= (inout vec3 v, const float a) { - __asm vec4_subtract v.xyz, v, a.xxx; + __asm vec4_subtract v.xyz, v, a; } void __operator *= (inout vec3 v, const float a) { - __asm vec4_multiply v.xyz, v, a.xxx; + __asm vec4_multiply v.xyz, v, a; } void __operator /= (inout vec3 v, const float a) { float invA; __asm float_rcp invA, a; - __asm vec4_multiply v.xyz, v.xyz, invA.xxx; + __asm vec4_multiply v.xyz, v.xyz, invA; } @@ -1580,24 +1539,24 @@ void __operator /= (inout vec3 v, const float a) void __operator += (inout vec4 v, const float a) { - __asm vec4_add v, v, a.xxxx; + __asm vec4_add v, v, a; } void __operator -= (inout vec4 v, const float a) { - __asm vec4_subtract v, v, a.xxxx; + __asm vec4_subtract v, v, a; } void __operator *= (inout vec4 v, const float a) { - __asm vec4_multiply v, v, a.xxxx; + __asm vec4_multiply v, v, a; } void __operator /= (inout vec4 v, const float a) { float invA; __asm float_rcp invA, a; - __asm vec4_multiply v, v, invA.xxxx; + __asm vec4_multiply v, v, invA; } -- cgit v1.2.3