mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-03 02:34:48 +12:00
Implement simple swapchain image clearing
Creates a swapchain, and per-swapchain image data for safe parallelism and synchronization.
This commit is contained in:
parent
90a4c9cf8d
commit
af4163de19
2 changed files with 110 additions and 33 deletions
include/renderer_vk
|
@ -23,16 +23,24 @@ class RendererVK final : public Renderer {
|
|||
|
||||
vk::UniqueDevice device = {};
|
||||
|
||||
vk::UniqueSemaphore presetWaitSemaphore = {};
|
||||
vk::UniqueSemaphore renderDoneSemaphore = {};
|
||||
|
||||
vk::UniqueSwapchainKHR swapchain = {};
|
||||
u32 swapchainImageCount = ~0u;
|
||||
std::vector<vk::Image> swapchainImages = {};
|
||||
std::vector<vk::UniqueImageView> swapchainImageViews = {};
|
||||
|
||||
vk::UniqueCommandPool commandPool = {};
|
||||
vk::UniqueCommandBuffer presentCommandBuffer = {};
|
||||
|
||||
// Global synchronization primitives
|
||||
|
||||
vk::UniqueCommandPool commandPool = {};
|
||||
|
||||
// Per-swapchain-image data
|
||||
// Each vector is `swapchainImageCount` in size
|
||||
std::vector<vk::UniqueCommandBuffer> presentCommandBuffers = {};
|
||||
std::vector<vk::UniqueSemaphore> swapImageFreeSemaphore = {};
|
||||
std::vector<vk::UniqueSemaphore> renderFinishedSemaphore = {};
|
||||
std::vector<vk::UniqueFence> frameFinishedFences = {};
|
||||
|
||||
u64 currentFrame = 0;
|
||||
public:
|
||||
RendererVK(GPU& gpu, const std::array<u32, regNum>& internalRegs);
|
||||
~RendererVK() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue