Fix T96524: Regression: The Material Preview doesn't show

The preview does not work well with deferred render result pixels
allocation: it breaks the refresh and requires to toggle current
panels.

Since there is no tiled rendering for previews we don't save any
memory by deferring pixels allocations, so do it for the render
result during the render result creation.

Differential Revision: https://developer.blender.org/D14414
This commit is contained in:
Sergey Sharybin
2022-03-22 15:51:41 +01:00
parent 7de3caa05d
commit 8344ef7394

View File

@@ -414,6 +414,11 @@ RenderResult *render_result_new(Render *re,
rr->xof = re->disprect.xmin + BLI_rcti_cent_x(&re->disprect) - (re->winx / 2);
rr->yof = re->disprect.ymin + BLI_rcti_cent_y(&re->disprect) - (re->winy / 2);
/* Preview does not support deferred render result allocation. */
if (re->r.scemode & R_BUTS_PREVIEW) {
render_result_passes_allocated_ensure(rr);
}
return rr;
}