Commit: 0aa543199849497557541e954ba5e6faafbb8ec3
Author: Sergey Sharybin
Date:   Tue Jun 13 10:25:46 2017 +0200
Branches: master
https://developer.blender.org/rB0aa543199849497557541e954ba5e6faafbb8ec3

Cycles: Fix compilation error of OpenCL mega kernel

Was some mismatch in address space. Seems to be caused by recent additions.

Additionally, moved decoupled ray marching functions under ifdef, so they
don't try to use malloc() functions.

Thanks Mai for testing the patch!

===================================================================

M       intern/cycles/kernel/kernel_passes.h
M       intern/cycles/kernel/kernel_subsurface.h
M       intern/cycles/kernel/kernel_volume.h

===================================================================

diff --git a/intern/cycles/kernel/kernel_passes.h 
b/intern/cycles/kernel/kernel_passes.h
index 9d52834ffcc..9cd7ffb181d 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -142,7 +142,7 @@ ccl_device_inline void 
kernel_write_denoising_shadow(KernelGlobals *kg, ccl_glob
 
 ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg,
                                                         ShaderData *sd,
-                                                        ccl_global PathState 
*state,
+                                                        ccl_addr_space 
PathState *state,
                                                         PathRadiance *L)
 {
 #ifdef __DENOISING_FEATURES__
diff --git a/intern/cycles/kernel/kernel_subsurface.h 
b/intern/cycles/kernel/kernel_subsurface.h
index 1026cde7b29..6475d4b66fd 100644
--- a/intern/cycles/kernel/kernel_subsurface.h
+++ b/intern/cycles/kernel/kernel_subsurface.h
@@ -418,7 +418,7 @@ ccl_device_noinline void subsurface_scatter_multi_setup(
 }
 
 /* subsurface scattering step, from a point on the surface to another nearby 
point on the same object */
-ccl_device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, 
ccl_global PathState *state,
+ccl_device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, 
ccl_addr_space PathState *state,
        int state_flag, ShaderClosure *sc, uint *lcg_state, float disk_u, float 
disk_v, bool all)
 {
        float3 eval = make_float3(0.0f, 0.0f, 0.0f);
diff --git a/intern/cycles/kernel/kernel_volume.h 
b/intern/cycles/kernel/kernel_volume.h
index 9c0878249d4..1e472aaf51a 100644
--- a/intern/cycles/kernel/kernel_volume.h
+++ b/intern/cycles/kernel/kernel_volume.h
@@ -660,6 +660,7 @@ typedef struct VolumeSegment {
  * but the entire segment is needed to do always scattering, rather than 
probabilistically
  * hitting or missing the volume. if we don't know the transmittance at the 
end of the
  * volume we can't generate stratified distance samples up to that 
transmittance */
+#ifdef __VOLUME_DECOUPLED__
 ccl_device void kernel_volume_decoupled_record(KernelGlobals *kg, PathState 
*state,
        Ray *ray, ShaderData *sd, VolumeSegment *segment, bool heterogeneous)
 {
@@ -829,6 +830,7 @@ ccl_device void kernel_volume_decoupled_free(KernelGlobals 
*kg, VolumeSegment *s
 #endif
        }
 }
+#endif  /* __VOLUME_DECOUPLED__ */
 
 /* scattering for homogeneous and heterogeneous volumes, using decoupled ray
  * marching.

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to