MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ ComputeMeshBuffer()

MayaFlux::Buffers::ComputeMeshBuffer::ComputeMeshBuffer ( Config  config)
explicit

Definition at line 17 of file ComputeMeshBuffer.cpp.

19 : VKBuffer(
21 config.resolution_x, config.resolution_y, config.resolution_z),
22 Usage::VERTEX,
24 , m_res_x(std::max(config.resolution_x, 1U))
25 , m_res_y(std::max(config.resolution_y, 1U))
26 , m_res_z(std::max(config.resolution_z, 1U))
27 , m_bounds_min(config.bounds_min)
28 , m_bounds_max(config.bounds_max)
29 , m_iso_level(config.iso_level)
30{
31 std::visit([this](auto&& source) {
32 using Source = std::remove_cvref_t<decltype(source)>;
33 if constexpr (std::is_same_v<Source, Kinesis::SpatialField>) {
34 m_field = std::move(source);
35 } else if constexpr (std::is_same_v<Source, std::filesystem::path>) {
36 m_gpu_field = true;
37 m_field_shader = std::move(source).string();
38 } else {
39 m_gpu_field = true;
40 m_field_expression = std::move(source.source);
41 }
42 },
43 std::move(config.source));
44
46 "ComputeMeshBuffer{}: {}x{}x{} grid, {:.1f} MB worst-case",
47 m_gpu_field ? " (GPU field)" : "",
49 static_cast<float>(get_size_bytes()) / (1024.F * 1024.F));
50}
#define MF_INFO(comp, ctx,...)
static size_t worst_case_bytes(uint32_t res_x, uint32_t res_y, uint32_t res_z) noexcept
std::optional< Kinesis::FieldSource > m_field_expression
vk::DeviceSize get_size_bytes() const
Definition VKBuffer.hpp:280
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.
Source source()
Begin a Source chain.
Definition Plot.hpp:127

References MayaFlux::Journal::Buffers, MayaFlux::Buffers::VKBuffer::get_size_bytes(), MayaFlux::Journal::Init, m_field, m_field_expression, m_field_shader, m_gpu_field, m_res_x, m_res_y, m_res_z, max, MF_INFO, and MayaFlux::Buffers::ComputeMeshBuffer::Config::source.

+ Here is the call graph for this function: