4 #include "integrator/shader_eval.h"
9 #include "device/cpu/kernel.h"
24 const int max_num_inputs,
25 const int num_channels,
29 bool first_device =
true;
34 VLOG_WORK <<
"Multi-devices are not yet fully implemented, will evaluate shader on a "
48 input.alloc(max_num_inputs);
49 int num_points = fill_input(
input);
50 if (num_points == 0) {
54 input.copy_to_device();
55 output.alloc(num_points * num_channels);
90 float *output_data =
output.data();
94 local_arena.execute([&]() {
102 const int thread_index = tbb::this_task_arena::current_thread_index();
144 queue->init_execution();
160 queue->synchronize();
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
ShaderEvalFunction shader_eval_background
ShaderEvalFunction shader_eval_displace
ShaderEvalFunction shader_eval_curve_shadow_transparency
static const CPUKernels & get_cpu_kernels()
virtual void get_cpu_kernel_thread_globals(vector< CPUKernelThreadGlobals > &)
virtual unique_ptr< DeviceQueue > gpu_queue_create()
virtual void foreach_device(const function< void(Device *)> &callback)
bool eval(const ShaderEvalType type, const int max_num_inputs, const int num_channels, const function< int(device_vector< KernelShaderEvalInput > &)> &fill_input, const function< void(device_vector< float > &)> &read_output)
ShaderEval(Device *device, Progress &progress)
bool eval_cpu(Device *device, const ShaderEvalType type, device_vector< KernelShaderEvalInput > &input, device_vector< float > &output, const int64_t work_size)
bool eval_gpu(Device *device, const ShaderEvalType type, device_vector< KernelShaderEvalInput > &input, device_vector< float > &output, const int64_t work_size)
#define CCL_NAMESPACE_END
SyclQueue void void size_t num_bytes SyclQueue void const char void *memory_device_pointer KernelContext int kernel
@ SHADER_EVAL_CURVE_SHADOW_TRANSPARENCY
ccl_gpu_kernel_postfix ccl_global const int ccl_global float const int work_size
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
@ DEVICE_KERNEL_SHADER_EVAL_DISPLACE
@ DEVICE_KERNEL_SHADER_EVAL_BACKGROUND
@ DEVICE_KERNEL_SHADER_EVAL_CURVE_SHADOW_TRANSPARENCY
static const int chunk_size
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)