Immutable scene version and versions from small carves share buffers patched in place.
More...
#include <voxel_gpu_storage.hpp>
|
| enum class | Section : uint8_t {
materials
, occupancy
, grids
, coarse
,
palettes
, records
} |
| | In voxel_dda.slang binding order.
|
| enum class | UploadState : std::uint8_t { uploading
, ready
, failed_load
, failed_gpu
} |
|
|
| VoxelGpuStorage (std::vector< uint64_t > node_rids, std::vector< glm::uvec3 > brick_dims) |
| | New section buffers that a VoxelSceneUpload fills.
|
|
| VoxelGpuStorage (std::vector< uint64_t > node_rids, std::vector< glm::uvec3 > brick_dims, const VoxelGpuStorage &previous, uint64_t patch_sequence) |
| | Ready at once over the buffers of previous and needs every patch up to patch_sequence applied.
|
|
auto | generation () const noexcept -> uint64_t |
| | Unique per storage so a cache keyed on it notices every upload.
|
|
auto | recordIndexOf (uint64_t node_rid) const -> std::optional< uint32_t > |
|
auto | recordBrickDims (uint32_t index) const -> glm::uvec3 |
|
auto | recordCount () const noexcept -> uint32_t |
|
auto | buffer (Section section) const -> vk::Buffer |
|
auto | size (Section section) const -> vk::DeviceSize |
|
auto | queuePatch (const VulkanCore &core, const voxel::gpu::ScenePatch &patch) const -> std::optional< uint64_t > |
| | Tick thread on a ready storage and nullopt when the pool outgrew the buffers or staging failed.
|
|
void | recordPendingPatches (vk::CommandBuffer cmd, std::vector< std::shared_ptr< void > > &retired) const |
| | Render thread before anything reads the sections and retired must outlive the frame.
|
|
auto | nodeRid (uint32_t index) const -> uint64_t |
| void | setDebugInfo (VoxelStorageDebugInfo info) |
|
auto | debugInfo () const -> const VoxelStorageDebugInfo & |
| void | setChangeHistory (VoxelChangeHistory history) |
|
auto | changeHistory () const -> const VoxelChangeHistory & |
|
void | markUploading () |
|
void | markReady () |
|
void | markFailed (UploadState reason) |
|
auto | isReady () const -> bool |
|
auto | hasFailed () const -> bool |
|
auto | state () const -> UploadState |
|
|
static constexpr size_t | k_section_count = 6 |
Immutable scene version and versions from small carves share buffers patched in place.
◆ setChangeHistory()
- Note
- Main thread only and before the upload is queued
◆ setDebugInfo()
- Note
- Main thread only and before the upload is queued
The documentation for this class was generated from the following files: