From: Brian Date: Wed, 27 Feb 2008 22:06:04 +0000 (-0700) Subject: gallium: added uses_kill field to tgsi_shader_info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb40c5a9c7dc91c03f80780e0a09be0cade98705;p=mesa.git gallium: added uses_kill field to tgsi_shader_info --- diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_scan.c b/src/gallium/auxiliary/tgsi/util/tgsi_scan.c index a1cc681492f..a973aeb62f9 100644 --- a/src/gallium/auxiliary/tgsi/util/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/util/tgsi_scan.c @@ -133,5 +133,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens, } } + info->uses_kill = (info->opcode_count[TGSI_OPCODE_KIL] || + info->opcode_count[TGSI_OPCODE_KILP]); + tgsi_parse_free (&parse); } diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_scan.h b/src/gallium/auxiliary/tgsi/util/tgsi_scan.h index dc6dfd6d0b3..d10d300c4d9 100644 --- a/src/gallium/auxiliary/tgsi/util/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/util/tgsi_scan.h @@ -57,6 +57,7 @@ struct tgsi_shader_info uint opcode_count[TGSI_OPCODE_LAST]; /**< opcode histogram */ boolean writes_z; /**< does fragment shader write Z value? */ + boolean uses_kill; /**< KIL or KILP instruction used? */ };