Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_types.h
| Show First 20 Lines • Show All 462 Lines • ▼ Show 20 Lines | |||||
| /* Interpolation types for textures | /* Interpolation types for textures | ||||
| * cuda also use texture space to store other objects */ | * cuda also use texture space to store other objects */ | ||||
| enum InterpolationType { | enum InterpolationType { | ||||
| INTERPOLATION_NONE = -1, | INTERPOLATION_NONE = -1, | ||||
| INTERPOLATION_LINEAR = 0, | INTERPOLATION_LINEAR = 0, | ||||
| INTERPOLATION_CLOSEST = 1, | INTERPOLATION_CLOSEST = 1, | ||||
| INTERPOLATION_CUBIC = 2, | INTERPOLATION_CUBIC = 2, | ||||
| INTERPOLATION_SMART = 3, | INTERPOLATION_SMART = 3, | ||||
| INTERPOLATION_NUM_TYPES, | |||||
| }; | }; | ||||
| /* Extension types for textures. | /* Extension types for textures. | ||||
| * | * | ||||
| * Defines how the image is extrapolated past its original bounds. | * Defines how the image is extrapolated past its original bounds. | ||||
| */ | */ | ||||
| enum ExtensionType { | enum ExtensionType { | ||||
| /* Cause the image to repeat horizontally and vertically. */ | /* Cause the image to repeat horizontally and vertically. */ | ||||
| EXTENSION_REPEAT = 0, | EXTENSION_REPEAT = 0, | ||||
| /* Extend by repeating edge pixels of the image. */ | /* Extend by repeating edge pixels of the image. */ | ||||
| EXTENSION_EXTEND = 1, | EXTENSION_EXTEND = 1, | ||||
| /* Clip to image size and set exterior pixels as transparent. */ | /* Clip to image size and set exterior pixels as transparent. */ | ||||
| EXTENSION_CLIP = 2, | EXTENSION_CLIP = 2, | ||||
| EXTENSION_NUM_TYPES, | |||||
| }; | }; | ||||
| /* macros */ | /* macros */ | ||||
| /* hints for branch prediction, only use in code that runs a _lot_ */ | /* hints for branch prediction, only use in code that runs a _lot_ */ | ||||
| #if defined(__GNUC__) && defined(__KERNEL_CPU__) | #if defined(__GNUC__) && defined(__KERNEL_CPU__) | ||||
| # define LIKELY(x) __builtin_expect(!!(x), 1) | # define LIKELY(x) __builtin_expect(!!(x), 1) | ||||
| # define UNLIKELY(x) __builtin_expect(!!(x), 0) | # define UNLIKELY(x) __builtin_expect(!!(x), 0) | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||