![]() |
Vulkan SDK for Android 1.1.1
Mali Developer Center
|
This class implements a swapchain outside the Vulkan API. Its main purpose is debugging without a screen since the swapchain will dump output directly to PNG files instead of displaying on-screen. More...
#include <png_swapchain.hpp>
Public Member Functions | |
Result | init (const char *pBasePath, unsigned swapchainImagesCount) |
Initialize the swapchain. More... | |
~PNGSwapchain () | |
Destructor. | |
unsigned | getNumImages () const |
Gets number of images in the swapchain. More... | |
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. More... | |
unsigned | acquire () |
Acquire a new swapchain index. When acquire returns the image is ready to be presented into, so no semaphores are required. | |
This class implements a swapchain outside the Vulkan API. Its main purpose is debugging without a screen since the swapchain will dump output directly to PNG files instead of displaying on-screen.
Definition at line 40 of file png_swapchain.hpp.
|
inline |
Gets number of images in the swapchain.
Definition at line 55 of file png_swapchain.hpp.
Result PNGSwapchain::init | ( | const char * | pBasePath, |
unsigned | swapchainImagesCount | ||
) |
Initialize the swapchain.
pBasePath | The base path that will be used for all PNG images. |
swapchainImagesCount | The number of swapchain images to create in the internal queue. |
Definition at line 32 of file png_swapchain.cpp.
void PNGSwapchain::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.
index | Index to present. | |
device | Vulkan device. | |
memory | The VkDeviceMemory associated with the swapchain image. The memory must be tightly packed in VK_FORMAT_R8G8B8A8_UNORM format. | |
width | The width of the swapchain image. | |
height | The height of the swapchain image. | |
numFences | The number of VkFences to wait on before dumping the texture. | |
[in] | fences | Fences to wait for. |
coherent | If the swapchain memory is coherent, i.e. does not need to invalidate caches. |
Definition at line 61 of file png_swapchain.cpp.