release: install.sh asks what to install, caches the NVIDIA DLLs and the engine models, and [Engine] defaults to auto
Verified copies go to ~/.cache/d4r: the next game's install copies them instead of downloading or building again. Enabled = auto (the new default) turns the engine on when d4r/engine holds a model; the shim probes the nine model folders. build-engine-models.sh gains --exact (NVIDIA's roundings) and --find-proton.
This commit is contained in:
1 parent
d1559ca5fa
commit
747ac8538d
5 files changed
+244
-118
No files matched your search
@@ -695,8 +695,25 @@ static void load_portable_config()
|
||||
// release cannot ship that kernel, which is built from NVIDIA's PTX.
|
||||
portable_set("D4R_SHIM_OUTPUT_DIRECT", ini_flag(ini, "interop", "DirectOutput", nativeOn) ? "1" : "0");
|
||||
|
||||
// [Engine]: d4r's own Vulkan inference for DLSS 4 (K); the model is looked up in d4r\engine\k
|
||||
portable_set("D4R_ENGINE", ini_flag(ini, "engine", "Enabled", 0) ? "1" : "0");
|
||||
// [Engine]: d4r's own Vulkan inference (K, L, M and Ray Reconstruction); the models are looked up in d4r\engine.
|
||||
// Enabled = auto (the default) runs it when install.sh built a model there: it is the faster path, and a model
|
||||
// the device cannot run, or a feature no model covers, still goes to the CUDA backend (d4r_nvngx.log says why).
|
||||
{
|
||||
const std::string enabled = ascii_lower(ini_value(ini, "engine", "Enabled"));
|
||||
bool on = false;
|
||||
if (enabled.empty() || enabled == "auto")
|
||||
{
|
||||
for (const wchar_t* model : {L"k", L"k-ldr", L"m", L"m-ldr", L"l", L"l-ldr", L"rr-d", L"rr-e", L"rr-f"})
|
||||
{
|
||||
const DWORD attributes = GetFileAttributesW((dir + L"\\engine\\" + model).c_str());
|
||||
if (attributes != INVALID_FILE_ATTRIBUTES && (attributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
on = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
on = ini_flag(ini, "engine", "Enabled", 0) != 0;
|
||||
portable_set("D4R_ENGINE", on ? "1" : "0");
|
||||
}
|
||||
if (const std::string engineModel = ini_value(ini, "engine", "ModelDir"); !engineModel.empty())
|
||||
portable_set(L"D4R_ENGINE_MODEL_DIR", portable_path(engineModel));
|
||||
// Network: the network on the engine's Vulkan shader ("vulkan", and the default: "auto") or on the native HIP
|
||||
|
||||
Reference in new issue
Block a user