Ejemplo n.º 1
0
	virtual bool load_kernels(const DeviceRequestedFeatures& /*requested_features*/,
	                          vector<OpenCLProgram*> &programs)
	{
		path_trace_program.add_kernel(ustring("path_trace"));
		programs.push_back(&path_trace_program);
		return true;
	}
Ejemplo n.º 2
0
	virtual bool load_kernels(const DeviceRequestedFeatures& requested_features,
	                          vector<OpenCLDeviceBase::OpenCLProgram*> &programs)
	{
		bool single_program = OpenCLInfo::use_single_program();
		program_data_init = OpenCLDeviceBase::OpenCLProgram(this,
		                                  single_program ? "split" : "split_data_init",
		                                  single_program ? "kernel_split.cl" : "kernel_data_init.cl",
		                                  get_build_options(this, requested_features));

		program_data_init.add_kernel(ustring("path_trace_data_init"));
		programs.push_back(&program_data_init);

		program_state_buffer_size = OpenCLDeviceBase::OpenCLProgram(this,
		                                  single_program ? "split" : "split_state_buffer_size",
		                                  single_program ? "kernel_split.cl" : "kernel_state_buffer_size.cl",
		                                  get_build_options(this, requested_features));
		program_state_buffer_size.add_kernel(ustring("path_trace_state_buffer_size"));
		programs.push_back(&program_state_buffer_size);

		return split_kernel->load_kernels(requested_features);
	}