Check for GPU availability on startup, no CPU fallback for now since NCNN VS doesn't support it

This commit is contained in:
N00MKRAD
2024-12-31 19:08:28 +01:00
parent 048a849e49
commit fa11214b6e
4 changed files with 26 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using Flowframes.Forms.Main;
using Flowframes.IO;
using Flowframes.Ui;
@@ -121,5 +122,26 @@ namespace Flowframes.Os
IoUtils.TryDeleteIfExists(devmodeBatchPath);
}
}
public static void GpuCheck(bool exit = true)
{
bool anyGpu = OsUtils.HasGpu();
if (!anyGpu)
{
if (exit)
{
Form1.CloseAllSplashForms();
}
UiUtils.ShowMessageBox("No GPU detected!\n\nFlowframes requires a GPU (graphics card or integrated) with Vulkan support to run AI interpolation models.\n\nRecommended:" +
"\n- Nvidia GeForce GTX 1000 series or newer\n- AMD Radeon RX 5000 series or newer", UiUtils.MessageType.Error);
if (exit)
{
Application.Exit();
}
}
}
}
}