|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Tracked state for a set of textures, under the discipline the backend records against. More...
#include "donner/gpu/vulkan/VulkanResourceState.h"
Public Member Functions | |
| TextureSyncState | stateOf (uint32_t textureSlot) const |
The state textureSlot will be in at this point of an encode: the staged state when one was recorded, otherwise the committed one. A slot never seen reads as untouched. | |
| void | stage (uint32_t textureSlot, const TextureSyncState &state) |
Records that a transition to state was encoded, pending submission. | |
| void | commitStaged () |
| Promotes every staged transition to committed. Call only once the submission succeeded. | |
| void | discardStaged () |
| Drops every staged transition, leaving committed state untouched. | |
| void | forget (uint32_t textureSlot) |
| Forgets a slot entirely, for a texture that no longer exists. | |
| bool | hasStagedChanges () const |
| Whether any transition is staged and not yet committed. | |
Tracked state for a set of textures, under the discipline the backend records against.
A transition recorded into a command buffer updates the staged view; only a submission that actually reached the queue commits it. An encode that fails partway, or a submit the driver rejects, discards the staging instead - so the table never claims a transition the GPU never ran, which would make every later barrier compute the wrong source scope from a state that does not exist.
| void donner::gpu::vulkan::TextureSyncStateTable::forget | ( | uint32_t | textureSlot | ) |
Forgets a slot entirely, for a texture that no longer exists.
| textureSlot | Texture slot to drop. |
| void donner::gpu::vulkan::TextureSyncStateTable::stage | ( | uint32_t | textureSlot, |
| const TextureSyncState & | state ) |
Records that a transition to state was encoded, pending submission.
| textureSlot | Texture slot the transition applies to. |
| state | Resulting state. |
|
nodiscard |
The state textureSlot will be in at this point of an encode: the staged state when one was recorded, otherwise the committed one. A slot never seen reads as untouched.
| textureSlot | Texture slot to query. |