From 5cf279bf7e7c16dbaf1bd15bf7c65cd3cfa67728 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sat, 16 Sep 2017 12:50:42 +0200 Subject: gallivm: add support for TGSI instructions with two outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Tested-by: Dieter Nützel --- src/gallium/auxiliary/tgsi/tgsi_exec.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h') diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index bcf4a32a8ac..d28d99793b8 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -58,6 +58,15 @@ extern "C" { TGSI_FOR_EACH_CHANNEL( CHAN )\ TGSI_IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN ) +#define TGSI_IS_DST1_CHANNEL_ENABLED( INST, CHAN )\ + ((INST)->Dst[1].Register.WriteMask & (1 << (CHAN))) + +#define TGSI_IF_IS_DST1_CHANNEL_ENABLED( INST, CHAN )\ + if (TGSI_IS_DST1_CHANNEL_ENABLED( INST, CHAN )) + +#define TGSI_FOR_EACH_DST1_ENABLED_CHANNEL( INST, CHAN )\ + TGSI_FOR_EACH_CHANNEL( CHAN )\ + TGSI_IF_IS_DST1_CHANNEL_ENABLED( INST, CHAN ) /** * Registers may be treated as float, signed int or unsigned int. -- cgit v1.2.3