Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-20 16:25:45 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-20 16:25:45 +0400
commit40259cfe7bf8ab3fa844d87b61096562c9ea2e42 (patch)
treea241f884d68b517706dac392ca861bd1a9c3f282 /intern/cycles/kernel/kernel_camera.h
parent72d2d05770a721986986c137a5cbc36cb796062f (diff)
Cycles: avoid using float3 in kernel constant memory, just so we're sure alignment
is working compatible between cpu and gpu.
Diffstat (limited to 'intern/cycles/kernel/kernel_camera.h')
-rw-r--r--intern/cycles/kernel/kernel_camera.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h
index 9cdc2f1f865..2dbdd076891 100644
--- a/intern/cycles/kernel/kernel_camera.h
+++ b/intern/cycles/kernel/kernel_camera.h
@@ -74,8 +74,8 @@ __device void camera_sample_perspective(KernelGlobals *kg, float raster_x, float
ray->dP.dx = make_float3(0.0f, 0.0f, 0.0f);
ray->dP.dy = make_float3(0.0f, 0.0f, 0.0f);
- ray->dD.dx = normalize(Ddiff + kernel_data.cam.dx) - normalize(Ddiff);
- ray->dD.dy = normalize(Ddiff + kernel_data.cam.dy) - normalize(Ddiff);
+ ray->dD.dx = normalize(Ddiff + float4_to_float3(kernel_data.cam.dx)) - normalize(Ddiff);
+ ray->dD.dy = normalize(Ddiff + float4_to_float3(kernel_data.cam.dy)) - normalize(Ddiff);
#endif
#ifdef __CAMERA_CLIPPING__
@@ -107,8 +107,8 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
#ifdef __RAY_DIFFERENTIALS__
/* ray differential */
- ray->dP.dx = kernel_data.cam.dx;
- ray->dP.dy = kernel_data.cam.dy;
+ ray->dP.dx = float4_to_float3(kernel_data.cam.dx);
+ ray->dP.dy = float4_to_float3(kernel_data.cam.dy);
ray->dD.dx = make_float3(0.0f, 0.0f, 0.0f);
ray->dD.dy = make_float3(0.0f, 0.0f, 0.0f);