Implement Native NVIDIA Reflex Low Latency (VK_NV_low_latency2)

- Enable VK_NV_low_latency2 and VK_KHR_present_id with present ID features
- Add VkSwapchainLatencyCreateInfoNV to swapchain creation
- Link present and submission IDs with standard Vulkan latency types
- Insert latency markers: simulation start/end, input sample, render submit, and present
- Gate all extensions and latency chains on reflex != off (RESTART setting)
- Log graceful notice when Reflex is requested on unsupported hardware
- Add UI menu setting and translations for en, ru, pt-BR, zh-Hans
- Document reflex setting in totk.ini.example and docs/settings.md
This commit is contained in:
Tears of the SteelTemple authored and itaskaev2 committed 2026-11-10 18:20:16 +01:00
1 parent 7a37fc3c34
commit 3209ea4358
12 files changed
+196 -9

No files matched your search

+3
View File
@@ -17,6 +17,8 @@
#include "ov.h"
#include "platform/platform.h"
void vk_reflex_marker(int marker);
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;
@@ -93,6 +95,7 @@ static void npad_states(Cpu *c, uint32_t want) {
if (live) {
s.attributes = ATTR_CONNECTED;
input_poll(&s.buttons, &s.lx, &s.ly, &s.rx, &s.ry);
vk_reflex_marker(6); // VK_LATENCY_MARKER_INPUT_SAMPLE_NV
}
*out = s;
ret_x(c, 1);