Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_globals.h
| Show All 25 Lines | |||||
| #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 VolumeStep; | |||||
| typedef struct KernelGlobals { | typedef struct KernelGlobals { | ||||
| texture_image_uchar4 texture_byte4_images[TEX_NUM_BYTE4_IMAGES_CPU]; | texture_image_uchar4 texture_byte4_images[TEX_NUM_BYTE4_IMAGES_CPU]; | ||||
| texture_image_float4 texture_float4_images[TEX_NUM_FLOAT4_IMAGES_CPU]; | texture_image_float4 texture_float4_images[TEX_NUM_FLOAT4_IMAGES_CPU]; | ||||
| texture_image_float texture_float_images[TEX_NUM_FLOAT_IMAGES_CPU]; | texture_image_float texture_float_images[TEX_NUM_FLOAT_IMAGES_CPU]; | ||||
| texture_image_uchar texture_byte_images[TEX_NUM_BYTE_IMAGES_CPU]; | texture_image_uchar texture_byte_images[TEX_NUM_BYTE_IMAGES_CPU]; | ||||
| # 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_textures.h" | # include "kernel_textures.h" | ||||
| KernelData __data; | KernelData __data; | ||||
| # ifdef __OSL__ | # ifdef __OSL__ | ||||
| /* On the CPU, we also have the OSL globals here. Most data structures are shared | /* On the CPU, we also have the OSL globals here. Most data structures are shared | ||||
| * with SVM, the difference is in the shaders and object/mesh attributes. */ | * with SVM, the difference is in the shaders and object/mesh attributes. */ | ||||
| OSLGlobals *osl; | OSLGlobals *osl; | ||||
| OSLShadingSystem *osl_ss; | OSLShadingSystem *osl_ss; | ||||
| OSLThreadData *osl_tdata; | OSLThreadData *osl_tdata; | ||||
| # endif | # endif | ||||
| /* **** Run-time data **** */ | |||||
| /* Heap-allocated storage for transparent shadows intersections. */ | |||||
| Intersection *transparent_shadow_intersections; | |||||
| /* Storage for decoupled volume steps. */ | |||||
| VolumeStep *decoupled_volume_steps[2]; | |||||
| int decoupled_volume_steps_index; | |||||
| } KernelGlobals; | } KernelGlobals; | ||||
| #endif /* __KERNEL_CPU__ */ | #endif /* __KERNEL_CPU__ */ | ||||
| /* For CUDA, constant memory textures must be globals, so we can't put them | /* For CUDA, constant memory textures must be globals, so we can't put them | ||||
| * into a struct. As a result we don't actually use this struct and use actual | * into a struct. As a result we don't actually use this struct and use actual | ||||
| * globals and simply pass along a NULL pointer everywhere, which we hope gets | * globals and simply pass along a NULL pointer everywhere, which we hope gets | ||||
| * optimized out. */ | * optimized out. */ | ||||
| ▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines | |||||