mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
Mapsd: move on the CPU (#30349)
* mapsd -> cpu * link directly to mesa * Fix gitignore * without launcher script * dont change that * dont need that * add to files_common * rename to configure cpu rendering * without a symlink! * update time refs * update ref * update ref * remove duplicate include * bump up again --------- Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: bdf2fa0f83d92c67c3fc90972ca1d71af543fc1a
This commit is contained in:
@@ -34,6 +34,8 @@ public:
|
||||
static bool get_ssh_enabled() { return false; }
|
||||
static void set_ssh_enabled(bool enabled) {}
|
||||
|
||||
static void config_cpu_rendering();
|
||||
|
||||
static bool PC() { return false; }
|
||||
static bool TICI() { return false; }
|
||||
static bool AGNOS() { return false; }
|
||||
|
||||
@@ -20,4 +20,9 @@ public:
|
||||
snprintf(volume_str, sizeof(volume_str), "%.3f", volume);
|
||||
std::system(("pactl set-sink-volume @DEFAULT_SINK@ " + std::string(volume_str)).c_str());
|
||||
}
|
||||
|
||||
static void config_cpu_rendering() {
|
||||
setenv("QT_QPA_PLATFORM", "offscreen", 1);
|
||||
setenv("__GLX_VENDOR_LIBRARY_NAME", "mesa", 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -103,4 +103,9 @@ public:
|
||||
|
||||
static bool get_ssh_enabled() { return Params().getBool("SshEnabled"); }
|
||||
static void set_ssh_enabled(bool enabled) { Params().putBool("SshEnabled", enabled); }
|
||||
|
||||
static void config_cpu_rendering() {
|
||||
setenv("QT_QPA_PLATFORM", "eglfs", 1); // offscreen doesn't work with EGL/GLES
|
||||
setenv("LP_NUM_THREADS", "0", 1); // disable threading so we stay on our assigned CPU
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user