2011-04-27 11:58:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Blender Foundation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __KERNEL_H__
|
|
|
|
#define __KERNEL_H__
|
|
|
|
|
|
|
|
/* CPU Kernel Interfae */
|
|
|
|
|
|
|
|
#include "util_types.h"
|
|
|
|
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
struct KernelGlobals;
|
|
|
|
|
|
|
|
KernelGlobals *kernel_globals_create();
|
|
|
|
void kernel_globals_free(KernelGlobals *kg);
|
|
|
|
|
|
|
|
void *kernel_osl_memory(KernelGlobals *kg);
|
|
|
|
bool kernel_osl_use(KernelGlobals *kg);
|
|
|
|
|
|
|
|
void kernel_const_copy(KernelGlobals *kg, const char *name, void *host, size_t size);
|
|
|
|
void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t width, size_t height);
|
|
|
|
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
void kernel_cpu_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
|
2011-12-20 12:25:37 +00:00
|
|
|
int sample, int x, int y, int offset, int stride);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
|
2013-05-14 21:18:20 +00:00
|
|
|
int sample, int x, int y, int offset, int stride);
|
2012-01-20 17:49:17 +00:00
|
|
|
void kernel_cpu_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
2011-12-31 15:18:13 +00:00
|
|
|
int type, int i);
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 15:13:38 +00:00
|
|
|
#ifdef WITH_OPTIMIZED_KERNEL
|
2013-02-04 16:12:37 +00:00
|
|
|
void kernel_cpu_sse2_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
|
2011-12-20 12:25:37 +00:00
|
|
|
int sample, int x, int y, int offset, int stride);
|
2013-02-04 16:12:37 +00:00
|
|
|
void kernel_cpu_sse2_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
|
2013-05-14 21:18:20 +00:00
|
|
|
int sample, int x, int y, int offset, int stride);
|
2013-02-04 16:12:37 +00:00
|
|
|
void kernel_cpu_sse2_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
|
|
|
int type, int i);
|
|
|
|
|
|
|
|
void kernel_cpu_sse3_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
|
|
|
|
int sample, int x, int y, int offset, int stride);
|
|
|
|
void kernel_cpu_sse3_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
|
2013-05-14 21:18:20 +00:00
|
|
|
int sample, int x, int y, int offset, int stride);
|
2013-02-04 16:12:37 +00:00
|
|
|
void kernel_cpu_sse3_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
2011-12-31 15:18:13 +00:00
|
|
|
int type, int i);
|
2011-11-15 15:13:38 +00:00
|
|
|
#endif
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
CCL_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif /* __KERNEL_H__ */
|
|
|
|
|