Add perf counter to fence waits.

Makes it easy to check if we're GPU bound or not.
This commit is contained in:
Hans-Kristian Arntzen 2016-05-21 12:13:46 +02:00
parent 30e45902f2
commit 218ecc07c1

View File

@ -27,6 +27,7 @@
#include <dynamic/dylib.h>
#include "vulkan_common.h"
#include "../../performance_counters.h"
vulkan_context_fp_t vkcfp;
@ -1672,7 +1673,13 @@ void vulkan_acquire_next_image(gfx_ctx_vulkan_data_t *vk)
if (*next_fence != VK_NULL_HANDLE)
{
static struct retro_perf_counter fence_wait = {0};
rarch_perf_init(&fence_wait, "fence_wait");
retro_perf_start(&fence_wait);
VKFUNC(vkWaitForFences)(vk->context.device, 1, next_fence, true, UINT64_MAX);
retro_perf_stop(&fence_wait);
VKFUNC(vkResetFences)(vk->context.device, 1, next_fence);
}
else