diff options
Diffstat (limited to 'intern/cycles/render/buffers.h')
-rw-r--r-- | intern/cycles/render/buffers.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h index 78712ed89ef..ee0d78a1cd8 100644 --- a/intern/cycles/render/buffers.h +++ b/intern/cycles/render/buffers.h @@ -67,12 +67,11 @@ class RenderBuffers { public: /* buffer parameters */ BufferParams params; + /* float buffer */ device_vector<float> buffer; /* random number generator state */ device_vector<uint> rng_state; - /* mutex, must be locked manually by callers */ - thread_mutex mutex; RenderBuffers(Device *device); ~RenderBuffers(); @@ -80,7 +79,7 @@ public: void reset(Device *device, BufferParams& params); bool copy_from_device(); - bool get_pass(PassType type, float exposure, int sample, int components, float *pixels); + bool get_pass_rect(PassType type, float exposure, int sample, int components, float *pixels); protected: void device_free(); @@ -105,8 +104,6 @@ public: bool transparent; /* byte buffer for tonemapped result */ device_vector<uchar4> rgba; - /* mutex, must be locked manually by callers */ - thread_mutex mutex; DisplayBuffer(Device *device); ~DisplayBuffer(); @@ -124,6 +121,28 @@ protected: Device *device; }; +/* Render Tile + * Rendering task on a buffer */ + +class RenderTile { +public: + int x, y, w, h; + int start_sample; + int num_samples; + int sample; + int resolution; + int offset; + int stride; + + device_ptr buffer; + device_ptr rng_state; + device_ptr rgba; + + RenderBuffers *buffers; + + RenderTile(); +}; + CCL_NAMESPACE_END #endif /* __BUFFERS_H__ */ |