diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-11 01:21:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-11 01:21:35 +0300 |
commit | de9d846353bdc48a2d3388e79309342df7d003df (patch) | |
tree | 2181269e6f005fe1565ea904366d67aa0bb6790b /source/blender/draw | |
parent | 93901e7f0a05ba471f3b4c0201500d9dfcd68c2c (diff) |
Fix T64137 Empty Images flickering graphics when "Auto Depth" is enabled
Also fix T64373 Grid intensity increases in Ortographic when use Circle
Select in GPencil Edit mode
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index db5bab3abaa..38458dd48f0 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -105,7 +105,7 @@ typedef char DRWViewportEmptyList; /* Use of multisample framebuffers. */ #define MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) \ { \ - if (dfbl->multisample_fb != NULL) { \ + if (dfbl->multisample_fb != NULL && DRW_state_is_fbo()) { \ DRW_stats_query_start("Multisample Blit"); \ GPU_framebuffer_bind(dfbl->multisample_fb); \ /* TODO clear only depth but need to do alpha to coverage for transparencies. */ \ @@ -117,7 +117,7 @@ typedef char DRWViewportEmptyList; #define MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl) \ { \ - if (dfbl->multisample_fb != NULL) { \ + if (dfbl->multisample_fb != NULL && DRW_state_is_fbo()) { \ DRW_stats_query_start("Multisample Resolve"); \ GPU_framebuffer_bind(dfbl->default_fb); \ DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color, true); \ @@ -128,7 +128,7 @@ typedef char DRWViewportEmptyList; #define MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl) \ { \ - if (dfbl->multisample_fb != NULL) { \ + if (dfbl->multisample_fb != NULL && DRW_state_is_fbo()) { \ DRW_stats_query_start("Multisample Resolve"); \ GPU_framebuffer_bind(dfbl->default_fb); \ DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color, false); \ diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 0b8740ea982..4010d922c84 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -2760,7 +2760,8 @@ void DRW_state_dfdy_factors_get(float dfdyfac[2]) */ bool DRW_state_is_fbo(void) { - return ((DST.default_framebuffer != NULL) || DST.options.is_image_render); + return ((DST.default_framebuffer != NULL) || DST.options.is_image_render) && + !DRW_state_is_depth() && !DRW_state_is_select(); } /** |