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>2012-01-27 17:58:32 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-27 17:58:32 +0400
commitb023665551d2059d34ffa45d4234abb3d1c92736 (patch)
tree1f2013fa4cf048a52b0282a3edec8db2d14bbb1c /intern/cycles/device/device_cuda.cpp
parent3062798de3a34d461578da4bd9d8d4f700f70ddb (diff)
Cycles: another fix for CUDA render passes, needed to align float4 passes.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 14bcaa94130..0c08baae3ff 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -106,11 +106,6 @@ public:
}
}
- static int cuda_align_up(int& offset, int alignment)
- {
- return (offset + alignment - 1) & ~(alignment - 1);
- }
-
#ifdef NDEBUG
#define cuda_abort()
#else
@@ -485,7 +480,7 @@ public:
offset += sizeof(d_rng_state);
int sample = task.sample;
- offset = cuda_align_up(offset, __alignof(sample));
+ offset = align_up(offset, __alignof(sample));
cuda_assert(cuParamSeti(cuPathTrace, offset, task.sample))
offset += sizeof(task.sample);
@@ -549,7 +544,7 @@ public:
offset += sizeof(d_buffer);
int sample = task.sample;
- offset = cuda_align_up(offset, __alignof(sample));
+ offset = align_up(offset, __alignof(sample));
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.sample))
offset += sizeof(task.sample);
@@ -618,7 +613,7 @@ public:
offset += sizeof(d_offset);
int shader_eval_type = task.shader_eval_type;
- offset = cuda_align_up(offset, __alignof(shader_eval_type));
+ offset = align_up(offset, __alignof(shader_eval_type));
cuda_assert(cuParamSeti(cuDisplace, offset, task.shader_eval_type))
offset += sizeof(task.shader_eval_type);