diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/helper.hh | 6 | ||||
| -rw-r--r-- | src/layer_context.cc | 15 | ||||
| -rw-r--r-- | src/layer_context.hh | 6 | ||||
| -rw-r--r-- | src/strategies/low_latency2/device_strategy.cc | 3 |
4 files changed, 10 insertions, 20 deletions
diff --git a/src/helper.hh b/src/helper.hh index 6dde9be..f7c38da 100644 --- a/src/helper.hh +++ b/src/helper.hh @@ -53,12 +53,6 @@ static const T* find_link(const void* const head, return nullptr; } -template <typename T> std::uint64_t extract_present_id(const T& submit) { - const auto lspi = find_next<VkLatencySubmissionPresentIdNV>( - &submit, VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV); - return lspi ? lspi->presentID : 0; -} - } // namespace low_latency #endif
\ No newline at end of file diff --git a/src/layer_context.cc b/src/layer_context.cc index 93f4a26..120d52e 100644 --- a/src/layer_context.cc +++ b/src/layer_context.cc @@ -5,16 +5,15 @@ namespace low_latency { -LayerContext::LayerContext() { - const auto parse_bool_env = [](const auto& name) -> bool { - const auto env = std::getenv(name); - return env && std::string_view{env} == "1"; - }; - - this->should_expose_reflex = parse_bool_env(EXPOSE_REFLEX_ENV); - this->should_spoof_nvidia = parse_bool_env(SPOOF_NVIDIA_ENV); +static bool parse_bool_env(const auto& name) { + const auto env = std::getenv(name); + return env && std::string_view{env} == "1"; } +LayerContext::LayerContext() + : should_expose_reflex(parse_bool_env(EXPOSE_REFLEX_ENV)), + should_spoof_nvidia(parse_bool_env(SPOOF_NVIDIA_ENV)) {} + LayerContext::~LayerContext() {} } // namespace low_latency
\ No newline at end of file diff --git a/src/layer_context.hh b/src/layer_context.hh index e7b24b3..4d4444d 100644 --- a/src/layer_context.hh +++ b/src/layer_context.hh @@ -63,12 +63,12 @@ class LayerContext final : public Context { static constexpr auto NVIDIA_DEVICE_NAME = "NVIDIA GeForce RTX 5090"; public: + const bool should_expose_reflex = false; + const bool should_spoof_nvidia = false; + std::shared_mutex mutex; std::unordered_map<void*, std::shared_ptr<Context>> contexts; - bool should_expose_reflex = false; - bool should_spoof_nvidia = false; - public: LayerContext(); virtual ~LayerContext(); diff --git a/src/strategies/low_latency2/device_strategy.cc b/src/strategies/low_latency2/device_strategy.cc index 08002a9..32ff981 100644 --- a/src/strategies/low_latency2/device_strategy.cc +++ b/src/strategies/low_latency2/device_strategy.cc @@ -97,9 +97,6 @@ void LowLatency2DeviceStrategy::submit_swapchain_present_id( }(); const auto lock = std::scoped_lock{this->mutex}; - - // Fail hard here, the swapchain must exist or something has gone wrong with - // Vulkan bookkeeping. const auto iter = this->swapchain_monitors.find(swapchain); if (iter == std::end(this->swapchain_monitors)) { return; |
