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/kernel_film.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/kernel_film.h')
-rw-r--r--intern/cycles/kernel/kernel_film.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/intern/cycles/kernel/kernel_film.h b/intern/cycles/kernel/kernel_film.h
index 370c550a515..b4118666491 100644
--- a/intern/cycles/kernel/kernel_film.h
+++ b/intern/cycles/kernel/kernel_film.h
@@ -16,7 +16,7 @@
CCL_NAMESPACE_BEGIN
-__device float4 film_map(KernelGlobals *kg, float4 irradiance, float scale)
+ccl_device float4 film_map(KernelGlobals *kg, float4 irradiance, float scale)
{
float exposure = kernel_data.film.exposure;
float4 result = irradiance*scale;
@@ -32,7 +32,7 @@ __device float4 film_map(KernelGlobals *kg, float4 irradiance, float scale)
return result;
}
-__device uchar4 film_float_to_byte(float4 color)
+ccl_device uchar4 film_float_to_byte(float4 color)
{
uchar4 result;
@@ -45,8 +45,8 @@ __device uchar4 film_float_to_byte(float4 color)
return result;
}
-__device void kernel_film_convert_to_byte(KernelGlobals *kg,
- __global uchar4 *rgba, __global float *buffer,
+ccl_device void kernel_film_convert_to_byte(KernelGlobals *kg,
+ ccl_global uchar4 *rgba, ccl_global float *buffer,
float sample_scale, int x, int y, int offset, int stride)
{
/* buffer offset */
@@ -56,22 +56,22 @@ __device void kernel_film_convert_to_byte(KernelGlobals *kg,
buffer += index*kernel_data.film.pass_stride;
/* map colors */
- float4 irradiance = *((__global float4*)buffer);
+ float4 irradiance = *((ccl_global float4*)buffer);
float4 float_result = film_map(kg, irradiance, sample_scale);
uchar4 byte_result = film_float_to_byte(float_result);
*rgba = byte_result;
}
-__device void kernel_film_convert_to_half_float(KernelGlobals *kg,
- __global uchar4 *rgba, __global float *buffer,
+ccl_device void kernel_film_convert_to_half_float(KernelGlobals *kg,
+ ccl_global uchar4 *rgba, ccl_global float *buffer,
float sample_scale, int x, int y, int offset, int stride)
{
/* buffer offset */
int index = offset + x + y*stride;
- __global float4 *in = (__global float4*)(buffer + index*kernel_data.film.pass_stride);
- __global half *out = (__global half*)rgba + index*4;
+ ccl_global float4 *in = (ccl_global float4*)(buffer + index*kernel_data.film.pass_stride);
+ ccl_global half *out = (ccl_global half*)rgba + index*4;
float exposure = kernel_data.film.exposure;