[Mesa-dev] [PATCH 2/2] tgsi: consolidate TGSI string arrays in new tgsi_strings.h
Brian Paul
brianp at vmware.com
Thu Jan 5 07:23:12 PST 2012
On 01/05/2012 03:29 AM, Dave Airlie wrote:
> 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.
Yeah, I'll respin this. The problem I ran into were the occurances of
Elements(array) in tgsi_text.c that were failing because the array
size was unknown from the .h file. I think that simply dimensioning
all the arrays in the header file should fix that though.
-Brian
More information about the mesa-dev
mailing list