Cycles: remove deprecated strict aliasing flag for opencl, fix missing update
[blender-staging.git] / intern / cycles / util / util_transform.h
index 998d4161ebf972995f01f2642ccafa8632e93f3d..c43736fb2e402b50802f050537f93ef4af345c22 100644 (file)
@@ -30,6 +30,11 @@ CCL_NAMESPACE_BEGIN
 
 typedef struct Transform {
        float4 x, y, z, w; /* rows */
+
+#ifndef __KERNEL_GPU__
+       float4 operator[](int i) const { return *(&x + i); }
+       float4& operator[](int i) { return *(&x + i); }
+#endif
 } Transform;
 
 __device_inline float3 transform(const Transform *t, const float3 a)