[x] Remove StagingBuffer wrapper, because it is just a normal GPUMemoryBuffer, and the staging buffers for copy operations should be handled by the device wrapper internally only (note that we are not recycling staging buffers though: when they are no longer needed, the destructor of GPUMemoryBuffer is called. We should trust VMA to do the heavy work when it comes to recycling the memory for staging buffers. This is likely the best solution for now)
[x] Remove OnceCommandBuffer wrapper, because we have the new command buffer request code using static thread_local command pools and command buffers.
Summary
Closes https://github.com/inexorgame/vulkan-renderer/issues/465 Closes https://github.com/inexorgame/vulkan-renderer/issues/459
Removed features (part of refactoring)
StagingBuffer
wrapper, because it is just a normalGPUMemoryBuffer
, and the staging buffers for copy operations should be handled by the device wrapper internally only (note that we are not recycling staging buffers though: when they are no longer needed, the destructor ofGPUMemoryBuffer
is called. We should trust VMA to do the heavy work when it comes to recycling the memory for staging buffers. This is likely the best solution for now)OnceCommandBuffer
wrapper, because we have the new command buffer request code usingstatic thread_local
command pools and command buffers.New features
static thread_local
command pools and command buffers in device wrapper (Keep usingCommandPool
andCommandBuffer
RAII wrapper)execute
lambda which abstracts beginning, ending and submitting command buffers, example:Device
wrapper andCommandBuffer
wrapper alphabetically in.hpp
and.cpp
Device
wrapper andCommandBuffer
wrapperAdd new wrapper methods and refactor existing ones
Device wrapper
acquire_next_image
allocate_command_buffers
allocate_command_buffer
allocate_descriptor_sets
allocate_descriptor_set
bind_debug_region
create_allocator
create_buffer
create_command_pool
create_descriptor_pool
create_descriptor_set_layout
create_device
create_fence
create_framebuffer
create_graphics_pipeline
create_image
create_image_view
create_pipeline_layout
create_render_pass
create_sampler
create_semaphore
create_shader_module
create_swapchain
destroy_allocator
destroy_buffer
destroy_command_pool
destroy_descriptor_pool
destroy_descriptor_set_layout
destroy_device
destroy_fence
destroy_framebuffer
destroy_image
destroy_image_view
destroy_pipeline
destroy_pipeline_layout
destroy_renderpass
destroy_sampler
destroy_semaphore
destroy_shader_module
destroy_swapchain
end_debug_region
get_device_queue
get_swapchain_images
insert_debug_marker
is_extension_supported
is_presentation_supported
is_swapchain_supported
load_vulkan_function
andvk_function_name
present
request_command_buffer
reset_command_pool
reset_fences
reset_fence
set_debug_marker_name
submit_command_buffers
submit_command_buffer
update_descriptor_set
update_descriptor_sets
wait_for_fences
wait_for_fence
wait_idle
Bugs
Device
wrapperm_transfer_queue
not to be initialized, even if the graphics queue is used as transfer queue.Outlook