[Mesa-dev] [PATCH 2/2] tgsi: consolidate TGSI string arrays in new tgsi_strings.h

Dave Airlie airlied at gmail.com
Thu Jan 5 02:29:41 PST 2012


On Wed, Jan 4, 2012 at 4:00 PM, Brian Paul <brianp at vmware.com> wrote:
> There was some duplication between the tgsi_dump.c and tgsi_text.c
> files.  Also use some static assertions to help catch errors when
> adding new TGSI values.

I'm not 100% sure, but if you include tgsi_strings.h into two C files
will you get two instances of the strings in the read only data
section?, since they are static const, I get the feeling you'll get a
copy per-file. Maybe someone with more up-to-date tools knowledge
might know.

Adding a tgsi_strings.c and some externs might work nicer.

otherwise I like the idea a lot.

Dave.


More information about the mesa-dev mailing list