Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/device.h
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
| public: | public: | ||||
| DeviceType type; | DeviceType type; | ||||
| string description; | string description; | ||||
| string id; | string id; | ||||
| int num; | int num; | ||||
| bool display_device; | bool display_device; | ||||
| bool advanced_shading; | bool advanced_shading; | ||||
| bool pack_images; | bool pack_images; | ||||
| bool extended_images; /* flag for GPU and Multi device */ | bool has_bindless_textures; /* flag for GPU and Multi device */ | ||||
| bool use_split_kernel; /* Denotes if the device is going to run cycles using split-kernel */ | bool use_split_kernel; /* Denotes if the device is going to run cycles using split-kernel */ | ||||
| vector<DeviceInfo> multi_devices; | vector<DeviceInfo> multi_devices; | ||||
| DeviceInfo() | DeviceInfo() | ||||
| { | { | ||||
| type = DEVICE_CPU; | type = DEVICE_CPU; | ||||
| id = "CPU"; | id = "CPU"; | ||||
| num = 0; | num = 0; | ||||
| display_device = false; | display_device = false; | ||||
| advanced_shading = true; | advanced_shading = true; | ||||
| pack_images = false; | pack_images = false; | ||||
| extended_images = false; | has_bindless_textures = false; | ||||
| use_split_kernel = false; | use_split_kernel = false; | ||||
| } | } | ||||
| }; | }; | ||||
| class DeviceRequestedFeatures { | class DeviceRequestedFeatures { | ||||
| public: | public: | ||||
| /* Use experimental feature set. */ | /* Use experimental feature set. */ | ||||
| bool experimental; | bool experimental; | ||||
| ▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | public: | ||||
| /* constant memory */ | /* constant memory */ | ||||
| virtual void const_copy_to(const char *name, void *host, size_t size) = 0; | virtual void const_copy_to(const char *name, void *host, size_t size) = 0; | ||||
| /* texture memory */ | /* texture memory */ | ||||
| virtual void tex_alloc(const char * /*name*/, | virtual void tex_alloc(const char * /*name*/, | ||||
| device_memory& /*mem*/, | device_memory& /*mem*/, | ||||
| InterpolationType interpolation = INTERPOLATION_NONE, | InterpolationType interpolation = INTERPOLATION_NONE, | ||||
| ExtensionType extension = EXTENSION_REPEAT) | ExtensionType extension = EXTENSION_REPEAT, | ||||
| int flat_slot = 0) | |||||
| { | { | ||||
| (void)interpolation; /* Ignored. */ | (void)interpolation; /* Ignored. */ | ||||
| (void)extension; /* Ignored. */ | (void)extension; /* Ignored. */ | ||||
| (void)flat_slot; /* Ignored. */ | |||||
| }; | |||||
| virtual void tex_free(device_memory& /*mem*/, | |||||
| int flat_slot = -1) | |||||
| { | |||||
| (void)flat_slot; /* Ignored. */ | |||||
| }; | }; | ||||
| virtual void tex_free(device_memory& /*mem*/) {}; | |||||
| /* pixel memory */ | /* pixel memory */ | ||||
| virtual void pixels_alloc(device_memory& mem); | virtual void pixels_alloc(device_memory& mem); | ||||
| virtual void pixels_copy_from(device_memory& mem, int y, int w, int h); | virtual void pixels_copy_from(device_memory& mem, int y, int w, int h); | ||||
| virtual void pixels_free(device_memory& mem); | virtual void pixels_free(device_memory& mem); | ||||
| /* open shading language, only for CPU device */ | /* open shading language, only for CPU device */ | ||||
| virtual void *osl_memory() { return NULL; } | virtual void *osl_memory() { return NULL; } | ||||
| ▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines | |||||