Commit: 9b47ad2974bac14342f09ad16176d8dc5452840d
Author: Clément Foucault
Date:   Fri Mar 2 18:08:40 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB9b47ad2974bac14342f09ad16176d8dc5452840d

Eevee: Cleanup & fix Warnings.

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

M       source/blender/draw/engines/eevee/eevee_engine.c
M       source/blender/draw/engines/eevee/eevee_lightprobes.c
M       source/blender/draw/engines/eevee/eevee_render.c

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

diff --git a/source/blender/draw/engines/eevee/eevee_engine.c 
b/source/blender/draw/engines/eevee/eevee_engine.c
index 406d0ff7049..2a866ee2b86 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -87,10 +87,7 @@ static void eevee_engine_init(void *ved)
 
        if ((stl->effects->taa_current_sample > 1) && 
!DRW_state_is_image_render()) {
                /* XXX otherwise it would break the other engines. */
-               DRW_viewport_matrix_override_unset(DRW_MAT_PERS);
-               DRW_viewport_matrix_override_unset(DRW_MAT_PERSINV);
-               DRW_viewport_matrix_override_unset(DRW_MAT_WIN);
-               DRW_viewport_matrix_override_unset(DRW_MAT_WININV);
+               DRW_viewport_matrix_override_unset_all();
        }
 }
 
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c 
b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index cf6d1e153dc..b69823b60c3 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -859,7 +859,6 @@ static void EEVEE_lightprobes_updates(EEVEE_ViewLayerData 
*sldata, EEVEE_PassLis
 void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data 
*vedata)
 {
        EEVEE_CommonUniformBuffer *common_data = &sldata->common_data;
-       EEVEE_StorageList *stl = vedata->stl;
        EEVEE_LightProbesInfo *pinfo = sldata->probes;
        Object *ob;
 
@@ -1219,12 +1218,7 @@ static void render_scene_to_probe(
        DRW_framebuffer_texture_attach(sldata->probe_fb, sldata->probe_rt, 0, 
0);
        DRW_framebuffer_texture_attach(sldata->probe_fb, 
sldata->probe_depth_rt, 0, 0);
 
-       DRW_viewport_matrix_override_unset(DRW_MAT_PERS);
-       DRW_viewport_matrix_override_unset(DRW_MAT_PERSINV);
-       DRW_viewport_matrix_override_unset(DRW_MAT_VIEW);
-       DRW_viewport_matrix_override_unset(DRW_MAT_VIEWINV);
-       DRW_viewport_matrix_override_unset(DRW_MAT_WIN);
-       DRW_viewport_matrix_override_unset(DRW_MAT_WININV);
+       DRW_viewport_matrix_override_unset_all();
 
        /* Restore */
        txl->planar_pool = tmp_planar_pool;
@@ -1301,10 +1295,7 @@ static void render_scene_to_planar(
        /* Restore */
        txl->planar_pool = tmp_planar_pool;
        txl->planar_depth = tmp_planar_depth;
-       DRW_viewport_matrix_override_unset(DRW_MAT_PERS);
-       DRW_viewport_matrix_override_unset(DRW_MAT_PERSINV);
-       DRW_viewport_matrix_override_unset(DRW_MAT_VIEW);
-       DRW_viewport_matrix_override_unset(DRW_MAT_VIEWINV);
+       DRW_viewport_matrix_override_unset_all();
 
        DRW_framebuffer_texture_detach(txl->planar_pool);
        DRW_framebuffer_texture_detach(txl->planar_depth);
@@ -1353,12 +1344,7 @@ static void render_world_to_probe(EEVEE_ViewLayerData 
*sldata, EEVEE_PassList *p
        DRW_framebuffer_texture_attach(sldata->probe_fb, sldata->probe_rt, 0, 
0);
        DRW_framebuffer_texture_attach(sldata->probe_fb, 
sldata->probe_depth_rt, 0, 0);
 
-       DRW_viewport_matrix_override_unset(DRW_MAT_PERS);
-       DRW_viewport_matrix_override_unset(DRW_MAT_PERSINV);
-       DRW_viewport_matrix_override_unset(DRW_MAT_VIEW);
-       DRW_viewport_matrix_override_unset(DRW_MAT_VIEWINV);
-       DRW_viewport_matrix_override_unset(DRW_MAT_WIN);
-       DRW_viewport_matrix_override_unset(DRW_MAT_WININV);
+       DRW_viewport_matrix_override_unset_all();
 }
 
 static void lightprobe_cell_grid_location_get(EEVEE_LightGrid *egrid, int 
cell_idx, float r_local_cell[3])
diff --git a/source/blender/draw/engines/eevee/eevee_render.c 
b/source/blender/draw/engines/eevee/eevee_render.c
index b86edad9d14..bc55624c7b7 100644
--- a/source/blender/draw/engines/eevee/eevee_render.c
+++ b/source/blender/draw/engines/eevee/eevee_render.c
@@ -47,7 +47,6 @@
 void EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph 
*depsgraph)
 {
        EEVEE_Data *vedata = (EEVEE_Data *)ved;
-       EEVEE_PassList *psl = vedata->psl;
        EEVEE_StorageList *stl = vedata->stl;
        EEVEE_TextureList *txl = vedata->txl;
        EEVEE_FramebufferList *fbl = vedata->fbl;

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

Reply via email to