11 : m_topology(topology)
44 auto vk = std::dynamic_pointer_cast<VKBuffer>(buffer);
46 error<std::invalid_argument>(
49 std::source_location::current(),
50 "FormaProcessor requires a VKBuffer");
89 auto vk = std::dynamic_pointer_cast<VKBuffer>(buffer);
91 if (
auto rp = vk->get_render_processor()) {
110 auto vk = std::dynamic_pointer_cast<VKBuffer>(buffer);
114 const size_t required =
m_active.size();
115 const size_t available = vk->get_size_bytes();
117 if (required > available) {
118 vk->resize(
static_cast<size_t>(required * 1.5F),
false);
124 std::min<size_t>(required, vk->get_size_bytes()),
128 auto layout = vk->get_vertex_layout();
130 auto updated = *layout;
132 vk->set_vertex_layout(updated);
140 return static_cast<uint32_t
>(byte_count / m_stride);
ProcessingToken m_processing_token
@ GRAPHICS_BACKEND
Standard graphics processing backend configuration.
std::shared_ptr< VKBuffer > create_staging_buffer(size_t size)
Create staging buffer for transfers.
void upload_to_gpu(const void *data, size_t size, const std::shared_ptr< VKBuffer > &target, const std::shared_ptr< VKBuffer > &staging)
Upload raw data to GPU buffer (auto-detects host-visible vs device-local)
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
PrimitiveTopology
Vertex assembly primitive topology.
std::shared_ptr< Core::VKImage > image
uint32_t stride_bytes
Total bytes per vertex (stride in Vulkan terms) e.g., 3 floats (position) + 3 floats (normal) = 24 by...
static VertexLayout for_lines(uint32_t stride=60)
Factory: layout for LineVertex (position, color, thickness, uv, normal, tangent)
static VertexLayout for_meshes(uint32_t stride=60)
Factory: layout for MeshVertex (position, color, weight, uv, normal, tangent)
static VertexLayout for_points(uint32_t stride=60)
Factory: layout for PointVertex (position, color, size, uv, normal, tangent)