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
path: root/intern
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2011-12-02 11:13:48 +0400
committerDalai Felinto <dfelinto@gmail.com>2011-12-02 11:13:48 +0400
commit1da758ffff5b573c93a8e8104b2ed6a8407e2a57 (patch)
tree3686981ace8e3f0c3abdb734ec16fb6b9a37d2ca /intern
parent0cff8e6c9c8b2ac95d9f4dd9fd8410c682824cf2 (diff)
cycles separateRGB: fix for cuda kernel building.
Array indexing doesn't work there. I'm yet to setup my CUDA computer, in the meantime this proved to work (tested by Daniel Salazar). If I found other ways of doing it I get back to that.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/svm/svm_sepcomb_rgb.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/svm_sepcomb_rgb.h b/intern/cycles/kernel/svm/svm_sepcomb_rgb.h
index 5d3afef5566..4e23221e3cd 100644
--- a/intern/cycles/kernel/svm/svm_sepcomb_rgb.h
+++ b/intern/cycles/kernel/svm/svm_sepcomb_rgb.h
@@ -30,8 +30,14 @@ __device void svm_node_separate_rgb(ShaderData *sd, float *stack, uint icolor_of
{
float3 color = stack_load_float3(stack, icolor_offset);
- if (stack_valid(out_offset))
- stack_store_float(stack, out_offset, color[color_index]);
+ if (stack_valid(out_offset)) {
+ if (color_index == 0)
+ stack_store_float(stack, out_offset, color.x);
+ else if (color_index == 1)
+ stack_store_float(stack, out_offset, color.y);
+ else
+ stack_store_float(stack, out_offset, color.z);
+ }
}
CCL_NAMESPACE_END