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/closure/bsdf_toon.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/closure/bsdf_toon.h')
-rw-r--r--intern/cycles/kernel/closure/bsdf_toon.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_toon.h b/intern/cycles/kernel/closure/bsdf_toon.h
index e69981dba77..797fa4227ae 100644
--- a/intern/cycles/kernel/closure/bsdf_toon.h
+++ b/intern/cycles/kernel/closure/bsdf_toon.h
@@ -37,7 +37,7 @@ CCL_NAMESPACE_BEGIN
/* DIFFUSE TOON */
-__device int bsdf_diffuse_toon_setup(ShaderClosure *sc)
+ccl_device int bsdf_diffuse_toon_setup(ShaderClosure *sc)
{
sc->type = CLOSURE_BSDF_DIFFUSE_TOON_ID;
sc->data0 = clamp(sc->data0, 0.0f, 1.0f);
@@ -46,11 +46,11 @@ __device int bsdf_diffuse_toon_setup(ShaderClosure *sc)
return SD_BSDF|SD_BSDF_HAS_EVAL;
}
-__device void bsdf_diffuse_toon_blur(ShaderClosure *sc, float roughness)
+ccl_device void bsdf_diffuse_toon_blur(ShaderClosure *sc, float roughness)
{
}
-__device float3 bsdf_toon_get_intensity(float max_angle, float smooth, float angle)
+ccl_device float3 bsdf_toon_get_intensity(float max_angle, float smooth, float angle)
{
float is;
@@ -64,12 +64,12 @@ __device float3 bsdf_toon_get_intensity(float max_angle, float smooth, float ang
return make_float3(is, is, is);
}
-__device float bsdf_toon_get_sample_angle(float max_angle, float smooth)
+ccl_device float bsdf_toon_get_sample_angle(float max_angle, float smooth)
{
return fminf(max_angle + smooth, M_PI_2_F);
}
-__device float3 bsdf_diffuse_toon_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+ccl_device float3 bsdf_diffuse_toon_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
{
float max_angle = sc->data0*M_PI_2_F;
float smooth = sc->data1*M_PI_2_F;
@@ -87,12 +87,12 @@ __device float3 bsdf_diffuse_toon_eval_reflect(const ShaderClosure *sc, const fl
return make_float3(0.0f, 0.0f, 0.0f);
}
-__device float3 bsdf_diffuse_toon_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+ccl_device float3 bsdf_diffuse_toon_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
{
return make_float3(0.0f, 0.0f, 0.0f);
}
-__device int bsdf_diffuse_toon_sample(const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
+ccl_device int bsdf_diffuse_toon_sample(const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
{
float max_angle = sc->data0*M_PI_2_F;
float smooth = sc->data1*M_PI_2_F;
@@ -121,7 +121,7 @@ __device int bsdf_diffuse_toon_sample(const ShaderClosure *sc, float3 Ng, float3
/* GLOSSY TOON */
-__device int bsdf_glossy_toon_setup(ShaderClosure *sc)
+ccl_device int bsdf_glossy_toon_setup(ShaderClosure *sc)
{
sc->type = CLOSURE_BSDF_GLOSSY_TOON_ID;
sc->data0 = clamp(sc->data0, 0.0f, 1.0f);
@@ -130,11 +130,11 @@ __device int bsdf_glossy_toon_setup(ShaderClosure *sc)
return SD_BSDF|SD_BSDF_HAS_EVAL;
}
-__device void bsdf_glossy_toon_blur(ShaderClosure *sc, float roughness)
+ccl_device void bsdf_glossy_toon_blur(ShaderClosure *sc, float roughness)
{
}
-__device float3 bsdf_glossy_toon_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+ccl_device float3 bsdf_glossy_toon_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
{
float max_angle = sc->data0*M_PI_2_F;
float smooth = sc->data1*M_PI_2_F;
@@ -158,12 +158,12 @@ __device float3 bsdf_glossy_toon_eval_reflect(const ShaderClosure *sc, const flo
return make_float3(0.0f, 0.0f, 0.0f);
}
-__device float3 bsdf_glossy_toon_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+ccl_device float3 bsdf_glossy_toon_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
{
return make_float3(0.0f, 0.0f, 0.0f);
}
-__device int bsdf_glossy_toon_sample(const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
+ccl_device int bsdf_glossy_toon_sample(const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
{
float max_angle = sc->data0*M_PI_2_F;
float smooth = sc->data1*M_PI_2_F;