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 a1cc681492f30dbbd117d5819e02a49bc55e7e6c..a973aeb62f9ef1f391bae61f5ad6bef5fabf3697 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 dc6dfd6d0b33db2bba59be1f38532c47918b5ff9..d10d300c4d9bce3259007a832eab58afb5387953 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? */
 };