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:
Diffstat (limited to 'intern/cycles/device/optix/queue.cpp')
-rw-r--r--intern/cycles/device/optix/queue.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/intern/cycles/device/optix/queue.cpp b/intern/cycles/device/optix/queue.cpp
index 458ed70baa8..1a437878b5f 100644
--- a/intern/cycles/device/optix/queue.cpp
+++ b/intern/cycles/device/optix/queue.cpp
@@ -19,7 +19,7 @@
# include "device/optix/queue.h"
# include "device/optix/device_impl.h"
-# include "util/util_time.h"
+# include "util/time.h"
# undef __KERNEL_CPU__
# define __KERNEL_OPTIX__
@@ -47,7 +47,9 @@ static bool is_optix_specific_kernel(DeviceKernel kernel)
kernel == DEVICE_KERNEL_INTEGRATOR_INTERSECT_VOLUME_STACK);
}
-bool OptiXDeviceQueue::enqueue(DeviceKernel kernel, const int work_size, void *args[])
+bool OptiXDeviceQueue::enqueue(DeviceKernel kernel,
+ const int work_size,
+ DeviceKernelArguments const &args)
{
if (!is_optix_specific_kernel(kernel)) {
return CUDADeviceQueue::enqueue(kernel, work_size, args);
@@ -69,15 +71,16 @@ bool OptiXDeviceQueue::enqueue(DeviceKernel kernel, const int work_size, void *a
cuda_device_assert(
cuda_device_,
cuMemcpyHtoDAsync(launch_params_ptr + offsetof(KernelParamsOptiX, path_index_array),
- args[0], // &d_path_index
+ args.values[0], // &d_path_index
sizeof(device_ptr),
cuda_stream_));
- if (kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE) {
+ if (kernel == DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST ||
+ kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE) {
cuda_device_assert(
cuda_device_,
cuMemcpyHtoDAsync(launch_params_ptr + offsetof(KernelParamsOptiX, render_buffer),
- args[1], // &d_render_buffer
+ args.values[1], // &d_render_buffer
sizeof(device_ptr),
cuda_stream_));
}