mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:57: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
|
@ -56,7 +56,7 @@ class SoftwareRasterizer final {
|
|||
public:
|
||||
SoftwareRasterizer(const Gfx::IntSize& min_size);
|
||||
|
||||
void submit_triangle(const GLTriangle& triangle, const Array<TextureUnit, 32>& texture_units);
|
||||
void submit_triangle(GLTriangle const& triangle, TextureUnit::BoundList const& bound_texture_units);
|
||||
void resize(const Gfx::IntSize& min_size);
|
||||
void clear_color(const FloatVector4&);
|
||||
void clear_depth(float);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue