From 4e29a1d36ae72e0192c52efe6865d5b0e58a1358 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 26 Feb 2019 12:44:36 +0000 Subject: [PATCH] vulkan/overlay: fix min/max computations This shouldn't be condition to the acquire time being visible. Signed-off-by: Lionel Landwerlin Acked-by: Eric Engestrom --- src/vulkan/overlay-layer/overlay.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp index fb86312ba3f..658feb66337 100644 --- a/src/vulkan/overlay-layer/overlay.cpp +++ b/src/vulkan/overlay-layer/overlay.cpp @@ -537,18 +537,18 @@ static void compute_swapchain_display(struct swapchain_data *data) ImGui::Text("Acquire timing: %.3fms [%.3f, %.3f]", get_acquire_timing(data, ARRAY_SIZE(data->acquire_times) - 1), min_time, max_time); + } - for (uint32_t i = 0; i < ARRAY_SIZE(data->stats_min.stats); i++) { - data->stats_min.stats[i] = UINT32_MAX; - data->stats_max.stats[i] = 0; - } - for (uint32_t i = 0; i < MIN2(data->n_frames - 1, ARRAY_SIZE(data->stats)); i++) { - for (uint32_t j = 0; j < ARRAY_SIZE(data->stats[0].stats); j++) { - data->stats_min.stats[j] = MIN2(data->stats[i].stats[j], - data->stats_min.stats[j]); - data->stats_max.stats[j] = MAX2(data->stats[i].stats[j], - data->stats_max.stats[j]); - } + for (uint32_t i = 0; i < ARRAY_SIZE(data->stats_min.stats); i++) { + data->stats_min.stats[i] = UINT32_MAX; + data->stats_max.stats[i] = 0; + } + for (uint32_t i = 0; i < MIN2(data->n_frames - 1, ARRAY_SIZE(data->stats)); i++) { + for (uint32_t j = 0; j < ARRAY_SIZE(data->stats[0].stats); j++) { + data->stats_min.stats[j] = MIN2(data->stats[i].stats[j], + data->stats_min.stats[j]); + data->stats_max.stats[j] = MAX2(data->stats[i].stats[j], + data->stats_max.stats[j]); } } -- 2.30.2