Files
Reims-Go/internal/host/log_diagnose.go
Nwflower 05ddd2b6f3 refactor(app): remove legacy storage client paths
Share redaction and GPU log diagnosis outside the macOS client, move snapshot validation to the driver contract, and delete superseded App storage implementations.
2026-11-30 10:45:58 -07:00

31 lines
984 B
Go

package host
import "strings"
// DiagnoseGPULog recognizes known Vulkan compatibility and device-loss failures.
func DiagnoseGPULog(output string) (code, detail string) {
if output == "" {
return "", ""
}
for _, raw := range strings.Split(output, "\n") {
line := strings.TrimSpace(raw)
if line == "" {
continue
}
if strings.Contains(line, "ERROR_DEVICE_LOST") || strings.Contains(line, "was lost at vkQueueSubmit2") || strings.Contains(line, "rt-device-lost-in-flight") {
return "gpu_device_lost", line
}
}
for _, raw := range strings.Split(output, "\n") {
line := strings.TrimSpace(raw)
if line == "" {
continue
}
low := strings.ToLower(line)
if strings.Contains(line, "VK_ERROR_INCOMPATIBLE_DRIVER") || strings.Contains(low, "no vulkan gpu found") || strings.Contains(low, "meets the floor") || strings.Contains(low, "below the floor") || strings.Contains(low, "no physical device") {
return "gpu_vulkan_floor", line
}
}
return "", ""
}