Mesa (master): mesa: begin reducing memory used by display lists

Brian Paul brianp at kemper.freedesktop.org
Wed Dec 4 16:50:08 UTC 2013


Module: Mesa
Branch: master
Commit: b6468b45975f2d59a4a918fbbaa0b02d32d6d7d1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6468b45975f2d59a4a918fbbaa0b02d32d6d7d1

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Dec  4 09:45:38 2013 -0700

mesa: begin reducing memory used by display lists

This is a first step in reducing memory used by display lists on
64-bit systems.  On 64-bit systems, the gl_dlist_node union type
is 8 bytes because of the 'data' and 'next' fields.  This causes
every display list node/token to occupy 8 bytes instead of 4 as
originally designed.  This basically doubles the memory used by
some display lists on 64-bit systems.

The fix is to remove the 64-bit 'data' and 'next' pointer fields
from the union and instead store them as a pair of 32-bit values.
Easily done with a few helper functions.

The next patch will take care of the 'next' field.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/main/dlist.c |  424 +++++++++++++++++++++++++++++--------------------
 1 files changed, 252 insertions(+), 172 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=b6468b45975f2d59a4a918fbbaa0b02d32d6d7d1



More information about the mesa-commit mailing list