gallium: added uses_kill field to tgsi_shader_info
authorBrian <brian@i915.localnet.net>
Wed, 27 Feb 2008 22:06:04 +0000 (15:06 -0700)
committerBrian <brian@i915.localnet.net>
Wed, 27 Feb 2008 22:11:57 +0000 (15:11 -0700)
src/gallium/auxiliary/tgsi/util/tgsi_scan.c
src/gallium/auxiliary/tgsi/util/tgsi_scan.h

index a1cc681..a973aeb 100644 (file)
@@ -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);
 }
index dc6dfd6..d10d300 100644 (file)
@@ -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? */
 };