test(gpu): pin the win32-only fallback invariant the macOS Graphite fix relies on (#10646)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
parent
9042ef9792
commit
bc2bdfc52e
|
|
@ -264,6 +264,8 @@ export function enableMainProcessGpuFeatures(): void {
|
|||
|
||||
if (process.platform === 'darwin') {
|
||||
// Why: Graphite can strand corrupt Metal tiles after idle; Ganesh preserves GPU compositing without the stale surface.
|
||||
// Reached on every macOS launch only because GPU fallback skips this function and is win32-only; if fallback ever
|
||||
// reaches macOS this must move out of this path or Macs silently lose the fix.
|
||||
app.commandLine.appendSwitch('disable-skia-graphite')
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,21 @@ describe('gpu-fallback-marker', () => {
|
|||
expect(existsSync(join(userDataPath, GPU_FALLBACK_MARKER_FILE))).toBe(false)
|
||||
})
|
||||
|
||||
// Why: enableMainProcessGpuFeatures() is skipped while GPU fallback is active, and that function
|
||||
// carries the macOS disable-skia-graphite fix. A marker that survived on darwin would silently
|
||||
// strip the fix from the Macs it targets, so pin the platform gate for darwin specifically.
|
||||
it('clears an active marker on macOS so the Graphite fix is never skipped', () => {
|
||||
writeGpuFallbackMarker(userDataPath, { engagedAt: 1, crashesInWindow: 4 }, environment)
|
||||
|
||||
expect(
|
||||
readActiveGpuFallbackMarker(userDataPath, {
|
||||
...environment,
|
||||
platform: 'darwin'
|
||||
})
|
||||
).toBeNull()
|
||||
expect(existsSync(join(userDataPath, GPU_FALLBACK_MARKER_FILE))).toBe(false)
|
||||
})
|
||||
|
||||
it('clears a corrupt or wrong-version marker', () => {
|
||||
writeFileSync(join(userDataPath, GPU_FALLBACK_MARKER_FILE), '{ not json')
|
||||
expect(readGpuFallbackMarker(userDataPath)).toBeNull()
|
||||
|
|
|
|||
Loading…
Reference in New Issue