| Summary: | ANGLE Metal RGB textures are slow to initialise compared to RGBA textures when uploading video contents | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kimmo Kinnunen <kkinnunen> |
| Component: | ANGLE | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | dino, dustin.kerstein, geofflang, jonahr, kbr, kkinnunen, kpiddington, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 231031 | ||
|
Description
Kimmo Kinnunen
2021-10-07 04:11:39 PDT
There's a chance the core ANGLE folks (Geoff, Jonah) might have some advice on how to optimize this. There are a couple options we've done on different backends: - Clear with a GPU clear when possible - Use swizzled samplers to always sample 1.0 from the alpha channel of these textures. I think it's still recommended to clear first even with this, there are many paths that need to be aware of this emulated alpha (ReadPixels, CopyTexImage, Blit) - If this is a glTexImage2D call with non-null data, you can add a new data upload function that writes the 1.0 alpha. Otherwise, just try to avoid re-initializing textures too frequently. Caching the allocated textures would avoid this issue. |