diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-07-15 14:07:42 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-07-15 14:07:42 +0300 |
commit | 65a3624877c35e37799be03b54d8b9aae23e660c (patch) | |
tree | cf44f7f4ee752c787d5a1dd0a370e15278e80e83 /source/blender/draw/engines/eevee | |
parent | 761135a284676c75b771fe4ef3b511f8fe48d97f (diff) |
Fix T66860 Crash on opening .blend file from 2.79
This was caused by the preview render of the material property panel being
1px wide. The computed half buffers width were rounded to 0.
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_depth_of_field.c | 3 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_screen_raytrace.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c index d0f544dd3c6..12d70131031 100644 --- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c +++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c @@ -97,6 +97,9 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), int buffer_size[2] = {(int)viewport_size[0] / 2, (int)viewport_size[1] / 2}; + buffer_size[0] = max_ii(1, buffer_size[0]); + buffer_size[1] = max_ii(1, buffer_size[1]); + eGPUTextureFormat down_format = DRW_state_draw_background() ? GPU_R11F_G11F_B10F : GPU_RGBA16F; effects->dof_down_near = DRW_texture_pool_query_2d( diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c index 7b470f9c42a..d53ed239f4e 100644 --- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c +++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c @@ -159,6 +159,9 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) const bool high_qual_input = true; /* TODO dither low quality input */ const eGPUTextureFormat format = (high_qual_input) ? GPU_RGBA16F : GPU_RGBA8; + tracing_res[0] = max_ii(1, tracing_res[0]); + tracing_res[1] = max_ii(1, tracing_res[1]); + /* MRT for the shading pass in order to output needed data for the SSR pass. */ effects->ssr_specrough_input = DRW_texture_pool_query_2d( size_fs[0], size_fs[1], format, &draw_engine_eevee_type); |