[Bf-blender-cvs] [7bfe62d6b8f] cycles-x: Fix Cycles X backing on GPU

Sergey Sharybin noreply at git.blender.org
Fri Jun 25 12:32:17 CEST 2021


Commit: 7bfe62d6b8f6b196cc4b5dabea84150aa2ec4150
Author: Sergey Sharybin
Date:   Fri Jun 25 12:22:38 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB7bfe62d6b8f6b196cc4b5dabea84150aa2ec4150

Fix Cycles X backing on GPU

A mistake was made in the init_from_bake kernel which was wrongly
scheduling next kernel: it was considering that flow comes from
the intersect_closest kernel. This made active kernel counters go
wrong: sum was adding up to 0, but the intersect_closest kernel
had negative value.

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

M	intern/cycles/kernel/integrator/integrator_init_from_bake.h

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

diff --git a/intern/cycles/kernel/integrator/integrator_init_from_bake.h b/intern/cycles/kernel/integrator/integrator_init_from_bake.h
index 0d3984e1e43..2048f75c617 100644
--- a/intern/cycles/kernel/integrator/integrator_init_from_bake.h
+++ b/intern/cycles/kernel/integrator/integrator_init_from_bake.h
@@ -166,14 +166,10 @@ ccl_device bool integrator_init_from_bake(INTEGRATOR_STATE_ARGS,
     /* Setup next kernel to execute. */
     const int flags = kernel_tex_fetch(__shaders, shader).flags;
     if (flags & SD_HAS_RAYTRACE) {
-      INTEGRATOR_PATH_NEXT_SORTED(DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST,
-                                  DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE,
-                                  shader);
+      INTEGRATOR_PATH_INIT_SORTED(DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE, shader);
     }
     else {
-      INTEGRATOR_PATH_NEXT_SORTED(DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST,
-                                  DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE,
-                                  shader);
+      INTEGRATOR_PATH_INIT_SORTED(DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE, shader);
     }
   }



More information about the Bf-blender-cvs mailing list