mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-26 02:20:43 +01:00
6c9d10cb83
The webGL backend uses textures to upload quads to the GPU, since it doesn't have storage buffers. Each quad is stored in 10 texels, and we previously fetched each texel 4 times. Although texel fetches are cached, the extra bookkeeping optimized badly, and lead to bad performance. This change replaces the `read_word` calls with `fetch_texel_instance`, and manually unrolls this loop. This gave the following frame time improvements scrolling through delta web: - desktop, 9950x3d iGPU, 1440p, firefox: ~3.3x faster - mobile, Pixel 10 Pro, firefox: ~23x faster --- Release Notes: - [GPUI] Improved performance of webGL quad upload, around a ~3x frame time reduction in typical cases