Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_globals.h
| Show All 13 Lines | |||||
| * limitations under the License. | * limitations under the License. | ||||
| */ | */ | ||||
| /* Constant Globals */ | /* Constant Globals */ | ||||
| #ifndef __KERNEL_GLOBALS_H__ | #ifndef __KERNEL_GLOBALS_H__ | ||||
| #define __KERNEL_GLOBALS_H__ | #define __KERNEL_GLOBALS_H__ | ||||
| #ifdef __KERNEL_CPU__ | |||||
| #include "util/util_vector.h" | |||||
sergey: Any reason to use `stl::vector` instead if `ccl::vector` from `util_vector.h`? API-wise they… | |||||
| #endif | |||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| /* On the CPU, we pass along the struct KernelGlobals to nearly everywhere in | /* On the CPU, we pass along the struct KernelGlobals to nearly everywhere in | ||||
| * the kernel, to access constant data. These are all stored as "textures", but | * the kernel, to access constant data. These are all stored as "textures", but | ||||
| * these are really just standard arrays. We can't use actually globals because | * these are really just standard arrays. We can't use actually globals because | ||||
| * multiple renders may be running inside the same process. */ | * multiple renders may be running inside the same process. */ | ||||
| #ifdef __KERNEL_CPU__ | #ifdef __KERNEL_CPU__ | ||||
| # ifdef __OSL__ | # ifdef __OSL__ | ||||
| struct OSLGlobals; | struct OSLGlobals; | ||||
| struct OSLThreadData; | struct OSLThreadData; | ||||
| struct OSLShadingSystem; | struct OSLShadingSystem; | ||||
| # endif | # endif | ||||
| struct Intersection; | struct Intersection; | ||||
| struct VolumeStep; | struct VolumeStep; | ||||
| typedef struct KernelGlobals { | typedef struct KernelGlobals { | ||||
| texture_image_uchar4 texture_byte4_images[TEX_NUM_BYTE4_CPU]; | vector<texture_image_uchar4> texture_byte4_images; | ||||
| texture_image_float4 texture_float4_images[TEX_NUM_FLOAT4_CPU]; | vector<texture_image_float4> texture_float4_images; | ||||
| texture_image_half4 texture_half4_images[TEX_NUM_HALF4_CPU]; | vector<texture_image_half4> texture_half4_images; | ||||
| texture_image_float texture_float_images[TEX_NUM_FLOAT_CPU]; | vector<texture_image_float> texture_float_images; | ||||
| texture_image_uchar texture_byte_images[TEX_NUM_BYTE_CPU]; | vector<texture_image_uchar> texture_byte_images; | ||||
| texture_image_half texture_half_images[TEX_NUM_HALF_CPU]; | vector<texture_image_half> texture_half_images; | ||||
| # define KERNEL_TEX(type, ttype, name) ttype name; | # define KERNEL_TEX(type, ttype, name) ttype name; | ||||
| # define KERNEL_IMAGE_TEX(type, ttype, name) | # define KERNEL_IMAGE_TEX(type, ttype, name) | ||||
| # include "kernel/kernel_textures.h" | # include "kernel/kernel_textures.h" | ||||
| KernelData __data; | KernelData __data; | ||||
| # ifdef __OSL__ | # ifdef __OSL__ | ||||
| ▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines | |||||
Any reason to use stl::vector instead if ccl::vector from util_vector.h? API-wise they should be exactly the same, but this gives extra memory profiling for Blender.