[Mesa-dev] [PATCH 13/15] gallivm: Move tgsi_soa helper macros to header file
Jose Fonseca
jfonseca at vmware.com
Mon Dec 12 07:05:32 PST 2011
----- Original Message -----
> ---
> src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 12 ++++++++++++
> src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 14
> --------------
> 2 files changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
> b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
> index 554b4cb..1258620 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
> @@ -51,6 +51,18 @@
>
> #define LP_MAX_INSTRUCTIONS 256
>
> +#define FOR_EACH_CHANNEL( CHAN )\
> + for (CHAN = 0; CHAN < NUM_CHANNELS; CHAN++)
> +
Tom,
Symbols that are mean to be used by more that one .c/cpp file should have an unique name prefix to avoid name clashes.
For this particular case, these are not LLVM related, so it would make sense to put these macros somewhere in src/gallium/auxiliary/tgsi/ with a TGSI_xxxx prefix so they can be used by all TGSI translation code.
Jose
More information about the mesa-dev
mailing list