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
This commit is contained in:
parent
93901e7f0a
commit
de9d846353
Notes:
blender-bot
2023-02-14 11:24:03 +01:00
Referenced by issue #64482, Crush on UV Editing layout after pressing A Referenced by issue #64462, Keyed Particle Duration Crash Referenced by issue #64373, Grid intensity increases in Ortographic when use Circle Select in GPencil Edit mode Referenced by issue #64137, Empty - flickering graphics when "Auto Depth" is enabled
|
@ -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); \
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue