|
Blender V5.0
|
#include <draw_curves_private.hh>
Definition at line 122 of file draw_curves_private.hh.
| gpu::Batch * blender::draw::CurvesEvalCache::batch_get | ( | int | evaluated_point_count, |
| int | curve_count, | ||
| int | face_per_segment, | ||
| bool | use_cyclic, | ||
| bool & | r_over_limit ) |
Definition at line 828 of file draw_cache_impl_curves.cc.
References batch, GPU_batch_create_procedural(), GPU_max_buffer_texture_size(), GPU_PRIM_LINE_STRIP, GPU_PRIM_NONE, and GPU_PRIM_TRI_STRIP.
Referenced by blender::draw::curves_sub_pass_setup_implementation(), and blender::draw::hair_sub_pass_setup_implementation().
| void blender::draw::CurvesEvalCache::clear | ( | ) |
Definition at line 152 of file draw_cache_impl_curves.cc.
References basis_cache_buf, basis_cache_offset_buf, batch, bezier_offsets_buf, control_weights_buf, curves_cyclic_buf, curves_length_buf, curves_order_buf, curves_resolution_buf, curves_type_buf, discard_attributes(), evaluated_points_by_curve_buf, evaluated_pos_rad_buf, evaluated_time_buf, GPU_BATCH_DISCARD_SAFE, handles_positions_left_buf, handles_positions_right_buf, indirection_cylinder_buf, indirection_ribbon_buf, and points_by_curve_buf.
Referenced by blender::draw::clear_batch_cache(), and blender::draw::particle_batch_cache_clear_hair().
| void blender::draw::CurvesEvalCache::discard_attributes | ( | ) |
Definition at line 141 of file draw_cache_impl_curves.cc.
References attr_used, curve_attributes_buf, evaluated_attributes_buf, GPU_MAX_ATTR, and i.
Referenced by clear(), and blender::draw::DRW_curves_batch_cache_free_old().
| void blender::draw::CurvesEvalCache::ensure_attribute | ( | CurvesModule & | module, |
| ParticleDrawSource & | src, | ||
| const Mesh & | mesh, | ||
| const StringRef | name, | ||
| const int | index ) |
Definition at line 1467 of file draw_cache_impl_particles.cc.
References attributes_point_domain, BLI_assert_unreachable, curve_attributes_buf, blender::draw::drw_curves_get_attribute_sampler_name(), blender::draw::ensure_curve_attribute(), and name.
| void blender::draw::CurvesEvalCache::ensure_attribute | ( | struct CurvesModule & | module, |
| const bke::CurvesGeometry & | curves, | ||
| StringRef | name, | ||
| int | index ) |
Definition at line 596 of file draw_cache_impl_curves.cc.
References blender::draw::alloc_evaluated_point_attribute_vbo(), attributes_point_domain, curve_attributes_buf, CURVE_TYPE_BEZIER, CURVE_TYPE_NURBS, blender::draw::drw_curves_get_attribute_sampler_name(), ensure_bezier(), ensure_common(), blender::draw::ensure_control_point_attribute(), ensure_nurbs(), evaluated_attributes_buf, GPU_vertformat_attr_add(), blender::bke::CurvesGeometry::has_curve_with_type(), module, and name.
Referenced by ensure_attributes(), and ensure_attributes().
| void blender::draw::CurvesEvalCache::ensure_attributes | ( | CurvesModule & | module, |
| ParticleDrawSource & | src, | ||
| const GPUMaterial * | gpu_material ) |
Definition at line 1492 of file draw_cache_impl_particles.cc.
References attr_used, attr_used_over_time, Geometry::attributes, blender::bke::AttributeAccessor::contains(), curve_attributes_buf, blender::draw::ParticleDrawSource::curves_num(), blender::draw::drw_attributes_add_request(), blender::draw::drw_attributes_merge(), blender::draw::drw_attributes_overlap(), ensure_attribute(), blender::draw::get_first_uv_name(), GPU_material_attributes(), GPU_MAX_ATTR, i, LISTBASE_FOREACH, blender::draw::ParticleDrawSource::md, ParticleSystemModifierData::mesh_final, module, and name.
| void blender::draw::CurvesEvalCache::ensure_attributes | ( | struct CurvesModule & | module, |
| const bke::CurvesGeometry & | curves, | ||
| const GPUMaterial * | gpu_material ) |
Definition at line 645 of file draw_cache_impl_curves.cc.
References attr_used, attr_used_over_time, blender::bke::CurvesGeometry::attributes(), blender::bke::AttributeAccessor::contains(), curve_attributes_buf, blender::draw::drw_attributes_add_request(), blender::draw::drw_attributes_merge(), blender::draw::drw_attributes_overlap(), ensure_attribute(), evaluated_attributes_buf, blender::draw::get_first_uv_name(), GPU_material_attributes(), GPU_MAX_ATTR, i, LISTBASE_FOREACH, module, and name.
Referenced by blender::draw::curves_sub_pass_setup_implementation(), blender::draw::DRW_curves_texture_for_evaluated_attribute(), and blender::draw::hair_sub_pass_setup_implementation().
| void blender::draw::CurvesEvalCache::ensure_bezier | ( | const bke::CurvesGeometry & | curves | ) |
Definition at line 702 of file draw_cache_impl_curves.cc.
References bezier_offsets_buf, blender::gpu::VertBuf::from_span(), blender::bke::CurvesGeometry::handle_positions_left(), blender::bke::CurvesGeometry::handle_positions_right(), handles_positions_left_buf, handles_positions_right_buf, left, blender::bke::CurvesGeometry::positions(), and CurvesGeometry::runtime.
Referenced by ensure_attribute(), and ensure_positions().
| void blender::draw::CurvesEvalCache::ensure_common | ( | const bke::CurvesGeometry & | curves | ) |
Definition at line 686 of file draw_cache_impl_curves.cc.
References blender::bke::CurvesGeometry::curve_types(), curves_cyclic_buf, curves_resolution_buf, curves_type_buf, blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::evaluated_points_by_curve(), evaluated_points_by_curve_buf, blender::gpu::VertBuf::from_span(), blender::gpu::VertBuf::from_varray(), blender::bke::CurvesGeometry::points_by_curve(), points_by_curve_buf, and blender::bke::CurvesGeometry::resolution().
Referenced by ensure_attribute(), ensure_positions(), ensure_positions(), indirection_buf_get(), and indirection_buf_get().
| void blender::draw::CurvesEvalCache::ensure_common | ( | ParticleDrawSource & | src | ) |
Definition at line 1537 of file draw_cache_impl_particles.cc.
References CURVE_TYPE_CATMULL_ROM, curves_cyclic_buf, blender::draw::ParticleDrawSource::curves_num(), curves_resolution_buf, curves_type_buf, blender::draw::ParticleDrawSource::evaluated_points_by_curve(), evaluated_points_by_curve_buf, blender::VArray< T >::from_single(), blender::gpu::VertBuf::from_span(), blender::gpu::VertBuf::from_varray(), blender::draw::ParticleDrawSource::points_by_curve(), points_by_curve_buf, and blender::draw::ParticleDrawSource::resolution().
| void blender::draw::CurvesEvalCache::ensure_nurbs | ( | const bke::CurvesGeometry & | curves | ) |
Definition at line 715 of file draw_cache_impl_curves.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), basis_cache_buf, basis_cache_offset_buf, control_weights_buf, curves_order_buf, blender::bke::CurvesGeometry::ensure_can_interpolate_to_evaluated(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::gpu::VertBuf::from_span(), blender::gpu::VertBuf::from_varray(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::CurvesGeometry::nurbs_orders(), blender::bke::CurvesGeometry::nurbs_weights(), CurvesGeometry::runtime, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by ensure_attribute(), and ensure_positions().
| void blender::draw::CurvesEvalCache::ensure_positions | ( | CurvesModule & | module, |
| const bke::CurvesGeometry & | curves ) |
Definition at line 759 of file draw_cache_impl_curves.cc.
References CURVE_TYPE_BEZIER, CURVE_TYPE_NURBS, curves_length_buf, blender::bke::CurvesGeometry::curves_num(), blender::gpu::VertBuf::device_only(), ensure_bezier(), ensure_common(), ensure_nurbs(), evaluated_pos_rad_buf, evaluated_time_buf, blender::gpu::VertBuf::from_span(), blender::gpu::VertBuf::from_varray(), blender::bke::CurvesGeometry::has_curve_with_type(), blender::bke::CurvesGeometry::is_empty(), module, blender::bke::CurvesGeometry::positions(), and blender::bke::CurvesGeometry::radius().
Referenced by blender::draw::curves_pos_buffer_get(), blender::draw::curves_sub_pass_setup_implementation(), blender::draw::hair_pos_buffer_get(), and blender::draw::hair_sub_pass_setup_implementation().
| void blender::draw::CurvesEvalCache::ensure_positions | ( | CurvesModule & | module, |
| ParticleDrawSource & | src ) |
Definition at line 1574 of file draw_cache_impl_particles.cc.
References curves_length_buf, blender::draw::ParticleDrawSource::curves_num(), blender::gpu::VertBuf::device_only(), ensure_common(), blender::draw::ParticleDrawSource::evaluated_points_num(), evaluated_pos_rad_buf, evaluated_time_buf, blender::draw::ParticleSpans::foreach_strand(), blender::gpu::VertBuf::from_size(), blender::draw::hair_shape_radius(), i, ParticleSystem::imat, module, ParticleSystem::part, PART_SHAPE_CLOSE_TIP, blender::draw::ParticleDrawSource::particles_get(), blender::draw::ParticleDrawSource::points_num(), blender::draw::ParticleDrawSource::psys, ParticleSettings::shape, and transform().
| gpu::VertBufPtr & blender::draw::CurvesEvalCache::indirection_buf_get | ( | CurvesModule & | module, |
| const bke::CurvesGeometry & | curves, | ||
| int | face_per_segment ) |
Definition at line 805 of file draw_cache_impl_curves.cc.
References ensure_common(), indirection_cylinder_buf, indirection_ribbon_buf, and module.
Referenced by blender::draw::curves_sub_pass_setup_implementation(), and blender::draw::hair_sub_pass_setup_implementation().
| gpu::VertBufPtr & blender::draw::CurvesEvalCache::indirection_buf_get | ( | CurvesModule & | module, |
| ParticleDrawSource & | src, | ||
| int | face_per_segment ) |
Definition at line 1638 of file draw_cache_impl_particles.cc.
References blender::draw::ParticleDrawSource::curves_num(), blender::gpu::VertBuf::device_only(), ensure_common(), indirection_cylinder_buf, indirection_ribbon_buf, and module.
| VectorSet<std::string> blender::draw::CurvesEvalCache::attr_used |
Attributes currently being drawn or about to be drawn.
Definition at line 179 of file draw_curves_private.hh.
Referenced by blender::draw::curves_bind_resources_implementation(), discard_attributes(), blender::draw::DRW_curves_batch_cache_free_old(), blender::draw::DRW_curves_texture_for_evaluated_attribute(), ensure_attributes(), ensure_attributes(), and blender::draw::request_attribute().
| VectorSet<std::string> blender::draw::CurvesEvalCache::attr_used_over_time |
Attributes that were used at some point. This is used for garbage collection, to remove attributes that are not used in shaders anymore due to user edits.
Definition at line 184 of file draw_curves_private.hh.
Referenced by blender::draw::DRW_curves_batch_cache_free_old(), ensure_attributes(), and ensure_attributes().
| std::array<bool, GPU_MAX_ATTR> blender::draw::CurvesEvalCache::attributes_point_domain |
Definition at line 196 of file draw_curves_private.hh.
Referenced by blender::draw::curves_bind_resources_implementation(), blender::draw::DRW_curves_texture_for_evaluated_attribute(), ensure_attribute(), and ensure_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::basis_cache_buf |
Buffer containing all nurbs::BasisCache concatenated.
Definition at line 172 of file draw_curves_private.hh.
Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::basis_cache_offset_buf |
Buffer containing offsets to the start of each nurbs::BasisCache for each curve.
Definition at line 174 of file draw_curves_private.hh.
Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| std::array<gpu::Batch *, MAX_FACE_PER_SEGMENT> blender::draw::CurvesEvalCache::batch |
Definition at line 199 of file draw_curves_private.hh.
Referenced by batch_get(), and clear().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::bezier_offsets_buf |
Buffer containing EvaluatedOffsets::all_bezier_offsets.
Definition at line 163 of file draw_curves_private.hh.
Referenced by clear(), ensure_bezier(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::control_weights_buf |
Buffer containing CurveGeometry::nurbs_weights().
Definition at line 170 of file draw_curves_private.hh.
Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::curve_attributes_buf[GPU_MAX_ATTR] |
Definition at line 192 of file draw_curves_private.hh.
Referenced by blender::draw::curves_bind_resources_implementation(), discard_attributes(), blender::draw::DRW_curves_texture_for_evaluated_attribute(), ensure_attribute(), ensure_attribute(), ensure_attributes(), and ensure_attributes().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_cyclic_buf |
Buffer containing CurveGeometry::cyclic_offsets() or dummy data if not needed.
Definition at line 154 of file draw_curves_private.hh.
Referenced by clear(), ensure_common(), ensure_common(), blender::draw::CurvesModule::evaluate_curve_attribute(), blender::draw::CurvesModule::evaluate_curve_length_intercept(), and blender::draw::CurvesModule::evaluate_topology_indirection().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_length_buf |
Intercept time per curve.
Definition at line 133 of file draw_curves_private.hh.
Referenced by clear(), blender::draw::curves_bind_resources_implementation(), ensure_positions(), ensure_positions(), blender::draw::CurvesModule::evaluate_curve_attribute(), and blender::draw::CurvesModule::evaluate_curve_length_intercept().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_order_buf |
Buffer containing CurveGeometry::nurbs_orders().
Definition at line 168 of file draw_curves_private.hh.
Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_resolution_buf |
Buffer containing CurveGeometry::resolution().
Definition at line 152 of file draw_curves_private.hh.
Referenced by clear(), ensure_common(), ensure_common(), blender::draw::CurvesModule::evaluate_curve_attribute(), and blender::draw::CurvesModule::evaluate_curve_length_intercept().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_type_buf |
Buffer containing CurveGeometry::curve_types().
Definition at line 150 of file draw_curves_private.hh.
Referenced by clear(), ensure_common(), ensure_common(), blender::draw::CurvesModule::evaluate_curve_attribute(), and blender::draw::CurvesModule::evaluate_curve_length_intercept().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::evaluated_attributes_buf[GPU_MAX_ATTR] |
Definition at line 194 of file draw_curves_private.hh.
Referenced by blender::draw::curves_bind_resources_implementation(), discard_attributes(), blender::draw::DRW_curves_texture_for_evaluated_attribute(), ensure_attribute(), and ensure_attributes().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::evaluated_points_by_curve_buf |
Buffer containing CurveGeometry::evaluated_points_by_curve().
Definition at line 148 of file draw_curves_private.hh.
Referenced by clear(), ensure_common(), ensure_common(), blender::draw::CurvesModule::evaluate_curve_attribute(), blender::draw::CurvesModule::evaluate_curve_length_intercept(), and blender::draw::CurvesModule::evaluate_topology_indirection().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::evaluated_pos_rad_buf |
Position and radius per evaluated point. Always evaluated.
Definition at line 126 of file draw_curves_private.hh.
Referenced by clear(), blender::draw::curves_bind_resources_implementation(), blender::draw::curves_pos_buffer_get(), ensure_positions(), ensure_positions(), blender::draw::CurvesModule::evaluate_curve_attribute(), blender::draw::CurvesModule::evaluate_curve_length_intercept(), and blender::draw::hair_pos_buffer_get().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::evaluated_time_buf |
Intercept time per evaluated point.
Definition at line 130 of file draw_curves_private.hh.
Referenced by clear(), blender::draw::curves_bind_resources_implementation(), ensure_positions(), ensure_positions(), blender::draw::CurvesModule::evaluate_curve_attribute(), and blender::draw::CurvesModule::evaluate_curve_length_intercept().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::handles_positions_left_buf |
Buffer containing CurveGeometry::handle_positions_left().
Definition at line 159 of file draw_curves_private.hh.
Referenced by clear(), ensure_bezier(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::handles_positions_right_buf |
Buffer containing CurveGeometry::handle_positions_right().
Definition at line 161 of file draw_curves_private.hh.
Referenced by clear(), ensure_bezier(), and blender::draw::CurvesModule::evaluate_curve_attribute().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::indirection_cylinder_buf |
Definition at line 141 of file draw_curves_private.hh.
Referenced by clear(), indirection_buf_get(), and indirection_buf_get().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::indirection_ribbon_buf |
Definition at line 139 of file draw_curves_private.hh.
Referenced by clear(), indirection_buf_get(), and indirection_buf_get().
| int blender::draw::CurvesEvalCache::last_attr_matching_time |
The last time in seconds that the attr_used and attr_used_over_time were exactly the same. If the delta between this time and the current scene time is greater than the timeout set in user preferences (U.vbotimeout) then garbage collection is performed.
Definition at line 190 of file draw_curves_private.hh.
Referenced by blender::draw::DRW_curves_batch_cache_free_old().
| gpu::VertBufPtr blender::draw::CurvesEvalCache::points_by_curve_buf |
Buffer containing CurveGeometry::points_by_curve().
Definition at line 146 of file draw_curves_private.hh.
Referenced by clear(), ensure_common(), ensure_common(), blender::draw::CurvesModule::evaluate_curve_attribute(), and blender::draw::CurvesModule::evaluate_curve_length_intercept().
| int blender::draw::CurvesEvalCache::resolution = 0 |
Definition at line 231 of file draw_curves_private.hh.
Referenced by blender::draw::hair_particle_get_eval_cache().