|
Blender V5.3
|
#include <draw_curves_private.hh>
Public Member Functions | |
| void | ensure_attribute (struct CurvesModule &module, const bke::CurvesGeometry &curves, StringRef name, int index) |
| void | ensure_attributes (struct CurvesModule &module, const bke::CurvesGeometry &curves, const GPUMaterial *gpu_material) |
| void | ensure_common (const bke::CurvesGeometry &curves) |
| void | ensure_bezier (const bke::CurvesGeometry &curves) |
| void | ensure_nurbs (const bke::CurvesGeometry &curves) |
| void | ensure_positions (CurvesModule &module, const bke::CurvesGeometry &curves) |
| gpu::VertBufPtr & | indirection_buf_get (CurvesModule &module, const bke::CurvesGeometry &curves, int face_per_segment) |
| gpu::Batch * | batch_get (int evaluated_point_count, int curve_count, int face_per_segment, bool use_cyclic, bool &r_over_limit) |
| void | discard_attributes () |
| void | clear () |
| void | ensure_attribute (CurvesModule &module, ParticleDrawSource &src, const Mesh &mesh, const StringRef name, const int index) |
| void | ensure_attributes (CurvesModule &module, ParticleDrawSource &src, const GPUMaterial *gpu_material) |
| void | ensure_common (ParticleDrawSource &src) |
| void | ensure_positions (CurvesModule &module, ParticleDrawSource &src) |
| gpu::VertBufPtr & | indirection_buf_get (CurvesModule &module, ParticleDrawSource &src, int face_per_segment) |
Definition at line 124 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 879 of file draw_cache_impl_curves.cc.
References batch, blender::GPU_batch_create_procedural(), blender::GPU_max_buffer_texture_size(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_PRIM_NONE, blender::GPU_PRIM_TRI_STRIP, and INT_MAX.
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 154 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 143 of file draw_cache_impl_curves.cc.
References attr_used, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), curve_attributes_buf, evaluated_attributes_buf, and blender::IndexRange::IndexRange().
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 1456 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(), and blender::draw::ensure_curve_attribute().
| void blender::draw::CurvesEvalCache::ensure_attribute | ( | struct CurvesModule & | module, |
| const bke::CurvesGeometry & | curves, | ||
| StringRef | name, | ||
| int | index ) |
Definition at line 647 of file draw_cache_impl_curves.cc.
References blender::draw::alloc_evaluated_point_attribute_vbo(), attributes_point_domain, curve_attributes_buf, blender::CURVE_TYPE_BEZIER, blender::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, and blender::GPU_vertformat_attr_add().
Referenced by ensure_attributes(), and ensure_attributes().
| void blender::draw::CurvesEvalCache::ensure_attributes | ( | CurvesModule & | module, |
| ParticleDrawSource & | src, | ||
| const GPUMaterial * | gpu_material ) |
Definition at line 1481 of file draw_cache_impl_particles.cc.
References attr_used, attr_used_over_time, 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(), blender::GPU_material_attributes(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), blender::IndexRange::IndexRange(), blender::blender::StringRefBase::is_empty(), blender::draw::ParticleDrawSource::md, and blender::ParticleSystemModifierData::mesh_final.
| void blender::draw::CurvesEvalCache::ensure_attributes | ( | struct CurvesModule & | module, |
| const bke::CurvesGeometry & | curves, | ||
| const GPUMaterial * | gpu_material ) |
Definition at line 696 of file draw_cache_impl_curves.cc.
References attr_used, attr_used_over_time, 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(), blender::GPU_material_attributes(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), blender::IndexRange::IndexRange(), and blender::blender::StringRefBase::is_empty().
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 753 of file draw_cache_impl_curves.cc.
References bezier_offsets_buf, blender::gpu::VertBuf::from_span(), handles_positions_left_buf, and handles_positions_right_buf.
Referenced by ensure_attribute(), and ensure_positions().
| void blender::draw::CurvesEvalCache::ensure_common | ( | const bke::CurvesGeometry & | curves | ) |
Definition at line 737 of file draw_cache_impl_curves.cc.
References curves_cyclic_buf, curves_resolution_buf, curves_type_buf, evaluated_points_by_curve_buf, blender::gpu::VertBuf::from_span(), blender::gpu::VertBuf::from_varray(), and points_by_curve_buf.
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 1526 of file draw_cache_impl_particles.cc.
References blender::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 766 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::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::gpu::VertBuf::from_span(), blender::gpu::VertBuf::from_varray(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), 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 810 of file draw_cache_impl_curves.cc.
References blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_NURBS, curves_length_buf, blender::gpu::VertBuf::device_only(), ensure_bezier(), ensure_common(), ensure_nurbs(), evaluated_pos_rad_buf, evaluated_time_buf, blender::gpu::VertBuf::from_span(), and blender::gpu::VertBuf::from_varray().
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 1563 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(), blender::ParticleSystem::imat, blender::ParticleSystem::part, blender::PART_SHAPE_CLOSE_TIP, blender::draw::ParticleDrawSource::particles_get(), blender::draw::ParticleDrawSource::points_num(), blender::draw::ParticleDrawSource::psys, and blender::ParticleSettings::shape.
| gpu::VertBufPtr & blender::draw::CurvesEvalCache::indirection_buf_get | ( | CurvesModule & | module, |
| const bke::CurvesGeometry & | curves, | ||
| int | face_per_segment ) |
Definition at line 856 of file draw_cache_impl_curves.cc.
References ensure_common(), indirection_cylinder_buf, and indirection_ribbon_buf.
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 1627 of file draw_cache_impl_particles.cc.
References blender::draw::ParticleDrawSource::curves_num(), blender::gpu::VertBuf::device_only(), ensure_common(), indirection_cylinder_buf, and indirection_ribbon_buf.
| VectorSet<std::string> blender::draw::CurvesEvalCache::attr_used |
Attributes currently being drawn or about to be drawn.
Definition at line 181 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 186 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 198 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 174 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 176 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 201 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 165 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 172 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 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(), 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 156 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 135 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 170 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 154 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 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::evaluated_attributes_buf[GPU_MAX_ATTR] |
Definition at line 196 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 150 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 128 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 132 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 161 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 163 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 143 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 141 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 192 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 148 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 233 of file draw_curves_private.hh.
Referenced by blender::draw::hair_particle_get_eval_cache().