vulkan/overlay: add a frame counter option
This is useful to normalize the numbers written into the output file as those number are accumulated over a period of time and number of frames. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
@@ -678,7 +678,8 @@ static void compute_swapchain_display(struct swapchain_data *data)
|
||||
|
||||
for (uint32_t s = 0; s < OVERLAY_PARAM_ENABLED_MAX; s++) {
|
||||
if (!instance_data->params.enabled[s] ||
|
||||
s == OVERLAY_PARAM_ENABLED_fps)
|
||||
s == OVERLAY_PARAM_ENABLED_fps ||
|
||||
s == OVERLAY_PARAM_ENABLED_frame)
|
||||
continue;
|
||||
|
||||
char hash[40];
|
||||
@@ -1561,6 +1562,8 @@ VKAPI_ATTR VkResult VKAPI_CALL overlay_QueuePresentKHR(
|
||||
struct instance_data *instance_data = device_data->instance;
|
||||
uint32_t query_results[OVERLAY_QUERY_COUNT];
|
||||
|
||||
device_data->frame_stats.stats[OVERLAY_PARAM_ENABLED_frame]++;
|
||||
|
||||
if (list_length(&queue_data->running_command_buffer) > 0) {
|
||||
/* Before getting the query results, make sure the operations have
|
||||
* completed.
|
||||
|
||||
Reference in New Issue
Block a user