Commit fec14d1
Cache validated FBO configurations in debug builds (#8491)
* perf: Cache validated FBO configurations to avoid repeated checkFramebufferStatus calls
In debug builds, gl.checkFramebufferStatus causes an expensive GPU sync (~16ms per call).
This caches validated framebuffer format configurations per device using DeviceCache, so
the check only runs once per unique combination of color formats, depth/stencil config,
and sample count. Subsequent render targets with the same configuration skip the check.
This is a debug-mode-only optimization - checkFramebufferStatus is already stripped from
production builds via Debug.call.
Made-with: Cursor
* update
---------
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>1 parent 8dc91b2 commit fec14d1
1 file changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
372 | 375 | | |
373 | 376 | | |
374 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
375 | 396 | | |
376 | 397 | | |
377 | 398 | | |
| |||
390 | 411 | | |
391 | 412 | | |
392 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
393 | 418 | | |
394 | 419 | | |
395 | 420 | | |
| |||
0 commit comments