mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 17:59:58 -04:00
Stop telling an RTX 50 player that frame generation needs an RTX 40 card, and log why it is unavailable.
When Streamline loaded but DLSS Frame Generation was not available, the menu's row read "in use: off, needs an RTX 40 GPU or newer", also on an RTX 5080: the same check fails when the plugin did not load or a function it needs is missing. The row now points to the dlssg lines of the log, where the bridge says whether the plugin loaded and which of its functions it found, and then asks Streamline for its support result on the selected Vulkan device and logs it by name. The query is an optional export, so a bridge DLL of an earlier build keeps working. The runtime and the bridge (tools/build_dlssg.py, MSVC, Streamline's headers) both build here. The failing case itself was not reproduced: on this RTX 5090 frame generation is available. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <sl.h>
|
||||
#include <sl_consts.h>
|
||||
#include <sl_dlss_g.h>
|
||||
#include <sl_helpers.h>
|
||||
#include <sl_pcl.h>
|
||||
#include <sl_reflex.h>
|
||||
|
||||
@@ -151,12 +152,22 @@ extern "C" NX2SL_API int nx2sl_available(void) {
|
||||
sl::DLSSGState s{};
|
||||
if (g_available && p_dlssg_state && p_dlssg_state(sl::ViewportHandle(0), s, nullptr) == sl::Result::eOk)
|
||||
g_max.store(s.numFramesToGenerateMax);
|
||||
if (!g_available) say("dlssg: DLSS Frame Generation not available on this GPU or driver");
|
||||
if (!g_available) say("dlssg: frame generation unavailable (DLSS-G plugin loaded: %d, DLSS-G options: %d, PCL marker: %d)",
|
||||
loaded, p_dlssg_options != nullptr, p_marker != nullptr);
|
||||
else if (g_max.load()) say("dlssg: DLSS Frame Generation available, up to %ux", g_max.load() + 1);
|
||||
else say("dlssg: DLSS Frame Generation available (its most frames per rendered frame not reported yet)");
|
||||
return g_available;
|
||||
}
|
||||
|
||||
extern "C" NX2SL_API void nx2sl_log_unavailable(VkPhysicalDevice physical) {
|
||||
auto supported = proc<PFun_slIsFeatureSupported>("slIsFeatureSupported");
|
||||
if (!supported) return say("dlssg: Streamline has no adapter support query");
|
||||
sl::AdapterInfo adapter{};
|
||||
adapter.vkPhysicalDevice = physical;
|
||||
sl::Result r = supported(sl::kFeatureDLSS_G, adapter);
|
||||
say("dlssg: frame generation support on the selected Vulkan adapter: %s (%d)", sl::getResultAsStr(r), (int)r);
|
||||
}
|
||||
|
||||
// Streamline sets Reflex's mode on the swapchain it was told of last (VK_NV_low_latency2) and drops it while there is
|
||||
// none, so it is set again after each swapchain.
|
||||
extern "C" NX2SL_API void nx2sl_reflex(int mode) {
|
||||
|
||||
Reference in New Issue
Block a user