Commit 5a97360
committed
fix: detect SwiftShader as BLOCKLISTED, not FALLBACK
SwiftShader is Chrome's CPU-based WebGL fallback, used when no GPU
driver is available (CI, Docker, headless browsers, broken drivers).
Consumers need to treat it as tier 0 / BLOCKLISTED so they can fall
back to a non-WebGL experience — cpu-rasterized WebGL is functional
but unusable for anything graphically interesting.
Two bugs combined to make this not work (see #120):
1. The blocklist entry was "google swiftshader", but cleanRenderer
produces strings like "google, swiftshader ..." (comma between the
vendor and product). Substring match failed.
2. Renderer strings can legitimately contain punctuation that doesn't
appear in curated blocklist entries. Relying on exact substring
match against the raw cleaned string is fragile.
Fixes:
- Shorten the blocklist entry from "google swiftshader" to just
"swiftshader". SwiftShader is Google-only and always software —
no false positives to worry about, and it catches future renderer
string variants that might omit or reorder the vendor prefix.
- Normalize the renderer (strip commas, collapse whitespace) before
the blocklist substring check so punctuation-only mismatches no
longer slip through.
- Document `fps` field semantics in the README result-types section:
it's populated for BENCHMARK and the Apple Silicon FALLBACK only,
`undefined` for all other types.1 parent 97127e7 commit 5a97360
4 files changed
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
323 | 326 | | |
324 | | - | |
| 327 | + | |
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
328 | 341 | | |
329 | 342 | | |
330 | 343 | | |
| |||
402 | 415 | | |
403 | 416 | | |
404 | 417 | | |
405 | | - | |
| 418 | + | |
406 | 419 | | |
407 | 420 | | |
408 | 421 | | |
| |||
0 commit comments