diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-03-30 16:26:51 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-03-30 16:26:51 +1100 |
| commit | 22f8e5196508c7075493c246edb9cb9cad097c45 (patch) | |
| tree | 4ddf1ca58b5cd8414d7378d5146b54a21f6ae60d /src/layer.cc | |
| parent | 644bc4ed5edd4e3ffa88750bdacb147c75df9546 (diff) | |
Force 'capability' to query anti_lag or low_latency2 based on EXPOSE_REFLEX env var
Diffstat (limited to 'src/layer.cc')
| -rw-r--r-- | src/layer.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layer.cc b/src/layer.cc index 813c267..3f31979 100644 --- a/src/layer.cc +++ b/src/layer.cc @@ -155,11 +155,12 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( std::from_range, enabled_extensions); const auto was_capability_requested = - requested.contains(VK_AMD_ANTI_LAG_EXTENSION_NAME) || - requested.contains(VK_NV_LOW_LATENCY_2_EXTENSION_NAME); + requested.contains(!layer_context.should_expose_reflex + ? VK_AMD_ANTI_LAG_EXTENSION_NAME + : VK_NV_LOW_LATENCY_2_EXTENSION_NAME); const auto context = layer_context.get_context(physical_device); - if (!context->supports_required_extensions && was_capability_requested) { + if (was_capability_requested && !context->supports_required_extensions) { return VK_ERROR_INITIALIZATION_FAILED; } @@ -180,8 +181,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( const auto next_extensions = [&]() -> std::vector<const char*> { auto next_extensions = std::vector(std::from_range, enabled_extensions); - // Don't append anything extra if we don't support what we need. - if (!context->supports_required_extensions) { + if (!was_capability_requested) { return next_extensions; } |
