diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-09 18:05:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-09 18:05:40 +0400 |
commit | d0ffbeec7393ec4f4b2d67e38ee8a25cfc704df9 (patch) | |
tree | 78bcb02fbd1a09501527eb8107583179f4835af8 /intern/cycles/util | |
parent | d236b4d60fb188fcd2bc0aba1ebdff58c8220f60 (diff) |
Cycles OpenCL: a few fixes to get things compiling after kernel changes,
for Apple OpenCL on OS X 10.8 and simple AO render.
Also environment variable CYCLES_OPENCL_TEST can now be set to CPU, GPU,
ACCELERATOR, DEFAULT or ALL values to test particuler devices.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_transform.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h index 10120ed5fdb..33761827dd7 100644 --- a/intern/cycles/util/util_transform.h +++ b/intern/cycles/util/util_transform.h @@ -109,19 +109,6 @@ __device_inline Transform transform_transpose(const Transform a) return t; } -__device_inline Transform operator*(const Transform a, const Transform b) -{ - Transform c = transform_transpose(b); - Transform t; - - t.x = make_float4(dot(a.x, c.x), dot(a.x, c.y), dot(a.x, c.z), dot(a.x, c.w)); - t.y = make_float4(dot(a.y, c.x), dot(a.y, c.y), dot(a.y, c.z), dot(a.y, c.w)); - t.z = make_float4(dot(a.z, c.x), dot(a.z, c.y), dot(a.z, c.z), dot(a.z, c.w)); - t.w = make_float4(dot(a.w, c.x), dot(a.w, c.y), dot(a.w, c.z), dot(a.w, c.w)); - - return t; -} - __device_inline Transform make_transform(float a, float b, float c, float d, float e, float f, float g, float h, float i, float j, float k, float l, @@ -139,6 +126,19 @@ __device_inline Transform make_transform(float a, float b, float c, float d, #ifndef __KERNEL_GPU__ +__device_inline Transform operator*(const Transform a, const Transform b) +{ + Transform c = transform_transpose(b); + Transform t; + + t.x = make_float4(dot(a.x, c.x), dot(a.x, c.y), dot(a.x, c.z), dot(a.x, c.w)); + t.y = make_float4(dot(a.y, c.x), dot(a.y, c.y), dot(a.y, c.z), dot(a.y, c.w)); + t.z = make_float4(dot(a.z, c.x), dot(a.z, c.y), dot(a.z, c.z), dot(a.z, c.w)); + t.w = make_float4(dot(a.w, c.x), dot(a.w, c.y), dot(a.w, c.z), dot(a.w, c.w)); + + return t; +} + __device_inline void print_transform(const char *label, const Transform& t) { print_float4(label, t.x); |