|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Manages Vulkan resources (buffers, images, samplers) for the graphics backend. More...
#include <BackendResoureManager.hpp>
Collaboration diagram for MayaFlux::Core::BackendResourceManager:Public Member Functions | |
| BackendResourceManager (VKContext &context, VKCommandManager &command_manager) | |
| ~BackendResourceManager ()=default | |
| void | setup_backend_service (const std::shared_ptr< Registry::Service::BufferService > &buffer_service) |
| void | initialize_buffer (const std::shared_ptr< Buffers::VKBuffer > &buffer) |
| Initialize a buffer for use with the graphics backend. | |
| void | cleanup_buffer (const std::shared_ptr< Buffers::VKBuffer > &buffer) |
| Cleanup a buffer and release associated resources. | |
| void | flush_pending_buffer_operations () |
| Flush any pending buffer operations (e.g., uploads/downloads) | |
| void | initialize_image (const std::shared_ptr< VKImage > &image) |
| Initialize a VKImage (allocate VkImage, memory, and create image view) | |
| void | cleanup_image (const std::shared_ptr< VKImage > &image) |
| Cleanup a VKImage (destroy view, image, and free memory) | |
| void | transition_image_layout (vk::Image image, vk::ImageLayout old_layout, vk::ImageLayout new_layout, uint32_t mip_levels=1, uint32_t array_layers=1, vk::ImageAspectFlags aspect_flags=vk::ImageAspectFlagBits::eColor) |
| Transition image layout using a pipeline barrier. | |
| void | upload_image_data (std::shared_ptr< VKImage > image, const void *data, size_t size) |
| Upload data to an image (creates staging buffer internally) | |
| void | download_image_data (std::shared_ptr< VKImage > image, void *data, size_t size) |
| Download data from an image (creates staging buffer internally) | |
| vk::Sampler | create_sampler (vk::Filter filter=vk::Filter::eLinear, vk::SamplerAddressMode address_mode=vk::SamplerAddressMode::eRepeat, float max_anisotropy=0.0F) |
| Create sampler. | |
| void | destroy_sampler (vk::Sampler sampler) |
| Destroy sampler. | |
| uint32_t | find_memory_type (uint32_t type_filter, vk::MemoryPropertyFlags properties) const |
| Find a suitable memory type for Vulkan buffer allocation. | |
| void | execute_immediate_commands (const std::function< void(vk::CommandBuffer)> &recorder) |
| Execute immediate command recording for buffer operations. | |
| void | record_deferred_commands (const std::function< void(vk::CommandBuffer)> &recorder) |
| Record deferred command recording for buffer operations. | |
| void | cleanup () |
Private Member Functions | |
| size_t | compute_sampler_hash (vk::Filter filter, vk::SamplerAddressMode address_mode, float max_anisotropy) const |
Private Attributes | |
| VKContext & | m_context |
| VKCommandManager & | m_command_manager |
| std::vector< std::shared_ptr< Buffers::VKBuffer > > | m_managed_buffers |
| std::unordered_map< size_t, vk::Sampler > | m_sampler_cache |
Manages Vulkan resources (buffers, images, samplers) for the graphics backend.
Definition at line 23 of file BackendResoureManager.hpp.