summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7d51b32)
All the other freelists had this right, but the texture freelist would
start pruning the _newest_ entries, which obviously gave poor performance.
Patch by Christophe Thommeret.
texture_freelist_bytes += estimate_texture_size(texture_formats[texture_num]);
while (texture_freelist_bytes > texture_freelist_max_bytes) {
texture_freelist_bytes += estimate_texture_size(texture_formats[texture_num]);
while (texture_freelist_bytes > texture_freelist_max_bytes) {
- GLuint free_texture_num = texture_freelist.front();
- texture_freelist.pop_front();
+ GLuint free_texture_num = texture_freelist.back();
+ texture_freelist.pop_back();
assert(texture_formats.count(free_texture_num) != 0);
texture_freelist_bytes -= estimate_texture_size(texture_formats[free_texture_num]);
texture_formats.erase(free_texture_num);
assert(texture_formats.count(free_texture_num) != 0);
texture_freelist_bytes -= estimate_texture_size(texture_formats[free_texture_num]);
texture_formats.erase(free_texture_num);