donner::gpu::vulkan::VulkanSwapchain - a Vulkan surface, its swapchain, and the synchronization one frame of presentation needs.
More...
#include <vulkan/vulkan.h>
#include <atomic>
#include <cstdint>
#include <functional>
#include <memory>
#include <mutex>
#include <optional>
#include <utility>
#include <vector>
#include "donner/gpu/Descriptors.h"
#include "donner/gpu/DeviceLost.h"
#include "donner/gpu/GpuResult.h"
#include "donner/gpu/vulkan/VulkanLoader.h"
#include "donner/gpu/vulkan/VulkanQueueProgress.h"
#include "donner/gpu/vulkan/VulkanResourceState.h"
donner::gpu::vulkan::VulkanSwapchain - a Vulkan surface, its swapchain, and the synchronization one frame of presentation needs.
◆ AcquiredFrameSyncState()
| TextureSyncState donner::gpu::vulkan::AcquiredFrameSyncState |
( |
| ) |
|
|
inline |
The synchronization state a frame is in the moment it is acquired.
Its contents are undefined, and the last thing to have touched it is the presentation engine's read, which the acquisition semaphore orders against kAcquireWaitStage. Recording that stage rather than the top of the pipe is what places the frame's first layout transition after the wait; a transition from the top of the pipe is a write the wait does not cover, which synchronization validation reports as a write-after-read hazard against the presentation engine.
◆ RuntimeSurfaceFormatsForTest()
| std::vector< TextureFormat > donner::gpu::vulkan::RuntimeSurfaceFormatsForTest |
( |
const std::vector< VkSurfaceFormatKHR > & | nativeFormats | ) |
|
Converts native surface formats into the formats the runtime can present. Exposed for deterministic capability tests whose driver cannot advertise the wildcard.
- Parameters
-
| nativeFormats | Formats reported by the presentation engine. |
◆ kAcquireWaitStage
| VkPipelineStageFlags donner::gpu::vulkan::kAcquireWaitStage |
|
inlineconstexpr |
Initial value:=
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
The stage an acquisition wait applies to, and therefore the earliest stage at which a frame may be written.
Shared by the wait itself and by the synchronization state a freshly acquired frame starts in, so the two cannot drift: a frame whose first barrier claimed an earlier source stage would be writing the image outside what the wait covers.