[Bf-blender-cvs] [9485d804f8e] cycles-x: Cleanup: remove unused KernelGlobals struct from OptiX kernels

Brecht Van Lommel noreply at git.blender.org
Fri Jun 4 15:10:38 CEST 2021


Commit: 9485d804f8ee6ab8569732a931096a79cfbd458c
Author: Brecht Van Lommel
Date:   Thu Jun 3 13:17:57 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB9485d804f8ee6ab8569732a931096a79cfbd458c

Cleanup: remove unused KernelGlobals struct from OptiX kernels

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

M	intern/cycles/device/optix/queue.cpp
M	intern/cycles/kernel/device/optix/kernel.cu
M	intern/cycles/kernel/device/optix/kernel_shader_raytrace.cu

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

diff --git a/intern/cycles/device/optix/queue.cpp b/intern/cycles/device/optix/queue.cpp
index a13743fcddf..703e55c99a2 100644
--- a/intern/cycles/device/optix/queue.cpp
+++ b/intern/cycles/device/optix/queue.cpp
@@ -48,8 +48,6 @@ static bool is_optix_specific_kernel(DeviceKernel kernel)
 
 bool OptiXDeviceQueue::enqueue(DeviceKernel kernel, const int work_size, void *args[])
 {
-  /* TODO: Handle shading kernels when shader raytracing feature is requested */
-
   if (!is_optix_specific_kernel(kernel)) {
     return CUDADeviceQueue::enqueue(kernel, work_size, args);
   }
diff --git a/intern/cycles/kernel/device/optix/kernel.cu b/intern/cycles/kernel/device/optix/kernel.cu
index da7d6eb1c97..326418283a5 100644
--- a/intern/cycles/kernel/device/optix/kernel.cu
+++ b/intern/cycles/kernel/device/optix/kernel.cu
@@ -67,31 +67,25 @@ template<bool always = false> ccl_device_forceinline uint get_object_id()
 extern "C" __global__ void __raygen__kernel_optix_integrator_intersect_closest()
 {
   const int global_index = optixGetLaunchIndex().x;
-
-  KernelGlobals kg;
   const int path_index = (__params.path_index_array) ? __params.path_index_array[global_index] :
                                                        global_index;
-  integrator_intersect_closest(&kg, path_index);
+  integrator_intersect_closest(nullptr, path_index);
 }
 
 extern "C" __global__ void __raygen__kernel_optix_integrator_intersect_shadow()
 {
   const int global_index = optixGetLaunchIndex().x;
-
-  KernelGlobals kg;
   const int path_index = (__params.path_index_array) ? __params.path_index_array[global_index] :
                                                        global_index;
-  integrator_intersect_shadow(&kg, path_index);
+  integrator_intersect_shadow(nullptr, path_index);
 }
 
 extern "C" __global__ void __raygen__kernel_optix_integrator_intersect_subsurface()
 {
   const int global_index = optixGetLaunchIndex().x;
-
-  KernelGlobals kg;
   const int path_index = (__params.path_index_array) ? __params.path_index_array[global_index] :
                                                        global_index;
-  integrator_intersect_subsurface(&kg, path_index);
+  integrator_intersect_subsurface(nullptr, path_index);
 }
 
 extern "C" __global__ void __miss__kernel_optix_miss()
diff --git a/intern/cycles/kernel/device/optix/kernel_shader_raytrace.cu b/intern/cycles/kernel/device/optix/kernel_shader_raytrace.cu
index e0376cad03c..bf787e29eaa 100644
--- a/intern/cycles/kernel/device/optix/kernel_shader_raytrace.cu
+++ b/intern/cycles/kernel/device/optix/kernel_shader_raytrace.cu
@@ -23,9 +23,7 @@
 extern "C" __global__ void __raygen__kernel_optix_integrator_shade_surface_raytrace()
 {
   const int global_index = optixGetLaunchIndex().x;
-
-  KernelGlobals kg;
   const int path_index = (__params.path_index_array) ? __params.path_index_array[global_index] :
                                                        global_index;
-  integrator_shade_surface_raytrace(&kg, path_index, __params.render_buffer);
+  integrator_shade_surface_raytrace(nullptr, path_index, __params.render_buffer);
 }



More information about the Bf-blender-cvs mailing list