Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/device.h
| Show All 39 Lines | enum DeviceType { | ||||
| DEVICE_NONE, | DEVICE_NONE, | ||||
| DEVICE_CPU, | DEVICE_CPU, | ||||
| DEVICE_OPENCL, | DEVICE_OPENCL, | ||||
| DEVICE_CUDA, | DEVICE_CUDA, | ||||
| DEVICE_NETWORK, | DEVICE_NETWORK, | ||||
| DEVICE_MULTI | DEVICE_MULTI | ||||
| }; | }; | ||||
| enum InterpolationType { | |||||
brecht: Can this be moved to kernel_types.h, so we can use it instead of int everywhere? | |||||
juicyfruitAuthorUnsubmitted Not Done Inline ActionsWell I am not sure about including any kernel_*** in device. It is something that we want to access both above and blow device level. juicyfruit: Well I am not sure about including any kernel_*** in device.
Maybe in util_types.h although… | |||||
| NOT_TEXTURE, /* cuda also use texture space to store other objects */ | |||||
dingtoUnsubmitted Not Done Inline ActionsWould rename to "NO_TEXTURE", more correct grammar wise. Or we invert the logic and call it "DATA_TEXTURE" or so. I leave the decision to Brecht. :) dingto: Would rename to "NO_TEXTURE", more correct grammar wise. Or we invert the logic and call it… | |||||
brechtUnsubmitted Not Done Inline ActionsI would call it INTERPOLATION_NONE, since as far as I can tell this value disables interpolation. brecht: I would call it INTERPOLATION_NONE, since as far as I can tell this value disables… | |||||
| INTERPOLATION_LINEAR, | |||||
| INTERPOLATION_CLOSEST, | |||||
| INTERPOLATION_CUBIC, | |||||
| INTERPOLATION_SMART | |||||
| }; | |||||
| class DeviceInfo { | class DeviceInfo { | ||||
| 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; | ||||
| Show All 39 Lines | public: | ||||
| virtual void mem_zero(device_memory& mem) = 0; | virtual void mem_zero(device_memory& mem) = 0; | ||||
| virtual void mem_free(device_memory& mem) = 0; | virtual void mem_free(device_memory& mem) = 0; | ||||
| /* 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, device_memory& mem, | virtual void tex_alloc(const char *name, device_memory& mem, | ||||
| bool interpolation = false, bool periodic = false) {}; | InterpolationType interpolation = NOT_TEXTURE, bool periodic = false) {}; | ||||
| virtual void tex_free(device_memory& mem) {}; | 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 */ | ||||
| Show All 36 Lines | |||||
Can this be moved to kernel_types.h, so we can use it instead of int everywhere?