mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibGL: Only pass bound texture units to rasterizer
Before, `SoftwareRasterizer` was iterating over all 32 possible texture units for each fragment and checking each if they're bound to a texture. After this change, an intrusive list containing only texture units with bound textures is passed to the rasterizer. In GLQuake, this results in a performance improvement of ~30% (from 12 to 16 FPS in the first demo) on my machine.
This commit is contained in:
parent
f201567153
commit
4e3ed16527
5 changed files with 16 additions and 10 deletions
|
@ -234,6 +234,7 @@ private:
|
|||
HashMap<GLuint, RefPtr<Texture>> m_allocated_textures;
|
||||
Array<TextureUnit, 32> m_texture_units;
|
||||
TextureUnit* m_active_texture_unit { &m_texture_units[0] };
|
||||
TextureUnit::BoundList m_bound_texture_units;
|
||||
|
||||
SoftwareRasterizer m_rasterizer;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue