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:
authorMichael Jones <michael_p_jones@apple.com>2021-11-29 17:49:53 +0300
committerMichael Jones <michael_p_jones@apple.com>2021-11-29 17:56:06 +0300
commit98a5c924fca00b4b39e75a4fc16585cfa040398c (patch)
tree19ec6546e095717e7c1e3ed922f46655f7255a08 /intern/cycles/integrator/pass_accessor_gpu.cpp
parentf9add2d63e57e883e6befc5f6c8beffa869905ce (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/integrator/pass_accessor_gpu.cpp')
-rw-r--r--intern/cycles/integrator/pass_accessor_gpu.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/intern/cycles/integrator/pass_accessor_gpu.cpp b/intern/cycles/integrator/pass_accessor_gpu.cpp
index c03ef64a2b2..3fd973749b8 100644
--- a/intern/cycles/integrator/pass_accessor_gpu.cpp
+++ b/intern/cycles/integrator/pass_accessor_gpu.cpp
@@ -54,30 +54,30 @@ void PassAccessorGPU::run_film_convert_kernels(DeviceKernel kernel,
if (destination.d_pixels) {
DCHECK_EQ(destination.stride, 0) << "Custom stride for float destination is not implemented.";
- void *args[] = {const_cast<KernelFilmConvert *>(&kfilm_convert),
- const_cast<device_ptr *>(&destination.d_pixels),
- const_cast<device_ptr *>(&render_buffers->buffer.device_pointer),
- const_cast<int *>(&work_size),
- const_cast<int *>(&buffer_params.window_width),
- const_cast<int *>(&offset),
- const_cast<int *>(&buffer_params.stride),
- const_cast<int *>(&destination.offset),
- const_cast<int *>(&destination_stride)};
+ DeviceKernelArguments args(&kfilm_convert,
+ &destination.d_pixels,
+ &render_buffers->buffer.device_pointer,
+ &work_size,
+ &buffer_params.window_width,
+ &offset,
+ &buffer_params.stride,
+ &destination.offset,
+ &destination_stride);
queue_->enqueue(kernel, work_size, args);
}
if (destination.d_pixels_half_rgba) {
const DeviceKernel kernel_half_float = static_cast<DeviceKernel>(kernel + 1);
- void *args[] = {const_cast<KernelFilmConvert *>(&kfilm_convert),
- const_cast<device_ptr *>(&destination.d_pixels_half_rgba),
- const_cast<device_ptr *>(&render_buffers->buffer.device_pointer),
- const_cast<int *>(&work_size),
- const_cast<int *>(&buffer_params.window_width),
- const_cast<int *>(&offset),
- const_cast<int *>(&buffer_params.stride),
- const_cast<int *>(&destination.offset),
- const_cast<int *>(&destination_stride)};
+ DeviceKernelArguments args(&kfilm_convert,
+ &destination.d_pixels_half_rgba,
+ &render_buffers->buffer.device_pointer,
+ &work_size,
+ &buffer_params.window_width,
+ &offset,
+ &buffer_params.stride,
+ &destination.offset,
+ &destination_stride);
queue_->enqueue(kernel_half_float, work_size, args);
}