Rendu
A lightweight rendering engine for experimentations
|
Manages GPU queries allocation in a set of pools. Pools need to be buffered per frame so that we can retrieve the previous frame queries while the current queries are running. More...
#include <QueryAllocator.hpp>
Public Member Functions | |
void | init (GPUQuery::Type type, uint count) |
uint | allocate () |
void | resetWritePool () |
VkQueryPool & | getWritePool () |
VkQueryPool & | getReadPool () |
void | clean () |
Manages GPU queries allocation in a set of pools. Pools need to be buffered per frame so that we can retrieve the previous frame queries while the current queries are running.
uint QueryAllocator::allocate | ( | ) |
Allocate a query and returns its offset in the pool.
void QueryAllocator::clean | ( | ) |
Clean the query pools.
VkQueryPool & QueryAllocator::getReadPool | ( | ) |
VkQueryPool & QueryAllocator::getWritePool | ( | ) |
void QueryAllocator::init | ( | GPUQuery::Type | type, |
uint | count | ||
) |
Setup the allocator for a given query type.
type | the type of queries to store |
count | the total number of queries to allocate |
void QueryAllocator::resetWritePool | ( | ) |
Reset the pool that will be used at the current frame for new queries.