Fix T53874: OpenGL render problem with OpenEXR in 2.8 with float buffers.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 25 Jan 2018 13:07:51 +0000 (14:07 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 25 Jan 2018 13:25:17 +0000 (14:25 +0100)
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/render_result.c

index ed610b4e4b7f4fbbd5b1ca33bdc894228db58bc7..f1dce4d0cfbf2a59109d8f21d140ab0ce6d7b003 100644 (file)
@@ -437,8 +437,6 @@ void RE_AcquireResultImage(Render *re, RenderResult *rr, const int view_id)
                        rr->rectz = rv->rectz;
                        rr->rect32 = rv->rect32;
 
-                       rr->have_combined = (rv->rectf != NULL);
-
                        /* active layer */
                        rl = render_get_active_layer(re, re->result);
 
@@ -839,7 +837,7 @@ void RE_InitState(Render *re, Render *source, RenderData *rd,
                re->result = MEM_callocN(sizeof(RenderResult), "new render result");
                re->result->rectx = re->rectx;
                re->result->recty = re->recty;
-               render_result_view_new(re->result, "new temporary view");
+               render_result_view_new(re->result, "");
        }
        
        if (re->r.scemode & R_VIEWPORT_PREVIEW)
index 0499577726c98219d24059d67d3b3204d228d1b7..a3eeed2b144f2d5566992f5b7447d3bbf9471fd2 100644 (file)
@@ -80,6 +80,8 @@ static void render_result_views_free(RenderResult *res)
 
                MEM_freeN(rv);
        }
+
+       res->have_combined = false;
 }
 
 void render_result_free(RenderResult *res)
@@ -1356,6 +1358,8 @@ void RE_render_result_rect_from_ibuf(RenderResult *rr, RenderData *UNUSED(rd), I
        RenderView *rv = RE_RenderViewGetById(rr, view_id);
 
        if (ibuf->rect_float) {
+               rr->have_combined = true;
+
                if (!rv->rectf)
                        rv->rectf = MEM_mallocN(4 * sizeof(float) * rr->rectx * rr->recty, "render_seq rectf");
                
@@ -1366,6 +1370,8 @@ void RE_render_result_rect_from_ibuf(RenderResult *rr, RenderData *UNUSED(rd), I
                MEM_SAFE_FREE(rv->rect32);
        }
        else if (ibuf->rect) {
+               rr->have_combined = true;
+
                if (!rv->rect32)
                        rv->rect32 = MEM_mallocN(sizeof(int) * rr->rectx * rr->recty, "render_seq rect");