|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
donner::gpu::vulkan::VulkanResourceState - the tracked per-texture synchronization state the Vulkan backend derives its barriers from.
More...
#include <vulkan/vulkan.h>#include <cstdint>#include <map>#include <ostream>Classes | |
| struct | donner::gpu::vulkan::TextureSyncState |
| The synchronization state a texture is left in, as the backend's bookkeeping records it. More... | |
| struct | donner::gpu::vulkan::ImageBarrierParams |
| The six values an image barrier is built from, plus whether precision was available. More... | |
| class | donner::gpu::vulkan::TextureSyncStateTable |
| Tracked state for a set of textures, under the discipline the backend records against. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::gpu::vulkan::TextureUsageKind : uint8_t { Undefined , ColorAttachment , SampledRead , StorageWrite , TransferRead , TransferWrite } |
| What a texture is being used for at one point of a recorded command stream. More... | |
Functions | |
| std::ostream & | donner::gpu::vulkan::operator<< (std::ostream &os, TextureUsageKind value) |
| Ostream output operator. | |
| std::ostream & | donner::gpu::vulkan::operator<< (std::ostream &os, const TextureSyncState &value) |
| Ostream output operator. | |
| std::ostream & | donner::gpu::vulkan::operator<< (std::ostream &os, const ImageBarrierParams &value) |
| Ostream output operator. | |
| ImageBarrierParams | donner::gpu::vulkan::ConservativeImageBarrier (VkImageLayout oldLayout, VkImageLayout newLayout) |
| The maximal barrier: ALL_COMMANDS to ALL_COMMANDS with memory availability and visibility. | |
| VkImageLayout | donner::gpu::vulkan::LayoutForUsage (TextureUsageKind usage) |
| The image layout a usage requires. | |
| TextureSyncState | donner::gpu::vulkan::StateAfterUsage (TextureUsageKind usage) |
The state a texture is left in once usage has executed against it. | |
| ImageBarrierParams | donner::gpu::vulkan::TransitionFor (const TextureSyncState ¤t, TextureUsageKind usage) |
The barrier that takes a texture from current to usage. | |
donner::gpu::vulkan::VulkanResourceState - the tracked per-texture synchronization state the Vulkan backend derives its barriers from.
Each barrier names the stage and access that last touched the image and its next use. Render passes keep attachment layouts fixed; the barriers around them carry synchronization.
This is pure state machinery over Vulkan enums: it opens no device, calls no entry point, and records nothing. That keeps it testable on every platform the project builds on, rather than only where a Vulkan loader exists.
The tracked patterns are the ones the recorded command streams actually produce. Anything outside them resolves to ConservativeImageBarrier, which is the maximal ALL_COMMANDS/memory barrier this backend used everywhere before: unknown usage costs precision, never correctness.
|
strong |
What a texture is being used for at one point of a recorded command stream.
Write-only storage textures are the only writable binding the runtime declares, so a storage usage is unambiguously a write and needs no read/write fallback. If a writable storage BUFFER binding kind ever enters the runtime, this enum and the table below must gain the host-visibility edge that goes with it, because every buffer this backend allocates is host-mapped and a kernel write to one would otherwise be invisible to the mapping.
|
nodiscard |
The maximal barrier: ALL_COMMANDS to ALL_COMMANDS with memory availability and visibility.
The fallback for any usage pair the table does not name. VK_ACCESS_MEMORY_* is valid with any pipeline stage, so this is always legal, and it orders strictly more than any precise barrier would - which is why an unrecognised pattern degrades to it rather than to nothing.
| oldLayout | Layout the image is in. |
| newLayout | Layout the image moves to. |
|
nodiscard |
The image layout a usage requires.
| usage | Usage the texture is put to. |
| std::ostream & donner::gpu::vulkan::operator<< | ( | std::ostream & | os, |
| const ImageBarrierParams & | value ) |
Ostream output operator.
| os | Output stream. |
| value | Value to output. |
| std::ostream & donner::gpu::vulkan::operator<< | ( | std::ostream & | os, |
| const TextureSyncState & | value ) |
Ostream output operator.
| os | Output stream. |
| value | Value to output. |
| std::ostream & donner::gpu::vulkan::operator<< | ( | std::ostream & | os, |
| TextureUsageKind | value ) |
Ostream output operator.
| os | Output stream. |
| value | Value to output. |
|
nodiscard |
The state a texture is left in once usage has executed against it.
| usage | Usage the texture is put to. |
|
nodiscard |
The barrier that takes a texture from current to usage.
The source scope comes from what last touched the image and the destination scope from what is about to, so the tracked patterns - attachment write to sampled read, storage write to sampled read, transfer write to shader read, and their transfer counterparts - name the stages and accesses actually involved instead of every stage and every access.
| current | State the texture is tracked in. |
| usage | Usage the texture is about to be put to. |