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:
authorBrecht Van Lommel <brecht@blender.org>2021-09-20 18:59:20 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-09-21 15:55:54 +0300
commit08031197250aeecbaca3803254e6f25b8c7b7b37 (patch)
tree6fe7ab045f0dc0a423d6557c4073f34309ef4740 /intern/cycles/blender/blender_session.h
parentfa6b1007bad065440950cd67deb16a04f368856f (diff)
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
Diffstat (limited to 'intern/cycles/blender/blender_session.h')
-rw-r--r--intern/cycles/blender/blender_session.h55
1 files changed, 23 insertions, 32 deletions
diff --git a/intern/cycles/blender/blender_session.h b/intern/cycles/blender/blender_session.h
index d967b81c854..cf52359ea5d 100644
--- a/intern/cycles/blender/blender_session.h
+++ b/intern/cycles/blender/blender_session.h
@@ -33,8 +33,6 @@ class BlenderSync;
class ImageMetaData;
class Scene;
class Session;
-class RenderBuffers;
-class RenderTile;
class BlenderSession {
public:
@@ -62,6 +60,8 @@ class BlenderSession {
/* offline render */
void render(BL::Depsgraph &b_depsgraph);
+ void render_frame_finish();
+
void bake(BL::Depsgraph &b_depsgrah,
BL::Object &b_object,
const string &pass_type,
@@ -69,24 +69,29 @@ class BlenderSession {
const int bake_width,
const int bake_height);
- void write_render_result(BL::RenderLayer &b_rlay, RenderTile &rtile);
- void write_render_tile(RenderTile &rtile);
- void read_render_tile(RenderTile &rtile);
+ void write_render_result(BL::RenderLayer &b_rlay);
+ void write_render_tile();
+
+ void update_render_tile();
+
+ void full_buffer_written(string_view filename);
/* update functions are used to update display buffer only after sample was rendered
* only needed for better visual feedback */
- void update_render_result(BL::RenderLayer &b_rlay, RenderTile &rtile);
- void update_render_tile(RenderTile &rtile, bool highlight);
+ void update_render_result(BL::RenderLayer &b_rlay);
+
+ /* read functions for baking input */
+ void read_render_tile();
/* interactive updates */
void synchronize(BL::Depsgraph &b_depsgraph);
/* drawing */
- bool draw(int w, int h);
+ void draw(BL::SpaceImageEditor &space_image);
+ void view_draw(int w, int h);
void tag_redraw();
void tag_update();
void get_status(string &status, string &substatus);
- void get_kernel_status(string &kernel_status);
void get_progress(float &progress, double &total_time, double &render_time);
void test_cancel();
void update_status_progress();
@@ -123,6 +128,8 @@ class BlenderSession {
void *python_thread_state;
+ bool use_developer_ui;
+
/* Global state which is common for all render sessions created from Blender.
* Usually denotes command line arguments.
*/
@@ -134,41 +141,25 @@ class BlenderSession {
*/
static bool headless;
- /* ** Resumable render ** */
-
- /* Overall number of chunks in which the sample range is to be divided. */
- static int num_resumable_chunks;
-
- /* Current resumable chunk index to render. */
- static int current_resumable_chunk;
-
- /* Alternative to single-chunk rendering to render a range of chunks. */
- static int start_resumable_chunk;
- static int end_resumable_chunk;
-
static bool print_render_stats;
protected:
void stamp_view_layer_metadata(Scene *scene, const string &view_layer_name);
- void do_write_update_render_result(BL::RenderLayer &b_rlay,
- RenderTile &rtile,
- bool do_update_only);
- void do_write_update_render_tile(RenderTile &rtile,
- bool do_update_only,
- bool do_read_only,
- bool highlight);
-
void builtin_images_load();
- /* Update tile manager to reflect resumable render settings. */
- void update_resumable_tile_manager(int num_samples);
-
/* Is used after each render layer synchronization is done with the goal
* of freeing render engine data which is held from Blender side (for
* example, dependency graph).
*/
void free_blender_memory_if_possible();
+
+ struct {
+ thread_mutex mutex;
+ int last_pass_index = -1;
+ } draw_state_;
+
+ vector<string> full_buffer_files_;
};
CCL_NAMESPACE_END