| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | const INTEL_GPU_PATTERN = /intel|amd|radeon|nvidia|geforce/i; | 1 | const INTEL_GPU_PATTERN = /intel|amd|radeon|nvidia|geforce/i; |
| 2 | const APPLE_SILICON_GPU_PATTERN = /\bapple\s+m\d/i; | 2 | const APPLE_SILICON_GPU_PATTERN = /\bapple\s+(?:m\d|gpu)\b/i; |
| 3 | | 3 | |
| 4 | export function macArchFromGpuRenderer(renderer: string): "arm64" | "x64" { | 4 | export function macArchFromGpuRenderer(renderer: string): "arm64" | "x64" { |
| 5 | if (INTEL_GPU_PATTERN.test(renderer)) { | 5 | if (INTEL_GPU_PATTERN.test(renderer)) { |
| ... | @@ -9,8 +9,6 @@ export function macArchFromGpuRenderer(renderer: string): "arm64" | "x64" { | ... | @@ -9,8 +9,6 @@ export function macArchFromGpuRenderer(renderer: string): "arm64" | "x64" { |
| 9 | return "arm64"; | 9 | return "arm64"; |
| 10 | } | 10 | } |
| 11 | | 11 | |
| 12 | // Generic "Apple GPU" renderers are ambiguous on Safari. x64 is the safe | 12 | // Keep the fallback compatible with Intel Macs when WebGL is unavailable. |
| 13 | // fallback because Apple Silicon can run it through Rosetta, while Intel | | |
| 14 | // Macs cannot run an arm64 build. | | |
| 15 | return "x64"; | 13 | return "x64"; |
| 16 | } | 14 | } |