Opened 5 hours ago

#15500 new defect

TINYGL: Increased memory usage for textures with bilinear filtering

Reported by: ccawley2011 Owned by:
Priority: normal Component: Engine: Grim
Version: Keywords: tinygl memory
Cc: Game:

Description

The bilinear filtering code in TinyGL has this comment:

// Bilinear: each texture coordinates corresponds to the 4 original image
// pixels linear interpolation has to work on, so that they are near each
// other in CPU data cache, and a single actual memory fetch happens. This
// allows applying linear filtering at render time at a very low performance
// cost. As we expect to work on small-ish textures (512*512 ?) the 4x memory
// usage increase should be negligible.

The memory usage increase is quite noticeable on platforms with less RAM, since a single 512*512 texture goes from requiring 1 MB to 4 MB. It also involves converting the texture to 32 bits per pixel, which results in a 16x memory increase for paletted textures which could be as small as 256 KB for a 512x512 texture.

Change History (0)

Note: See TracTickets for help on using tickets.