diff options
author | Zack Rusin <zack@pixel.(none)> | 2008-03-01 09:50:41 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2008-03-01 15:28:00 -0500 |
commit | a9c40f833ead8459788b86603c7f2b94632b1109 (patch) | |
tree | 5ee93b8bd49ff289f4b9fdf90dbcec8ac05e24d5 /src/gallium/auxiliary/gallivm/soabuiltins.c | |
parent | 17f543fc4529ca4ce7f73a840ed0fb50d1fec925 (diff) |
refactor code calling builtins and implement dp4
Diffstat (limited to 'src/gallium/auxiliary/gallivm/soabuiltins.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/soabuiltins.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/soabuiltins.c b/src/gallium/auxiliary/gallivm/soabuiltins.c index 0b428a750f4..24c14e1b698 100644 --- a/src/gallium/auxiliary/gallivm/soabuiltins.c +++ b/src/gallium/auxiliary/gallivm/soabuiltins.c @@ -46,6 +46,20 @@ void dp3(float4 *res, res[3] = dot; } + +void dp4(float4 *res, + float4 tmp0x, float4 tmp0y, float4 tmp0z, float4 tmp0w, + float4 tmp1x, float4 tmp1y, float4 tmp1z, float4 tmp1w) +{ + float4 dot = (tmp0x * tmp1x) + (tmp0y * tmp1y) + + (tmp0z * tmp1z) + (tmp0w * tmp1w); + + res[0] = dot; + res[1] = dot; + res[2] = dot; + res[3] = dot; +} + #if 0 void yo(float4 *out, float4 *in) { |