From e3f9ca4009afe2620b27b61b3e0f37053b1d4354 Mon Sep 17 00:00:00 2001 From: KOISHI KOMEIJI FROM TOUHOU 11 Date: Sat, 15 Jun 2024 20:13:15 +0800 Subject: [PATCH] fix check_perfmon len --- gpu/gpu_info_vulkan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpu/gpu_info_vulkan.c b/gpu/gpu_info_vulkan.c index fbe7a5885..17ee43003 100644 --- a/gpu/gpu_info_vulkan.c +++ b/gpu/gpu_info_vulkan.c @@ -5,7 +5,7 @@ int check_perfmon(vk_handle_t* rh) { #ifdef __linux__ cap_t caps; - const cap_value_t cap_list[2] = {CAP_PERFMON}; + const cap_value_t cap_list[1] = {CAP_PERFMON}; if ((*rh->cap_get_bound)(CAP_SETFCAP) < 0) return -1; @@ -14,7 +14,7 @@ int check_perfmon(vk_handle_t* rh) { if (caps == NULL) return -1; - if ((*rh->cap_set_flag)(caps, CAP_EFFECTIVE, 2, cap_list, CAP_SET) == -1) + if ((*rh->cap_set_flag)(caps, CAP_EFFECTIVE, 1, cap_list, CAP_SET) == -1) return -1; if ((*rh->cap_set_proc)(caps) == -1) @@ -221,4 +221,4 @@ void vk_check_vram(vk_handle_t rh, int i, mem_info_t *resp) { void vk_release(vk_handle_t rh) { (*rh.vkDestroyInstance)(rh.vk, NULL); -} \ No newline at end of file +}