[Bf-blender-cvs] [ce09b93955d] master: Fix T61104 Compositing two scenes with different output scales crashes

Clément Foucault noreply at git.blender.org
Mon Mar 18 21:40:06 CET 2019


Commit: ce09b93955de6dd80f46af33f4329392b0752f74
Author: Clément Foucault
Date:   Mon Mar 18 21:39:54 2019 +0100
Branches: master
https://developer.blender.org/rBce09b93955de6dd80f46af33f4329392b0752f74

Fix T61104 Compositing two scenes with different output scales crashes

Was due to incorrect output size. Use engine->resolution_x/y instead of
computing the size on the fly from the scene specific settings (which are
not overwritten by the rendering scene).

===================================================================

M	source/blender/draw/intern/draw_manager.c

===================================================================

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 34217b83241..4810598c358 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1865,7 +1865,7 @@ void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph)
 	drw_context_state_init();
 
 	DST.viewport = GPU_viewport_create();
-	const int size[2] = {(r->size * r->xsch) / 100, (r->size * r->ysch) / 100};
+	const int size[2] = {engine->resolution_x, engine->resolution_y};
 	GPU_viewport_size_set(DST.viewport, size);
 
 	drw_viewport_var_init();



More information about the Bf-blender-cvs mailing list