diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-05-30 15:09:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-05-30 15:09:13 +0300 |
commit | 7f877ee042748f4df7a92a3e84218ea7854b9275 (patch) | |
tree | aa17e7fd8bdebd427b1a3f48b8988dd327d06991 /intern/opensubdiv/internal/evaluator/evaluator_impl.cc | |
parent | fbeec91abf3ff4660c405a248f4ae978eba9be80 (diff) | |
parent | 24e74f8bef813820076cce08635e7c4cb3f2da13 (diff) |
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'intern/opensubdiv/internal/evaluator/evaluator_impl.cc')
-rw-r--r-- | intern/opensubdiv/internal/evaluator/evaluator_impl.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/intern/opensubdiv/internal/evaluator/evaluator_impl.cc b/intern/opensubdiv/internal/evaluator/evaluator_impl.cc index 29b2fe3975f..49a59c44be8 100644 --- a/intern/opensubdiv/internal/evaluator/evaluator_impl.cc +++ b/intern/opensubdiv/internal/evaluator/evaluator_impl.cc @@ -166,6 +166,11 @@ EvalOutputAPI::~EvalOutputAPI() delete implementation_; } +void EvalOutputAPI::setSettings(const OpenSubdiv_EvaluatorSettings *settings) +{ + implementation_->updateSettings(settings); +} + void EvalOutputAPI::setCoarsePositions(const float *positions, const int start_vertex_index, const int num_vertices) @@ -435,8 +440,7 @@ OpenSubdiv_EvaluatorImpl::~OpenSubdiv_EvaluatorImpl() OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( OpenSubdiv_TopologyRefiner *topology_refiner, eOpenSubdivEvaluator evaluator_type, - OpenSubdiv_EvaluatorCacheImpl *evaluator_cache_descr, - const OpenSubdiv_EvaluatorSettings *settings) + OpenSubdiv_EvaluatorCacheImpl *evaluator_cache_descr) { // Only CPU and GLCompute are implemented at the moment. if (evaluator_type != OPENSUBDIV_EVALUATOR_CPU && @@ -455,7 +459,6 @@ OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( const bool has_face_varying_data = (num_face_varying_channels != 0); const int level = topology_refiner->getSubdivisionLevel(topology_refiner); const bool is_adaptive = topology_refiner->getIsAdaptive(topology_refiner); - const int vertex_data_width = settings->num_vertex_data; // Common settings for stencils and patches. const bool stencil_generate_intermediate_levels = is_adaptive; const bool stencil_generate_offsets = true; @@ -560,17 +563,12 @@ OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( varying_stencils, all_face_varying_stencils, 2, - vertex_data_width, patch_table, evaluator_cache); } else { - eval_output = new blender::opensubdiv::CpuEvalOutput(vertex_stencils, - varying_stencils, - all_face_varying_stencils, - 2, - vertex_data_width, - patch_table); + eval_output = new blender::opensubdiv::CpuEvalOutput( + vertex_stencils, varying_stencils, all_face_varying_stencils, 2, patch_table); } blender::opensubdiv::PatchMap *patch_map = new blender::opensubdiv::PatchMap(*patch_table); |