diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-23 15:47:39 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-23 15:47:39 +1100 |
| commit | 56706244924987852e5ec610941bce8258ae647b (patch) | |
| tree | e9ab9cceb81b9e6c7b06e18920c3246893825f33 /src/device_context.hh | |
| parent | f34bb0671dd196f0a9bda61d85f2fd8f190769e3 (diff) | |
Implement AntiLag2
Diffstat (limited to 'src/device_context.hh')
| -rw-r--r-- | src/device_context.hh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/device_context.hh b/src/device_context.hh index 310b8a7..c73f97f 100644 --- a/src/device_context.hh +++ b/src/device_context.hh @@ -2,6 +2,7 @@ #define DEVICE_CONTEXT_HH_ #include <chrono> +#include <deque> #include <memory> #include <unordered_map> @@ -53,6 +54,16 @@ struct DeviceContext final : public Context { }; Clock clock; + + std::uint32_t antilag_fps = 0; + VkAntiLagModeAMD antilag_mode = VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD; + + // The queue used in the last present. + std::shared_ptr<QueueContext> present_queue; + + private: + void sleep_in_input(); + public: DeviceContext(InstanceContext& parent_instance, PhysicalDeviceContext& parent_physical, @@ -63,6 +74,11 @@ struct DeviceContext final : public Context { void notify_acquire(const VkSwapchainKHR& swapchain, const std::uint32_t& image_index, const VkSemaphore& signal_semaphore); + + // + void notify_antilag_update(const VkAntiLagDataAMD& data); + + void notify_queue_present(const QueueContext& queue); }; }; // namespace low_latency |
