summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/soabuiltins.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2008-03-12 22:51:57 -0400
committerZack Rusin <[email protected]>2008-03-12 22:57:52 -0400
commitcac037d36d451e8cafbb4a759d0edf9fa8b1ca81 (patch)
tree5f4aa06ba9f1fa8c6091d9c164d217a245d06430 /src/gallium/auxiliary/gallivm/soabuiltins.c
parent2366bb1baf2e9ae5b6ecf19f66ae9e0a4b0d2f36 (diff)
add code handling dependencies between generated code
Diffstat (limited to 'src/gallium/auxiliary/gallivm/soabuiltins.c')
-rw-r--r--src/gallium/auxiliary/gallivm/soabuiltins.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/soabuiltins.c b/src/gallium/auxiliary/gallivm/soabuiltins.c
index 24c14e1b698..4d658be5208 100644
--- a/src/gallium/auxiliary/gallivm/soabuiltins.c
+++ b/src/gallium/auxiliary/gallivm/soabuiltins.c
@@ -60,6 +60,24 @@ void dp4(float4 *res,
res[3] = dot;
}
+extern float powf(float num, float p);
+
+void pow(float4 *res,
+ float4 tmp0x, float4 tmp0y, float4 tmp0z, float4 tmp0w,
+ float4 tmp1x, float4 tmp1y, float4 tmp1z, float4 tmp1w)
+{
+ float4 p;
+ p.x = powf(tmp0x.x, tmp1x.x);
+ p.y = powf(tmp0x.y, tmp1x.y);
+ p.z = powf(tmp0x.z, tmp1x.z);
+ p.w = powf(tmp0x.w, tmp1x.w);
+
+ res[0] = p;
+ res[1] = p;
+ res[2] = p;
+ res[3] = p;
+}
+
#if 0
void yo(float4 *out, float4 *in)
{