class ImagePipeSurface
Defined at line 43 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
An abstract surface that must implement CreateImage, RemoveImage, and
PresentImage.
Public Methods
void ImagePipeSurface ()
Defined at line 51 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
void ~ImagePipeSurface ()
Defined at line 53 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
VkFlags SupportedUsage ()
Defined at line 55 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
VkCompositeAlphaFlagsKHR SupportedAlphaFlags ()
Defined at line 61 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
bool Init ()
Defined at line 65 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
bool CanPresentPendingImage ()
Defined at line 66 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
bool CreateImage (VkDevice device, VkLayerDispatchTable * pDisp, VkFormat format, VkImageUsageFlags usage, VkSwapchainCreateFlagsKHR swapchain_flags, VkExtent2D extent, uint32_t image_count, VkCompositeAlphaFlagBitsKHR alpha_flags, const VkAllocationCallbacks * pAllocator, std::vector<ImageInfo> * image_info_out)
Adds an image resource to image pipe.
bool GetSize (uint32_t * width_out, uint32_t * height_out)
Defined at line 68 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
bool IsLost ()
Defined at line 70 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
void RemoveImage (uint32_t image_id)
Removes an image resource from the pipe.
void PresentImage (bool immediate, uint32_t image_id, std::vector<std::unique_ptr<PlatformEvent>> acquire_fences, std::vector<std::unique_ptr<PlatformEvent>> release_fences, VkQueue queue)
Enqueues the specified image for presentation.
SupportedImageProperties & GetSupportedImageProperties ()
bool SupportsImmediatePresentMode ()
Vulkan defines immediate as presentation that doesn't wait for the vblank period to update
the current image; so, switching buffers can result in tearing.
Importantly, with immediate update, the previous image should also become immediately
available for reuse, making this mode useful for measuring maximum render rate.
Flatland and display drivers don't support unsynchronized updates, so we approximate
it by ignoring fences. This allows the client to reuse an image before its release
semaphores are signaled, so the client doesn't wait to acquire a swapchain buffer.
We also send a fake acquire fence to remove any associated delays.
The difference is in the amount of tearing:
- spec: less tearing, just the transition from one complete image to another
- implementation: more tearing, the visible image may be incomplete
Defined at line 86 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
bool OnCreateSurface (VkInstance instance, VkLayerInstanceDispatchTable * dispatch_table, const VkImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, const VkAllocationCallbacks * pAllocator)
Defined at line 104 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
void OnDestroySurface (VkInstance instance, VkLayerInstanceDispatchTable * dispatch_table, const VkAllocationCallbacks * pAllocator)
Defined at line 117 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
bool OnCreateSwapchain (VkDevice device, LayerData * device_layer_data, const VkSwapchainCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator)
Defined at line 120 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
void OnDestroySwapchain (VkDevice device, const VkAllocationCallbacks * pAllocator)
Defined at line 126 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
VkResult GetPresentModes (VkPhysicalDevice physicalDevice, VkLayerInstanceDispatchTable * dispatch_table, uint32_t * pCount, VkPresentModeKHR * pPresentModes)
Defined at line 130 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h
Protected Methods
uint32_t next_image_id ()
Defined at line 156 of file ../../src/lib/vulkan/swapchain/image_pipe_surface.h