diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-09-04 17:29:07 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-09-04 17:29:07 +0400 |
commit | adea12cb01e4c4f18f345dfbbf49e9e622192e4e (patch) | |
tree | b43018344c696e4d59437fabc7f17f5b9d6a8e80 /intern/cycles/render/tile.h | |
parent | 68563134d4800be4eb46aa6b598fd719cdaf2980 (diff) |
Cycles: merge of changes from tomato branch.
Regular rendering now works tiled, and supports save buffers to save memory
during render and cache render results.
Brick texture node by Thomas.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Brick_Texture
Image texture Blended Box Mapping.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Image_Texture
http://mango.blender.org/production/blended_box/
Various bug fixes by Sergey and Campbell.
* Fix for reading freed memory in some node setups.
* Fix incorrect memory read when synchronizing mesh motion.
* Fix crash appearing when direct light usage is different on different layers.
* Fix for vector pass gives wrong result in some circumstances.
* Fix for wrong resolution used for rendering Render Layer node.
* Option to cancel rendering when doing initial synchronization.
* No more texture limit when using CPU render.
* Many fixes for new tiled rendering.
Diffstat (limited to 'intern/cycles/render/tile.h')
-rw-r--r-- | intern/cycles/render/tile.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/intern/cycles/render/tile.h b/intern/cycles/render/tile.h index b6e610c8d90..29f2b1ef9f9 100644 --- a/intern/cycles/render/tile.h +++ b/intern/cycles/render/tile.h @@ -31,9 +31,14 @@ CCL_NAMESPACE_BEGIN class Tile { public: int x, y, w, h; + int device; + bool rendering; - Tile(int x_, int y_, int w_, int h_) - : x(x_), y(y_), w(w_), h(h_) {} + Tile() + {} + + Tile(int x_, int y_, int w_, int h_, int device_) + : x(x_), y(y_), w(w_), h(h_), device(device_), rendering(false) {} }; /* Tile Manager */ @@ -45,27 +50,34 @@ public: struct State { BufferParams buffer; int sample; + int num_samples; int resolution; + int num_tiles; + int num_rendered_tiles; list<Tile> tiles; } state; - TileManager(bool progressive, int samples, int tile_size, int min_size); + TileManager(bool progressive, int num_samples, int2 tile_size, int resolution, int num_devices = 1); ~TileManager(); - void reset(BufferParams& params, int samples); - void set_samples(int samples); + void reset(BufferParams& params, int num_samples); + void set_samples(int num_samples); bool next(); + bool next_tile(Tile& tile, int device = 0); bool done(); protected: void set_tiles(); bool progressive; - int samples; - int tile_size; - int min_size; + int num_samples; + int2 tile_size; + int resolution; + int num_devices; int start_resolution; + + list<Tile>::iterator next_center_tile(int device = 0); }; CCL_NAMESPACE_END |