Skip the present lock for the Reflex frame ID when nothing reads it, and declare the front end's Reflex calls in gfx.h

vk_reflex_present_frame took g_pl on every present although only flip_locked's VkPresentIdKHR (Reflex) and
latency_note (TOTK_TRACE=perf) read g_blit_pid. nvn_api_obj.c and ov_input.c declared vk_reflex_marker,
vk_reflex_frame_begin, vk_reflex_frame and vk_reflex_sleep locally; they now come from gfx.h, the graphics layer's
interface, which gfx_present.c also sees through vk.h, so a changed signature fails to compile. vk.h stays out of
those two files: it brings in Vulkan, VMA and vk_rec.h's vkCmd* macros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-10 23:24:11 +03:00
1 parent 52b099bacb
commit 7fa727bbc5
5 files changed
+10 -12

No files matched your search

+1 -3
View File
@@ -12,14 +12,12 @@
#include <string.h>
#include "cfg.h"
#include "gfx.h"
#include "host.h"
#include "input.h"
#include "ov.h"
#include "platform/platform.h"
void vk_reflex_marker(int marker, uint64_t present_id);
uint64_t vk_reflex_frame(void);
typedef struct { int64_t sampling; uint64_t buttons; int32_t lx, ly, rx, ry; uint32_t attributes, pad; } NpadState;
typedef struct { int64_t sampling; int32_t x, y, dx, dy, wx, wy; uint32_t buttons, attributes; } MouseState;
typedef struct { int64_t sampling; uint32_t modifiers, attributes; uint64_t keys[4]; } KeyboardState;