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:
authorThomas Dinges <blender@dingto.org>2014-07-05 04:04:07 +0400
committerThomas Dinges <blender@dingto.org>2014-07-05 04:04:07 +0400
commit5aec61f8493f5876a52ec67871148803396ff223 (patch)
treee33abb612af194c5dcf020def29d1410a7488ee8 /intern/cycles/kernel/geom
parentb4b5d9c24ec26a51c72b0b695ba749a2b93e4e62 (diff)
Cycles: Compile fixes for CUDA Volumetrics.
* CUDA can be compiled with Volume support again, change line 78 kernel_types.h for that. Volumes are still fragile on GPU though, got some Memory/Address CUDA errors in tests.. needs to be investigated more deeply.
Diffstat (limited to 'intern/cycles/kernel/geom')
-rw-r--r--intern/cycles/kernel/geom/geom_volume.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/kernel/geom/geom_volume.h b/intern/cycles/kernel/geom/geom_volume.h
index 963d6cbee9c..33a20494966 100644
--- a/intern/cycles/kernel/geom/geom_volume.h
+++ b/intern/cycles/kernel/geom/geom_volume.h
@@ -49,7 +49,11 @@ ccl_device float3 volume_normalized_position(KernelGlobals *kg, const ShaderData
ccl_device float volume_attribute_float(KernelGlobals *kg, const ShaderData *sd, AttributeElement elem, int id, float *dx, float *dy)
{
float3 P = volume_normalized_position(kg, sd, sd->P);
+#ifdef __KERNEL_GPU__
+ float4 r = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+#else
float4 r = kernel_tex_image_interp_3d(id, P.x, P.y, P.z);
+#endif
if(dx) *dx = 0.0f;
if(dx) *dy = 0.0f;
@@ -61,7 +65,11 @@ ccl_device float volume_attribute_float(KernelGlobals *kg, const ShaderData *sd,
ccl_device float3 volume_attribute_float3(KernelGlobals *kg, const ShaderData *sd, AttributeElement elem, int id, float3 *dx, float3 *dy)
{
float3 P = volume_normalized_position(kg, sd, sd->P);
+#ifdef __KERNEL_GPU__
+ float4 r = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+#else
float4 r = kernel_tex_image_interp_3d(id, P.x, P.y, P.z);
+#endif
if(dx) *dx = make_float3(0.0f, 0.0f, 0.0f);
if(dy) *dy = make_float3(0.0f, 0.0f, 0.0f);