Closed IAmNotHanni closed 1 year ago
main
I made the pull request much smaller again, only focussing on the core refactoring. Otherwise it would have been just too much small stuff to review. I want to make a cleanup pull request after this, which can deal with the small issues step by step.
Thank you for your great review @yeetari ! I'm waiting for further comments :smile:
output
Thank you guys for this amazing collaboration once again!
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:Use wrapper methods instead of raw Vulkan functions everywhere in the code baseDevice
wrapper andCommandBuffer
wrapper alphabetically in.hpp
and.cpp
Device
wrapper andCommandBuffer
wrapperAdd new wrapper methods and refactor existing ones
Device wrapper
CommandBufferHandle wrapper
begin_command_buffer
begin_render_pass
bind_descriptor_sets
bind_descriptor_set
bind_pipeline
bind_index_buffer
bind_vertex_buffers
change_image_layout
copy_buffer
copy_buffer_to_image
draw
draw_indexed
end_command_buffer
end_render_pass
pipeline_barrier
push_constants
push_constant
submit_and_wait
Bugs
Device
wrapperm_transfer_queue
not to be initialized, even if the graphics queue is used as transfer queue.Outlook