diff options
author | Michael Jones <michael_p_jones@apple.com> | 2021-11-29 17:49:53 +0300 |
---|---|---|
committer | Michael Jones <michael_p_jones@apple.com> | 2021-11-29 17:56:06 +0300 |
commit | 98a5c924fca00b4b39e75a4fc16585cfa040398c (patch) | |
tree | 19ec6546e095717e7c1e3ed922f46655f7255a08 /intern/cycles/device/optix/queue.cpp | |
parent | f9add2d63e57e883e6befc5f6c8beffa869905ce (diff) |
Cycles: Metal readiness: Specify DeviceQueue::enqueue arg types
This patch adds new arg-type parameters to `DeviceQueue::enqueue` and its overrides. This is in preparation for the Metal backend which needs this information for correct argument encoding.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D13357
Diffstat (limited to 'intern/cycles/device/optix/queue.cpp')
-rw-r--r-- | intern/cycles/device/optix/queue.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/device/optix/queue.cpp b/intern/cycles/device/optix/queue.cpp index e3946d94f5d..1a437878b5f 100644 --- a/intern/cycles/device/optix/queue.cpp +++ b/intern/cycles/device/optix/queue.cpp @@ -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,7 +71,7 @@ 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_)); @@ -78,7 +80,7 @@ bool OptiXDeviceQueue::enqueue(DeviceKernel kernel, const int work_size, void *a 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_)); } |