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@gmail.com>2013-11-16 03:17:10 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-18 11:48:15 +0400
commitc18712e86814d176433cea781fe1e68715c23bd4 (patch)
treea9aa7a0b34940dceb00f290c720f4a2733819f44 /intern/cycles/kernel/svm/svm_math.h
parent6f67f7c18cf2c6224f3e3d796bf0d83d2f098b2e (diff)
Cycles: change __device and similar qualifiers to ccl_device in kernel code.
This to avoids build conflicts with libc++ on FreeBSD, these __ prefixed values are reserved for compilers. I apologize to anyone who has patches or branches and has to go through the pain of merging this change, it may be easiest to do these same replacements in your code and then apply/merge the patch. Ref T37477.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_math.h')
-rw-r--r--intern/cycles/kernel/svm/svm_math.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_math.h b/intern/cycles/kernel/svm/svm_math.h
index d4863dd6216..bb46d443a6b 100644
--- a/intern/cycles/kernel/svm/svm_math.h
+++ b/intern/cycles/kernel/svm/svm_math.h
@@ -16,7 +16,7 @@
CCL_NAMESPACE_BEGIN
-__device float svm_math(NodeMath type, float Fac1, float Fac2)
+ccl_device float svm_math(NodeMath type, float Fac1, float Fac2)
{
float Fac;
@@ -64,12 +64,12 @@ __device float svm_math(NodeMath type, float Fac1, float Fac2)
return Fac;
}
-__device float average_fac(float3 v)
+ccl_device float average_fac(float3 v)
{
return (fabsf(v.x) + fabsf(v.y) + fabsf(v.z))/3.0f;
}
-__device void svm_vector_math(float *Fac, float3 *Vector, NodeVectorMath type, float3 Vector1, float3 Vector2)
+ccl_device void svm_vector_math(float *Fac, float3 *Vector, NodeVectorMath type, float3 Vector1, float3 Vector2)
{
if(type == NODE_VECTOR_MATH_ADD) {
*Vector = Vector1 + Vector2;
@@ -104,7 +104,7 @@ __device void svm_vector_math(float *Fac, float3 *Vector, NodeVectorMath type, f
/* Nodes */
-__device void svm_node_math(KernelGlobals *kg, ShaderData *sd, float *stack, uint itype, uint f1_offset, uint f2_offset, int *offset)
+ccl_device void svm_node_math(KernelGlobals *kg, ShaderData *sd, float *stack, uint itype, uint f1_offset, uint f2_offset, int *offset)
{
NodeMath type = (NodeMath)itype;
float f1 = stack_load_float(stack, f1_offset);
@@ -116,7 +116,7 @@ __device void svm_node_math(KernelGlobals *kg, ShaderData *sd, float *stack, uin
stack_store_float(stack, node1.y, f);
}
-__device void svm_node_vector_math(KernelGlobals *kg, ShaderData *sd, float *stack, uint itype, uint v1_offset, uint v2_offset, int *offset)
+ccl_device void svm_node_vector_math(KernelGlobals *kg, ShaderData *sd, float *stack, uint itype, uint v1_offset, uint v2_offset, int *offset)
{
NodeVectorMath type = (NodeVectorMath)itype;
float3 v1 = stack_load_float3(stack, v1_offset);