Commit: 065a84c8d0d68edece9a407dbe97828fe22d3a6f
Author: Clément Foucault
Date:   Sat Feb 3 02:18:36 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB065a84c8d0d68edece9a407dbe97828fe22d3a6f

Eevee: Fix crash when using Ogl render and subsurface.

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

M       source/blender/draw/engines/eevee/eevee_subsurface.c

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

diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c 
b/source/blender/draw/engines/eevee/eevee_subsurface.c
index 3396c82501c..c3079d931fb 100644
--- a/source/blender/draw/engines/eevee/eevee_subsurface.c
+++ b/source/blender/draw/engines/eevee/eevee_subsurface.c
@@ -98,9 +98,11 @@ int EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, 
EEVEE_Data *vedata)
                DRW_framebuffer_init(&fbl->sss_clear_fb, 
&draw_engine_eevee_type, (int)viewport_size[0], (int)viewport_size[1],
                                     &tex_data, 1);
 
-               if (effects->sss_separate_albedo && (txl->sss_albedo == NULL)) {
-                       txl->sss_albedo = 
DRW_texture_create_2D((int)viewport_size[0], (int)viewport_size[1],
-                                                               
DRW_TEX_RGB_11_11_10, 0, NULL);
+               if (effects->sss_separate_albedo) {
+                       if (txl->sss_albedo == NULL) {
+                               txl->sss_albedo = 
DRW_texture_create_2D((int)viewport_size[0], (int)viewport_size[1],
+                                                                       
DRW_TEX_RGB_11_11_10, 0, NULL);
+                       }
                }
                else {
                        /* Cleanup to release memory */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to