diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-06 12:47:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-06 12:47:44 +0300 |
commit | 6a2305191f7b7deaec3d039f792584c57330c9b2 (patch) | |
tree | c453ff6e61f9bb486a1f5c200bf75ec23a8246c2 /source/blender | |
parent | 28c363aa0beb5f9d38116dbc79e601b84e9e48e3 (diff) |
Cleanup: Remove unused modifier evaluation flag
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_modifier.h | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 25 |
2 files changed, 10 insertions, 21 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index d0b9d2adc5b..71d693f8b75 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -119,12 +119,6 @@ typedef enum ModifierApplyFlag { MOD_APPLY_IGNORE_SIMPLIFY = 1 << 3, /* Ignore scene simplification flag and use subdivisions * level set in multires modifier. */ - MOD_APPLY_ALLOW_GPU = 1 << 4, /* Allow modifier to be applied and stored in the GPU. - * Used by the viewport in order to be able to have SS - * happening on GPU. - * Render pipeline (including viewport render) should - * have DM on the CPU. - */ } ModifierApplyFlag; typedef struct ModifierUpdateDepsgraphContext { diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 86c6f175340..27da612e960 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1966,7 +1966,6 @@ static void mesh_calc_modifiers( int useDeform, const bool need_mapping, CustomDataMask dataMask, const int index, const bool useCache, const bool build_shapekey_layers, - const bool allow_gpu, /* return args */ Mesh **r_deform_mesh, Mesh **r_final_mesh) { @@ -2008,8 +2007,6 @@ static void mesh_calc_modifiers( if (useCache) app_flags |= MOD_APPLY_USECACHE; - if (allow_gpu) - app_flags |= MOD_APPLY_ALLOW_GPU; if (useDeform) deform_app_flags |= MOD_APPLY_USECACHE; @@ -2466,7 +2463,6 @@ static void mesh_calc_modifiers_dm( int useDeform, const bool need_mapping, CustomDataMask dataMask, const int index, const bool useCache, const bool build_shapekey_layers, - const bool allow_gpu, /* return args */ DerivedMesh **r_deformdm, DerivedMesh **r_finaldm) { @@ -2474,7 +2470,7 @@ static void mesh_calc_modifiers_dm( mesh_calc_modifiers( depsgraph, scene, ob, inputVertexCos, useDeform, - need_mapping, dataMask, index, useCache, build_shapekey_layers, allow_gpu, + need_mapping, dataMask, index, useCache, build_shapekey_layers, (r_deformdm ? &deform_mesh : NULL), &final_mesh); if (deform_mesh) { @@ -2550,7 +2546,7 @@ static void editbmesh_calc_modifiers( /* TODO(sybren): do we really need multiple objects, or shall we change the flags where needed? */ const ModifierEvalContext mectx = {depsgraph, ob, 0}; const ModifierEvalContext mectx_orco = {depsgraph, ob, MOD_APPLY_ORCO}; - const ModifierEvalContext mectx_cache_gpu = {depsgraph, ob, MOD_APPLY_USECACHE | MOD_APPLY_ALLOW_GPU}; + const ModifierEvalContext mectx_cache = {depsgraph, ob, MOD_APPLY_USECACHE}; const bool do_loop_normals = (((Mesh *)(ob->data))->flag & ME_AUTOSMOOTH) != 0; const float loop_normals_split_angle = ((Mesh *)(ob->data))->smoothresh; @@ -2688,9 +2684,9 @@ static void editbmesh_calc_modifiers( } if (mti->applyModifierEM || mti->applyModifierEM_DM) - ndm = modwrap_applyModifierEM(md, &mectx_cache_gpu, em, dm); + ndm = modwrap_applyModifierEM(md, &mectx_cache, em, dm); else - ndm = modwrap_applyModifier(md, &mectx_cache_gpu, dm); + ndm = modwrap_applyModifier(md, &mectx_cache, dm); ASSERT_IS_VALID_DM(ndm); if (ndm) { @@ -2886,7 +2882,6 @@ static void mesh_build_data( mesh_calc_modifiers( depsgraph, scene, ob, NULL, 1, need_mapping, dataMask, -1, true, build_shapekey_layers, - true, &ob->runtime.mesh_deform_eval, &ob->runtime.mesh_eval); mesh_finalize_eval(ob); @@ -3082,7 +3077,7 @@ DerivedMesh *mesh_create_derived_render(struct Depsgraph *depsgraph, Scene *scen DerivedMesh *final; mesh_calc_modifiers_dm( - depsgraph, scene, ob, NULL, 1, false, dataMask, -1, false, false, false, + depsgraph, scene, ob, NULL, 1, false, dataMask, -1, false, false, NULL, &final); return final; @@ -3095,7 +3090,7 @@ DerivedMesh *mesh_create_derived_index_render(struct Depsgraph *depsgraph, Scene DerivedMesh *final; mesh_calc_modifiers_dm( - depsgraph, scene, ob, NULL, 1, false, dataMask, index, false, false, false, + depsgraph, scene, ob, NULL, 1, false, dataMask, index, false, false, NULL, &final); return final; @@ -3108,7 +3103,7 @@ struct Mesh *mesh_create_eval_final_index_render( Mesh *final; mesh_calc_modifiers( - depsgraph, scene, ob, NULL, 1, false, dataMask, index, false, false, false, + depsgraph, scene, ob, NULL, 1, false, dataMask, index, false, false, NULL, &final); return final; @@ -3129,7 +3124,7 @@ DerivedMesh *mesh_create_derived_view( ob->transflag |= OB_NO_PSYS_UPDATE; mesh_calc_modifiers_dm( - depsgraph, scene, ob, NULL, 1, false, dataMask, -1, false, false, false, + depsgraph, scene, ob, NULL, 1, false, dataMask, -1, false, false, NULL, &final); ob->transflag &= ~OB_NO_PSYS_UPDATE; @@ -3151,7 +3146,7 @@ Mesh *mesh_create_eval_final_view( ob->transflag |= OB_NO_PSYS_UPDATE; mesh_calc_modifiers( - depsgraph, scene, ob, NULL, 1, false, dataMask, -1, false, false, false, + depsgraph, scene, ob, NULL, 1, false, dataMask, -1, false, false, NULL, &final); ob->transflag &= ~OB_NO_PSYS_UPDATE; @@ -3166,7 +3161,7 @@ DerivedMesh *mesh_create_derived_no_deform( DerivedMesh *final; mesh_calc_modifiers_dm( - depsgraph, scene, ob, vertCos, 0, false, dataMask, -1, false, false, false, + depsgraph, scene, ob, vertCos, 0, false, dataMask, -1, false, false, NULL, &final); return final; |