mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 09:58:03 +02:00
GPU: add option --gpu-force-vulkan
This commit is contained in:
@@ -8,6 +8,7 @@ Features:
|
||||
* Support display name, display type and decimal refresh rate detection (Display, macOS / Windows)
|
||||
* Support `--display-compact-type` to display multiple resolutions in one line (Display)
|
||||
* Support flatpak-user (Packages, Linux, #436)
|
||||
* Support `--gpu-force-vulkan` to force using vulkan to detect GPUs, which support video memory usage detection with `--allow-slow-operations` (GPU)
|
||||
|
||||
Bugfixes:
|
||||
* Fix date time format
|
||||
|
||||
@@ -201,6 +201,7 @@ __fastfetch_completion()
|
||||
"--disk-show-subvolumes"
|
||||
"--gpu-hide-integrated"
|
||||
"--gpu-hide-discrete"
|
||||
"--gpu-force-vulkan"
|
||||
"--disk-show-unknown"
|
||||
"--bluetooth-show-disconnected"
|
||||
)
|
||||
|
||||
@@ -144,6 +144,7 @@ static void defaultConfig(FFinstance* instance)
|
||||
|
||||
instance->config.cpuTemp = false;
|
||||
instance->config.gpuTemp = false;
|
||||
instance->config.gpuForceVulkan = false;
|
||||
instance->config.batteryTemp = false;
|
||||
|
||||
instance->config.gpuHideIntegrated = false;
|
||||
|
||||
@@ -219,6 +219,13 @@
|
||||
#--gpu-hide-integrated
|
||||
#--gpu-hide-discrete
|
||||
|
||||
# GPU detection options
|
||||
# Forces using vulkan to detect GPUs
|
||||
# which support video memory usage detection with `--allow-slow-operations`
|
||||
# Must be either true or false
|
||||
# Default is false.
|
||||
#--gpu-force-vulkan
|
||||
|
||||
# Shell option
|
||||
# Sets if shell version should be detected and printed
|
||||
# Must be either true or false
|
||||
|
||||
@@ -120,6 +120,7 @@ Module specific options:
|
||||
--battery-dir <folder>: The directory where the battery folders are. Standard: /sys/class/power_supply/
|
||||
--cpu-temp <?value>: Detect and display CPU temperature if supported. Default is false
|
||||
--gpu-temp <?value>: Detect and display GPU temperature if supported. Default is false
|
||||
--gpu-force-vulkan <?value>: Force using vulkan to detect GPUs, which support video memory usage detection with `--allow-slow-operations`. Default is false
|
||||
--gpu-hide-integrated <?value>: Hide integrated GPU if supported. Default is false
|
||||
--gpu-hide-discrete <?value>: Hide discrete GPU if supported. Default is false
|
||||
--battery-temp <?value>: Detect and display Battery temperature if supported. Default is false
|
||||
|
||||
@@ -36,7 +36,7 @@ const FFlist* ffDetectGPU(const FFinstance* instance)
|
||||
{
|
||||
FF_DETECTION_INTERNAL_GUARD(FFlist,
|
||||
ffListInit(&result, sizeof(FFGPUResult));
|
||||
if(ffDetectGPUImpl(&result, instance) != NULL)
|
||||
if(instance->config.gpuForceVulkan || ffDetectGPUImpl(&result, instance) != NULL)
|
||||
{
|
||||
const FFVulkanResult* vulkan = ffDetectVulkan(instance);
|
||||
result = vulkan->gpus;
|
||||
|
||||
@@ -1247,6 +1247,8 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
instance->config.cpuTemp = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--gpu-temp") == 0)
|
||||
instance->config.gpuTemp = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--gpu-force-vulkan") == 0)
|
||||
instance->config.gpuForceVulkan = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--battery-temp") == 0)
|
||||
instance->config.batteryTemp = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--gpu-hide-integrated") == 0)
|
||||
|
||||
@@ -192,6 +192,7 @@ typedef struct FFconfig
|
||||
|
||||
bool cpuTemp;
|
||||
bool gpuTemp;
|
||||
bool gpuForceVulkan;
|
||||
bool batteryTemp;
|
||||
|
||||
bool gpuHideIntegrated;
|
||||
|
||||
Reference in New Issue
Block a user