Share redaction and GPU log diagnosis outside the macOS client, move snapshot validation to the driver contract, and delete superseded App storage implementations.
31 lines
984 B
Go
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 "", ""
|
|
}
|