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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-26 19:37:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-26 19:37:33 +0400
commitde5d5ded7bf34f6f28027f173f781f058287f058 (patch)
tree9aa2eb7ef76a730a67cf57ce53fc3c098db86375 /intern
parentbcbe9ca5fc09caf617a355c52a6368f9c889adbc (diff)
Cycles: fixes for OpenCL build after pass changes, patch by Daniel Genrich.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_film.h2
-rw-r--r--intern/cycles/kernel/kernel_passes.h6
-rw-r--r--intern/cycles/kernel/kernel_path.h4
3 files changed, 7 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_film.h b/intern/cycles/kernel/kernel_film.h
index d0fb5402291..232049fb6cb 100644
--- a/intern/cycles/kernel/kernel_film.h
+++ b/intern/cycles/kernel/kernel_film.h
@@ -59,7 +59,7 @@ __device void kernel_film_tonemap(KernelGlobals *kg,
buffer += index*kernel_data.film.pass_stride;
/* map colors */
- float4 irradiance = *(float4*)buffer;
+ float4 irradiance = *((__global float4*)buffer);
float4 float_result = film_map(kg, irradiance, sample);
uchar4 byte_result = film_float_to_byte(float_result);
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index 9a568229b17..cfd73c98bad 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -20,19 +20,19 @@ CCL_NAMESPACE_BEGIN
__device_inline void kernel_write_pass_float(__global float *buffer, int sample, float value)
{
- float *buf = buffer;
+ __global float *buf = buffer;
*buf = (sample == 0)? value: *buf + value;
}
__device_inline void kernel_write_pass_float3(__global float *buffer, int sample, float3 value)
{
- float3 *buf = (float3*)buffer;
+ __global float3 *buf = (__global float3*)buffer;
*buf = (sample == 0)? value: *buf + value;
}
__device_inline void kernel_write_pass_float4(__global float *buffer, int sample, float4 value)
{
- float4 *buf = (float4*)buffer;
+ __global float4 *buf = (__global float4*)buffer;
*buf = (sample == 0)? value: *buf + value;
}
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index aad7050ed1b..1a42cf1ed7e 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -220,7 +220,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
path_radiance_init(&L, kernel_data.film.use_light_pass);
-#ifdef __EMISSION__
+#if defined(__EMISSION__) || defined(__BACKGROUND__)
float ray_pdf = 0.0f;
#endif
PathState state;
@@ -239,11 +239,13 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
if(kernel_data.background.transparent && (state.flag & PATH_RAY_CAMERA)) {
L_transparent += average(throughput);
}
+#ifdef __BACKGROUND__
else {
/* sample background shader */
float3 L_background = indirect_background(kg, &ray, state.flag, ray_pdf);
path_radiance_accum_background(&L, throughput, L_background, state.bounce);
}
+#endif
break;
}