21 #ifndef DMABUF_SWAPCHAIN_HPP 22 #define DMABUF_SWAPCHAIN_HPP 24 #include "libvulkan-stub.h" 25 #include <condition_variable> 31 #include "framework/common.hpp" 48 Result
init(
const char *pBasePath,
unsigned swapchainImagesCount);
57 return swapchainImagesCount;
72 void present(
unsigned index, VkDevice device, VkDeviceMemory memory,
unsigned width,
unsigned height,
73 unsigned numFences, VkFence *fences,
bool coherent);
83 unsigned swapchainImagesCount;
89 VkDeviceMemory memory;
98 std::queue<unsigned> vacant;
99 std::queue<Command> ready;
101 std::condition_variable cond;
107 unsigned displayed = 0;
111 void dump(
const Command &cmd,
unsigned sequenceCount);
Result init(const char *pBasePath, unsigned swapchainImagesCount)
Initialize the swapchain.
~PNGSwapchain()
Destructor.
unsigned getNumImages() const
Gets number of images in the swapchain.
This class implements a swapchain outside the Vulkan API. Its main purpose is debugging without a scr...
void present(unsigned index, VkDevice device, VkDeviceMemory memory, unsigned width, unsigned height, unsigned numFences, VkFence *fences, bool coherent)
Dump image for a swapchain index to disk.
unsigned acquire()
Acquire a new swapchain index. When acquire returns the image is ready to be presented into...