A device benchmark based on Vulkans DeviceQuery Api. Timestamps are recorded in milliseconds. Timestamp names must be set in advance.
More...
#include <foray_devicebenchmark.hpp>
A device benchmark based on Vulkans DeviceQuery Api. Timestamps are recorded in milliseconds. Timestamp names must be set in advance.
◆ ~DeviceBenchmark()
virtual foray::bench::DeviceBenchmark::~DeviceBenchmark |
( |
| ) |
|
|
inlinevirtual |
◆ CmdResetQuery()
void foray::bench::DeviceBenchmark::CmdResetQuery |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
uint64_t |
frameIndex |
|
) |
| |
Resets the queries stored in current set indexes query pool.
- Parameters
-
cmdBuffer | Command Buffer |
frameIndex | Frame index for determining the query pool to access (frameIndex % uniqueSets) |
◆ CmdWriteTimestamp()
void foray::bench::DeviceBenchmark::CmdWriteTimestamp |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
uint64_t |
frameIndex, |
|
|
const char * |
name, |
|
|
VkPipelineStageFlagBits |
stageFlagBit |
|
) |
| |
Writes a timestamp to the current set indexes query pool.
- Parameters
-
cmdBuffer | Command Buffer |
frameIndex | Frame index for determining the query pool to access (frameIndex % uniqueSets) |
name | Id name. Pointer must have been passed in the create method before! |
stageFlagBit | Timestamp is written immediately before the pipelinestage defined here is invoked |
◆ ConvertQueryResultToMillis()
fp64_t foray::bench::DeviceBenchmark::ConvertQueryResultToMillis |
( |
uint64_t |
result | ) |
|
|
protected |
◆ Create()
Prepares object for operation.
- Parameters
-
context | Requires DispatchTable, PhysicalDevice |
queryNames | Must define all query names used (As they're mapped to integer Ids) |
uniqueSets | count of unique sets |
◆ Destroy()
virtual void foray::bench::DeviceBenchmark::Destroy |
( |
| ) |
|
|
virtual |
◆ Exists()
virtual bool foray::bench::DeviceBenchmark::Exists |
( |
| ) |
const |
|
inlinevirtual |
Return true, if the managed resource is allocated.
Example: Vulkan object stored could be nullptr or instantiated
Implements foray::core::ManagedResource.
◆ LogQueryResults()
bool foray::bench::DeviceBenchmark::LogQueryResults |
( |
uint64_t |
frameIndex | ) |
|
Instructs the benchmark object to retrieve the query results for a frame.
- Parameters
-
frameIndex | Frame index for determining the query pool to access (frameIndex % uniqueSets) |
- Returns
- True, if log operation succeeds
◆ mContext
◆ mQueryIds
std::unordered_map<const char*, uint32_t> foray::bench::DeviceBenchmark::mQueryIds |
|
protected |
◆ mQueryNames
std::vector<const char*> foray::bench::DeviceBenchmark::mQueryNames |
|
protected |
◆ mQueryPools
std::vector<VkQueryPool> foray::bench::DeviceBenchmark::mQueryPools |
|
protected |
◆ mTimestampPeriod
fp64_t foray::bench::DeviceBenchmark::mTimestampPeriod = 0.f |
|
protected |
The documentation for this class was generated from the following file: