diff options
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 613b3837eb3..d9e93ce138d 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. |