diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-03-22 17:51:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-03-22 18:00:09 +0300 |
commit | 8344ef73940d985a56d83fcd01825973597eb6b4 (patch) | |
tree | 93591d6996f3589caee463a453f1df1be79e255b /source/blender | |
parent | 7de3caa05d8de4aa9cf83bbeaaa298785f2366f8 (diff) |
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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/render_result.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/render/intern/render_result.c b/source/blender/render/intern/render_result.c index 2fe6e6d3caa..3ea708a5b72 100644 --- a/source/blender/render/intern/render_result.c +++ b/source/blender/render/intern/render_result.c @@ -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; } |