diff options
author | Lionel Landwerlin <[email protected]> | 2019-02-26 12:44:36 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-02-28 12:40:57 +0000 |
commit | 4e29a1d36ae72e0192c52efe6865d5b0e58a1358 (patch) | |
tree | de34b823b563a04fd86ddfc964b88f54771ecfa5 /src | |
parent | 7ad1a05c8314b4b6887f0a23892fa4f7fbca9720 (diff) |
vulkan/overlay: fix min/max computations
This shouldn't be condition to the acquire time being visible.
Signed-off-by: Lionel Landwerlin <[email protected]>
Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/overlay-layer/overlay.cpp | 22 |
1 files 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]); } } |