diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-10-18 16:14:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-10-18 16:15:04 +0300 |
commit | e150f171d5fb2b93277e55329b08e1ebd6dff631 (patch) | |
tree | b0695aca0df8eda24d5af3d85feca7cf2b5f05ac /source | |
parent | 765b1c6b53da655d55af18f883d91fd1238fb773 (diff) |
Fix T92250 EEVEE: Render crash with Motion Blur and Overscan
This was caused by `DRW_view_data_texture_list_size_validate` which now
delete everything from the render engine.
This might change in the future but for now we just avoid calling it from
the render loop (when using DRW_cache_restart).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 4761e8b755f..1d9bc607590 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -565,6 +565,7 @@ static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int s drw_viewport_data_reset(dst->vmempool); + bool do_validation = true; if (size == NULL && viewport == NULL) { /* Avoid division by 0. Engines will either override this or not use it. */ dst->size[0] = 1.0f; @@ -580,11 +581,15 @@ static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int s BLI_assert(size); dst->size[0] = size[0]; dst->size[1] = size[1]; + /* Fix case when used in DRW_cache_restart(). */ + do_validation = false; } dst->inv_size[0] = 1.0f / dst->size[0]; dst->inv_size[1] = 1.0f / dst->size[1]; - DRW_view_data_texture_list_size_validate(dst->view_data_active, (int[2]){UNPACK2(dst->size)}); + if (do_validation) { + DRW_view_data_texture_list_size_validate(dst->view_data_active, (int[2]){UNPACK2(dst->size)}); + } if (viewport) { DRW_view_data_default_lists_from_viewport(dst->view_data_active, viewport); |