refactor(wezterm): clean up gpu detection
This commit is contained in:
parent
2f4e6ff510
commit
e904493049
@ -5,12 +5,11 @@ local wezterm = require("wezterm")
|
|||||||
|
|
||||||
local found_valid_gpu = false
|
local found_valid_gpu = false
|
||||||
for _, gpu in ipairs(wezterm.gui.enumerate_gpus()) do
|
for _, gpu in ipairs(wezterm.gui.enumerate_gpus()) do
|
||||||
if gpu.backend == "Vulkan" then
|
if gpu.backend == "Vulkan" and not found_valid_gpu then
|
||||||
wezterm.log_info("Found Usable Vulkan GPU\n Device Name -> " .. gpu.name .."\n Device Type -> " .. gpu.device_type)
|
wezterm.log_info("Found Usable Vulkan GPU -- Device Name -> " .. gpu.name .."; Device Type -> " .. gpu.device_type)
|
||||||
config.webgpu_preferred_adapter = gpu
|
config.webgpu_preferred_adapter = gpu
|
||||||
config.front_end = "WebGpu"
|
config.front_end = "WebGpu"
|
||||||
found_valid_gpu = true
|
found_valid_gpu = true
|
||||||
break
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user