|
Blender V5.3
|
#include <draw_gsplat_private.hh>
Public Member Functions | |
GSplatEvalCache management | |
| void | ensure_builtin_buffers (PointCloud &pointcloud) |
| void | ensure_compute_buffers (PointCloud &pointcloud) |
| void | ensure_edit_dots_indices (PointCloud &pointcloud) |
| void | ensure_attribute (PointCloud &pointcloud, int attrib_i) |
| gpu::VertBuf * | shape_data_buf_get () |
| gpu::VertBuf * | radiance_data_buf_get () |
| gpu::VertBuf ** | ellipses_comp_buf_get () |
| gpu::VertBuf ** | radiance_comp_buf_get () |
| gpu::UniformBuf * | infos_buf_get () |
| gpu::VertBuf ** | attributes_get (uint request_i) |
| gpu::Batch * | dots_get () |
| gpu::Batch * | edit_dots_get () |
| gpu::Batch * | surface_get (const PointCloud &pointcloud) |
| void | ensure_requested (PointCloud &pointcloud) |
| void | discard_buffers () |
| void | discard_attributes () |
Static Public Member Functions | |
GSplatBatchCache management | |
| static GSplatEvalCache & | get (PointCloud &pointcloud) |
Public Attributes | |
| friend | GSplatModule |
| friend | GSplatBatchCache |
| gpu::Batch * | surface |
| gpu::Batch ** | surface_per_mat |
| gpu::Batch * | dots |
| gpu::Batch * | edit_dots |
| gpu::VertBuf * | shape_data_buf |
| gpu::VertBuf * | radiance_data_buf |
| gpu::UniformBuf * | infos_buf |
| gpu::VertBuf * | ellipses_comp_buf |
| gpu::VertBuf * | radiance_comp_buf |
| gpu::VertBuf * | attr_viewer |
| gpu::VertBuf * | attributes_buf [GPU_MAX_ATTR] |
| gpu::IndexBuf * | edit_dots_indices = nullptr |
| VectorSet< std::string > | attr_used |
| VectorSet< std::string > | attr_used_over_time |
| int | last_attr_matching_time |
| int | mat_len |
Cache object that stores batches and buffers for drawing a gsplat, and is responsible for filling these from the object's attributes.
Pointers to batches/buffers are provided through _get(), and are not present until ensure_requested() is called.
Definition at line 53 of file draw_gsplat_private.hh.
| gpu::VertBuf ** blender::draw::GSplatEvalCache::attributes_get | ( | uint | request_i | ) |
Definition at line 436 of file draw_cache_impl_gsplat.cc.
References attributes_buf.
Referenced by blender::draw::DRW_gsplat_evaluated_attribute().
| void blender::draw::GSplatEvalCache::discard_attributes | ( | ) |
Definition at line 428 of file draw_cache_impl_gsplat.cc.
References attr_used, attributes_buf, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), GPU_VERTBUF_DISCARD_SAFE, and blender::IndexRange::IndexRange().
Referenced by discard_buffers(), and blender::draw::DRW_gsplat_batch_cache_free_old().
| void blender::draw::GSplatEvalCache::discard_buffers | ( | ) |
Definition at line 403 of file draw_cache_impl_gsplat.cc.
References attr_viewer, discard_attributes(), dots, edit_dots, edit_dots_indices, ellipses_comp_buf, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_UBO_FREE_SAFE, GPU_VERTBUF_DISCARD_SAFE, infos_buf, mat_len, radiance_comp_buf, radiance_data_buf, shape_data_buf, surface, and surface_per_mat.
Referenced by blender::draw::GSplatBatchCache::clear().
| gpu::Batch * blender::draw::GSplatEvalCache::dots_get | ( | ) |
Definition at line 473 of file draw_cache_impl_gsplat.cc.
References dots, and blender::DRW_batch_request().
Referenced by blender::draw::DRW_gsplat_batch_cache_get_dots().
| gpu::Batch * blender::draw::GSplatEvalCache::edit_dots_get | ( | ) |
Definition at line 478 of file draw_cache_impl_gsplat.cc.
References blender::DRW_batch_request(), and edit_dots.
Referenced by blender::draw::DRW_gsplat_batch_cache_get_edit_dots().
| gpu::VertBuf ** blender::draw::GSplatEvalCache::ellipses_comp_buf_get | ( | ) |
Definition at line 453 of file draw_cache_impl_gsplat.cc.
References blender::DRW_vbo_request(), and ellipses_comp_buf.
Referenced by blender::draw::detail::compute_pass_setup(), and blender::draw::detail::draw_subpass_setup().
| void blender::draw::GSplatEvalCache::ensure_attribute | ( | PointCloud & | pointcloud, |
| int | attrib_i ) |
Definition at line 334 of file draw_cache_impl_gsplat.cc.
References attr_used, attribute, attributes_buf, blender::array_utils::copy(), blender::gpu::VertBuf::data(), blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, blender::GPU_USAGE_STATIC, blender::GPU_vertbuf_data_alloc(), blender::GPU_vertbuf_init_with_format_ex(), blender::GPU_vertformat_attr_add(), blender::bke::AttributeAccessor::lookup_or_default(), blender::bke::Point, and blender::PointCloud::totpoint.
Referenced by ensure_requested().
| void blender::draw::GSplatEvalCache::ensure_builtin_buffers | ( | PointCloud & | pointcloud | ) |
Definition at line 215 of file draw_cache_impl_gsplat.cc.
References blender::math::QuaternionBase< float >::identity(), blender::VArrayCommon< T >::index_range(), blender::bke::AttributeAccessor::lookup_or_default(), blender::threading::parallel_for(), blender::bke::Point, blender::draw::detail::read_radiance_sh_attributes(), scale(), blender::VArrayCommon< T >::size(), blender::draw::value_opacity_default, and blender::draw::value_scale_default.
Referenced by ensure_requested().
| void blender::draw::GSplatEvalCache::ensure_compute_buffers | ( | PointCloud & | pointcloud | ) |
Definition at line 360 of file draw_cache_impl_gsplat.cc.
References blender::gpu::VertBuf::allocate(), ellipses_comp_buf, blender::GPU_USAGE_DEVICE_ONLY, blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, blender::GPU_USAGE_STATIC, blender::GPU_vertformat_attr_add(), blender::gpu::VertBuf::init(), radiance_comp_buf, and blender::PointCloud::totpoint.
Referenced by ensure_requested().
| void blender::draw::GSplatEvalCache::ensure_edit_dots_indices | ( | PointCloud & | pointcloud | ) |
Definition at line 320 of file draw_cache_impl_gsplat.cc.
References edit_dots_indices, blender::IndexMask::from_bools(), blender::draw::detail::index_mask_to_ibo(), blender::bke::AttributeAccessor::lookup_or_default(), and blender::bke::Point.
Referenced by ensure_requested().
| void blender::draw::GSplatEvalCache::ensure_requested | ( | PointCloud & | pointcloud | ) |
Fill and build all requested buffers/batches.
Definition at line 377 of file draw_cache_impl_gsplat.cc.
References attr_used, attributes_buf, dots, blender::DRW_batch_requested(), blender::DRW_ibo_request(), blender::DRW_ibo_requested(), blender::DRW_vbo_request(), blender::DRW_vbo_requested(), edit_dots, edit_dots_indices, ellipses_comp_buf, ensure_attribute(), ensure_builtin_buffers(), ensure_compute_buffers(), ensure_edit_dots_indices(), blender::GPU_PRIM_POINTS, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), radiance_comp_buf, radiance_data_buf, and shape_data_buf.
Referenced by blender::draw::DRW_gsplat_batch_cache_create_requested().
|
static |
Definition at line 561 of file draw_cache_impl_gsplat.cc.
References blender::draw::GSplatBatchCache::eval_cache, and blender::draw::GSplatBatchCache::get_ptr().
Referenced by blender::draw::detail::compute_pass_setup(), blender::draw::detail::draw_subpass_setup(), blender::draw::DRW_gsplat_batch_cache_create_requested(), blender::draw::DRW_gsplat_batch_cache_free_old(), blender::draw::DRW_gsplat_batch_cache_get_dots(), blender::draw::DRW_gsplat_batch_cache_get_edit_dots(), and blender::draw::DRW_gsplat_evaluated_attribute().
| gpu::UniformBuf * blender::draw::GSplatEvalCache::infos_buf_get | ( | ) |
Definition at line 465 of file draw_cache_impl_gsplat.cc.
References blender::GPU_uniformbuf_create_ex(), and infos_buf.
Referenced by blender::draw::detail::compute_pass_setup(), and blender::draw::detail::draw_subpass_setup().
| gpu::VertBuf ** blender::draw::GSplatEvalCache::radiance_comp_buf_get | ( | ) |
Definition at line 459 of file draw_cache_impl_gsplat.cc.
References blender::DRW_vbo_request(), and radiance_comp_buf.
Referenced by blender::draw::detail::compute_pass_setup(), and blender::draw::detail::draw_subpass_setup().
| gpu::VertBuf * blender::draw::GSplatEvalCache::radiance_data_buf_get | ( | ) |
Definition at line 447 of file draw_cache_impl_gsplat.cc.
References blender::DRW_vbo_request(), and radiance_data_buf.
Referenced by blender::draw::detail::compute_pass_setup().
| gpu::VertBuf * blender::draw::GSplatEvalCache::shape_data_buf_get | ( | ) |
Definition at line 441 of file draw_cache_impl_gsplat.cc.
References blender::DRW_vbo_request(), and shape_data_buf.
Referenced by blender::draw::detail::compute_pass_setup(), and blender::draw::detail::draw_subpass_setup().
| gpu::Batch * blender::draw::GSplatEvalCache::surface_get | ( | const PointCloud & | pointcloud | ) |
Definition at line 483 of file draw_cache_impl_gsplat.cc.
References DRW_GSPLAT_STRIP_TILE_SIZE, blender::DRW_vbo_request(), blender::GPU_batch_create_procedural(), blender::GPU_PRIM_TRI_STRIP, blender::GPU_uniformbuf_create_ex(), infos_buf, radiance_data_buf, shape_data_buf, surface, and blender::PointCloud::totpoint.
Referenced by blender::draw::detail::draw_subpass_setup().
| VectorSet<std::string> blender::draw::GSplatEvalCache::attr_used |
Attributes currently being drawn or about to be drawn.
Definition at line 102 of file draw_gsplat_private.hh.
Referenced by discard_attributes(), blender::draw::DRW_gsplat_batch_cache_free_old(), blender::draw::DRW_gsplat_evaluated_attribute(), ensure_attribute(), and ensure_requested().
| VectorSet<std::string> blender::draw::GSplatEvalCache::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 108 of file draw_gsplat_private.hh.
Referenced by blender::draw::DRW_gsplat_batch_cache_free_old().
| gpu::VertBuf* blender::draw::GSplatEvalCache::attr_viewer |
Definition at line 85 of file draw_gsplat_private.hh.
Referenced by discard_buffers().
| gpu::VertBuf* blender::draw::GSplatEvalCache::attributes_buf[GPU_MAX_ATTR] |
Definition at line 87 of file draw_gsplat_private.hh.
Referenced by attributes_get(), discard_attributes(), ensure_attribute(), and ensure_requested().
| gpu::Batch* blender::draw::GSplatEvalCache::dots |
Definition at line 63 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), dots_get(), and ensure_requested().
| gpu::Batch* blender::draw::GSplatEvalCache::edit_dots |
Definition at line 64 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), edit_dots_get(), ensure_requested(), and blender::draw::GSplatBatchCache::init().
| gpu::IndexBuf* blender::draw::GSplatEvalCache::edit_dots_indices = nullptr |
Definition at line 89 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), ensure_edit_dots_indices(), ensure_requested(), and blender::draw::GSplatBatchCache::init().
| gpu::VertBuf* blender::draw::GSplatEvalCache::ellipses_comp_buf |
Definition at line 78 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), ellipses_comp_buf_get(), ensure_compute_buffers(), and ensure_requested().
| friend blender::draw::GSplatEvalCache::GSplatBatchCache |
Definition at line 55 of file draw_gsplat_private.hh.
| friend blender::draw::GSplatEvalCache::GSplatModule |
Definition at line 54 of file draw_gsplat_private.hh.
| gpu::UniformBuf* blender::draw::GSplatEvalCache::infos_buf |
Definition at line 73 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), infos_buf_get(), and surface_get().
| int blender::draw::GSplatEvalCache::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 115 of file draw_gsplat_private.hh.
Referenced by blender::draw::DRW_gsplat_batch_cache_free_old().
| int blender::draw::GSplatEvalCache::mat_len |
Definition at line 118 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), blender::draw::GSplatBatchCache::init(), and blender::draw::GSplatBatchCache::is_valid().
| gpu::VertBuf* blender::draw::GSplatEvalCache::radiance_comp_buf |
Definition at line 80 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), ensure_compute_buffers(), ensure_requested(), and radiance_comp_buf_get().
| gpu::VertBuf* blender::draw::GSplatEvalCache::radiance_data_buf |
Definition at line 71 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), ensure_requested(), radiance_data_buf_get(), and surface_get().
| gpu::VertBuf* blender::draw::GSplatEvalCache::shape_data_buf |
Definition at line 69 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), ensure_requested(), shape_data_buf_get(), and surface_get().
| gpu::Batch* blender::draw::GSplatEvalCache::surface |
Definition at line 60 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), and surface_get().
| gpu::Batch** blender::draw::GSplatEvalCache::surface_per_mat |
Definition at line 61 of file draw_gsplat_private.hh.
Referenced by discard_buffers(), and blender::draw::GSplatBatchCache::init().