Library internal: copies into mapped GPU memory on a thread of its own, so the main thread goes on recording commands.
More...
#include <gui_core/graphics/vulkan/vk_upload_worker.h>
|
| | UploadWorker () |
| | ~UploadWorker () |
| | UploadWorker (const UploadWorker &)=delete |
| UploadWorker & | operator= (const UploadWorker &)=delete |
| void | Copy (void *destination, const void *source, size_t size) |
| | Copies size bytes from source to destination; a null source zeroes them.
|
| void | Copy (void *destination, std::vector< std::byte > &&source) |
| | As Copy, from bytes the worker keeps until it has copied them.
|
| void | Then (std::function< void()> job) |
| | Runs job on the worker after every copy queued before it (flushing what they wrote), or now when nothing is queued.
|
| void | Wait () |
| | Returns once every copy and job queued so far is done.
|
| bool | Busy () const |
| | Whether anything queued isn't done yet.
|
|
| static constexpr size_t | kInlineBytes = 32 * 1024 |
| | Copies this small run on the calling thread: handing them over costs more.
|
Library internal: copies into mapped GPU memory on a thread of its own, so the main thread goes on recording commands.
The copies only have to be done before the submit that reads them: call Wait before it.
◆ UploadWorker() [1/2]
| tachyon::vulkan::UploadWorker::UploadWorker |
( |
| ) |
|
◆ ~UploadWorker()
| tachyon::vulkan::UploadWorker::~UploadWorker |
( |
| ) |
|
◆ UploadWorker() [2/2]
| tachyon::vulkan::UploadWorker::UploadWorker |
( |
const UploadWorker & | | ) |
|
|
delete |
◆ operator=()
◆ Copy() [1/2]
| void tachyon::vulkan::UploadWorker::Copy |
( |
void * | destination, |
|
|
const void * | source, |
|
|
size_t | size ) |
Copies size bytes from source to destination; a null source zeroes them.
The source stays the caller's and must stay valid until Wait returns.
◆ Copy() [2/2]
| void tachyon::vulkan::UploadWorker::Copy |
( |
void * | destination, |
|
|
std::vector< std::byte > && | source ) |
As Copy, from bytes the worker keeps until it has copied them.
◆ Then()
| void tachyon::vulkan::UploadWorker::Then |
( |
std::function< void()> | job | ) |
|
Runs job on the worker after every copy queued before it (flushing what they wrote), or now when nothing is queued.
◆ Wait()
| void tachyon::vulkan::UploadWorker::Wait |
( |
| ) |
|
Returns once every copy and job queued so far is done.
◆ Busy()
| bool tachyon::vulkan::UploadWorker::Busy |
( |
| ) |
const |
Whether anything queued isn't done yet.
◆ kInlineBytes
| size_t tachyon::vulkan::UploadWorker::kInlineBytes = 32 * 1024 |
|
staticconstexpr |
Copies this small run on the calling thread: handing them over costs more.
The documentation for this class was generated from the following file: