Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r--intern/cycles/device/device.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index af9bb694c1b..51505aa9cb9 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -33,6 +33,8 @@ CCL_NAMESPACE_BEGIN
class Progress;
+/* Device Types */
+
enum DeviceType {
DEVICE_NONE,
DEVICE_CPU,
@@ -42,10 +44,22 @@ enum DeviceType {
DEVICE_MULTI
};
-enum MemoryType {
- MEM_READ_ONLY,
- MEM_WRITE_ONLY,
- MEM_READ_WRITE
+class DeviceInfo {
+public:
+ DeviceType type;
+ string description;
+ string id;
+ int num;
+ bool display_device;
+ vector<DeviceInfo> multi_devices;
+
+ DeviceInfo()
+ {
+ type = DEVICE_CPU;
+ id = "CPU";
+ num = 0;
+ display_device = false;
+ }
};
/* Device Task */
@@ -91,7 +105,7 @@ public:
/* info */
virtual string description() = 0;
- const string& error_message() { return error_msg; }
+ virtual const string& error_message() { return error_msg; }
/* regular memory */
virtual void mem_alloc(device_memory& mem, MemoryType type) = 0;
@@ -127,7 +141,7 @@ public:
/* opengl drawing */
virtual void draw_pixels(device_memory& mem, int y, int w, int h,
- int width, int height, bool transparent);
+ int dy, int width, int height, bool transparent);
#ifdef WITH_NETWORK
/* networking */
@@ -135,11 +149,12 @@ public:
#endif
/* static */
- static Device *create(DeviceType type, bool background = true, int threads = 0);
+ static Device *create(DeviceInfo& info, bool background = true, int threads = 0);
static DeviceType type_from_string(const char *name);
static string string_from_type(DeviceType type);
- static vector<DeviceType> available_types();
+ static vector<DeviceType>& available_types();
+ static vector<DeviceInfo>& available_devices();
};
CCL_NAMESPACE_END