diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-16 03:17:10 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-18 11:48:15 +0400 |
commit | c18712e86814d176433cea781fe1e68715c23bd4 (patch) | |
tree | a9aa7a0b34940dceb00f290c720f4a2733819f44 /intern/cycles/kernel/svm/svm_mix.h | |
parent | 6f67f7c18cf2c6224f3e3d796bf0d83d2f098b2e (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_mix.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_mix.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/intern/cycles/kernel/svm/svm_mix.h b/intern/cycles/kernel/svm/svm_mix.h index 506f772dba5..0eeb4cf9b05 100644 --- a/intern/cycles/kernel/svm/svm_mix.h +++ b/intern/cycles/kernel/svm/svm_mix.h @@ -16,22 +16,22 @@ CCL_NAMESPACE_BEGIN -__device float3 svm_mix_blend(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_blend(float t, float3 col1, float3 col2) { return interp(col1, col2, t); } -__device float3 svm_mix_add(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_add(float t, float3 col1, float3 col2) { return interp(col1, col1 + col2, t); } -__device float3 svm_mix_mul(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_mul(float t, float3 col1, float3 col2) { return interp(col1, col1 * col2, t); } -__device float3 svm_mix_screen(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_screen(float t, float3 col1, float3 col2) { float tm = 1.0f - t; float3 one = make_float3(1.0f, 1.0f, 1.0f); @@ -40,7 +40,7 @@ __device float3 svm_mix_screen(float t, float3 col1, float3 col2) return one - (tm3 + t*(one - col2))*(one - col1); } -__device float3 svm_mix_overlay(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_overlay(float t, float3 col1, float3 col2) { float tm = 1.0f - t; @@ -64,12 +64,12 @@ __device float3 svm_mix_overlay(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_sub(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_sub(float t, float3 col1, float3 col2) { return interp(col1, col1 - col2, t); } -__device float3 svm_mix_div(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_div(float t, float3 col1, float3 col2) { float tm = 1.0f - t; @@ -82,22 +82,22 @@ __device float3 svm_mix_div(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_diff(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_diff(float t, float3 col1, float3 col2) { return interp(col1, fabs(col1 - col2), t); } -__device float3 svm_mix_dark(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_dark(float t, float3 col1, float3 col2) { return min(col1, col2*t); } -__device float3 svm_mix_light(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_light(float t, float3 col1, float3 col2) { return max(col1, col2*t); } -__device float3 svm_mix_dodge(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_dodge(float t, float3 col1, float3 col2) { float3 outcol = col1; @@ -132,7 +132,7 @@ __device float3 svm_mix_dodge(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_burn(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_burn(float t, float3 col1, float3 col2) { float tmp, tm = 1.0f - t; @@ -171,7 +171,7 @@ __device float3 svm_mix_burn(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_hue(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_hue(float t, float3 col1, float3 col2) { float3 outcol = col1; @@ -188,7 +188,7 @@ __device float3 svm_mix_hue(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_sat(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_sat(float t, float3 col1, float3 col2) { float tm = 1.0f - t; @@ -206,7 +206,7 @@ __device float3 svm_mix_sat(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_val(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_val(float t, float3 col1, float3 col2) { float tm = 1.0f - t; @@ -218,7 +218,7 @@ __device float3 svm_mix_val(float t, float3 col1, float3 col2) return hsv_to_rgb(hsv); } -__device float3 svm_mix_color(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_color(float t, float3 col1, float3 col2) { float3 outcol = col1; float3 hsv2 = rgb_to_hsv(col2); @@ -235,7 +235,7 @@ __device float3 svm_mix_color(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_soft(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_soft(float t, float3 col1, float3 col2) { float tm = 1.0f - t; @@ -245,7 +245,7 @@ __device float3 svm_mix_soft(float t, float3 col1, float3 col2) return tm*col1 + t*((one - col1)*col2*col1 + col1*scr); } -__device float3 svm_mix_linear(float t, float3 col1, float3 col2) +ccl_device float3 svm_mix_linear(float t, float3 col1, float3 col2) { float3 outcol = col1; @@ -267,7 +267,7 @@ __device float3 svm_mix_linear(float t, float3 col1, float3 col2) return outcol; } -__device float3 svm_mix_clamp(float3 col) +ccl_device float3 svm_mix_clamp(float3 col) { float3 outcol = col; @@ -278,7 +278,7 @@ __device float3 svm_mix_clamp(float3 col) return outcol; } -__device float3 svm_mix(NodeMix type, float fac, float3 c1, float3 c2) +ccl_device float3 svm_mix(NodeMix type, float fac, float3 c1, float3 c2) { float t = clamp(fac, 0.0f, 1.0f); @@ -309,7 +309,7 @@ __device float3 svm_mix(NodeMix type, float fac, float3 c1, float3 c2) /* Node */ -__device void svm_node_mix(KernelGlobals *kg, ShaderData *sd, float *stack, uint fac_offset, uint c1_offset, uint c2_offset, int *offset) +ccl_device void svm_node_mix(KernelGlobals *kg, ShaderData *sd, float *stack, uint fac_offset, uint c1_offset, uint c2_offset, int *offset) { /* read extra data */ uint4 node1 = read_node(kg, offset); |