diff options
author | Tom Stellard <tstellar@gmail.com> | 2012-01-14 09:09:54 -0500 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-01-30 13:37:00 -0500 |
commit | 82b71db03ddaf0eed504412c9169db37cf9bdadc (patch) | |
tree | 4f4e6e3f0f3b875bfd17ed101f06fd42d9bd3a66 /src/gallium/auxiliary/tgsi/tgsi_exec.h | |
parent | 6b63e25b3d7a6ac0bd738c139ead0c7e7ad84368 (diff) | |
download | external_mesa3d-82b71db03ddaf0eed504412c9169db37cf9bdadc.zip external_mesa3d-82b71db03ddaf0eed504412c9169db37cf9bdadc.tar.gz external_mesa3d-82b71db03ddaf0eed504412c9169db37cf9bdadc.tar.bz2 |
gallium: Move duplicated helper macros to tgsi_exec.h
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index 613b383..d9e93ce 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -45,6 +45,19 @@ extern "C" { #define TGSI_NUM_CHANNELS 4 /* R,G,B,A */ #define TGSI_QUAD_SIZE 4 /* 4 pixel/quad */ +#define TGSI_FOR_EACH_CHANNEL( CHAN )\ + for (CHAN = 0; CHAN < TGSI_NUM_CHANNELS; CHAN++) + +#define TGSI_IS_DST0_CHANNEL_ENABLED( INST, CHAN )\ + ((INST)->Dst[0].Register.WriteMask & (1 << (CHAN))) + +#define TGSI_IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN )\ + if (TGSI_IS_DST0_CHANNEL_ENABLED( INST, CHAN )) + +#define TGSI_FOR_EACH_DST0_ENABLED_CHANNEL( INST, CHAN )\ + TGSI_FOR_EACH_CHANNEL( CHAN )\ + TGSI_IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN ) + /** * Registers may be treated as float, signed int or unsigned int. |