|
|
| AsyncComputeTask (const AsyncComputeTask &)=delete |
|
auto | operator= (const AsyncComputeTask &) -> AsyncComputeTask &=delete |
|
| AsyncComputeTask (AsyncComputeTask &&)=delete |
|
auto | operator= (AsyncComputeTask &&) -> AsyncComputeTask &=delete |
| auto | acquireForFrame (vk::CommandBuffer cmd, uint32_t frame_index, sync::Usage next) -> FrameView |
|
auto | read (BufferId id, std::span< std::byte > out) -> bool |
| | Newest finished CPU copy of a ring buffer added with cpu_readback and false until one exists.
|
|
template<typename T> |
| auto | read (BufferId id, std::span< T > out) -> bool |
|
auto | finishedStep () const -> uint64_t |
| | Steps finished so far.
|
|
auto | isReady () const -> bool |
|
|
| AsyncComputeTask (Config config) |
| auto | addRingBuffer (vk::DeviceSize size, bool cpu_readback=false) -> BufferId |
| | Constructor only.
|
|
auto | addPersistentBuffer (vk::DeviceSize size) -> BufferId |
|
auto | addHostBuffer (vk::DeviceSize size) -> BufferId |
|
void | bind (uint32_t binding, BufferId id, Copy copy=Copy::current) |
|
void | bindExternal (uint32_t set, uint32_t binding, std::function< vk::Buffer()> source) |
|
void | setAcquireUsage (BufferId id, sync::Usage usage) |
|
void | upload (BufferId id, std::span< const std::byte > data) |
| | Owner thread, blocks until the copy landed gpu side.
|
|
template<typename T> |
| void | upload (BufferId id, std::span< const T > data) |
|
auto | step (const std::function< void(StepContext &)> &record, std::string_view debug_name={}, std::shared_ptr< const void > keep_alive={}) -> uint64_t |
| | Owner thread.
|
Base for a compute simulation that runs on the async compute queue and feeds the renderer
A derived class declares its buffers and bindings in its constructor and then calls step() from its own thread
Ring buffers are written once per step and read by the renderer and the CPU Persistent buffers are state only the task touches, like velocities