[Bf-blender-cvs] [46f5005c0d3] master: GPencil: Apply FBO changes to AA macros

Antonioya noreply at git.blender.org
Sat May 11 08:35:08 CEST 2019


Commit: 46f5005c0d34b9aeac6fb0a07a4f9e4c838addbe
Author: Antonioya
Date:   Sat May 11 08:35:03 2019 +0200
Branches: master
https://developer.blender.org/rB46f5005c0d34b9aeac6fb0a07a4f9e4c838addbe

GPencil: Apply FBO changes to AA macros

Apply same change done to fix the task T64373

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_engine.h

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 23c39a56dab..83af4ebb2ad 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -515,7 +515,7 @@ void GPENCIL_render_to_image(void *vedata,
 /* Use of multisample framebuffers. */
 #define MULTISAMPLE_GP_SYNC_ENABLE(lvl, fbl) \
   { \
-    if ((lvl > 0) && (fbl->multisample_fb != NULL)) { \
+    if ((lvl > 0) && (fbl->multisample_fb != NULL) && (DRW_state_is_fbo())) { \
       DRW_stats_query_start("GP Multisample Blit"); \
       GPU_framebuffer_bind(fbl->multisample_fb); \
       GPU_framebuffer_clear_color_depth(fbl->multisample_fb, (const float[4]){0.0f}, 1.0f); \
@@ -526,7 +526,7 @@ void GPENCIL_render_to_image(void *vedata,
 
 #define MULTISAMPLE_GP_SYNC_DISABLE(lvl, fbl, fb, txl) \
   { \
-    if ((lvl > 0) && (fbl->multisample_fb != NULL)) { \
+    if ((lvl > 0) && (fbl->multisample_fb != NULL) && (DRW_state_is_fbo())) { \
       DRW_stats_query_start("GP Multisample Resolve"); \
       GPU_framebuffer_bind(fb); \
       DRW_multisamples_resolve(txl->multisample_depth, txl->multisample_color, true); \



More information about the Bf-blender-cvs mailing list