summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-27 15:06:04 -0700
committerBrian <[email protected]>2008-02-27 15:11:57 -0700
commitfb40c5a9c7dc91c03f80780e0a09be0cade98705 (patch)
tree4be62750e9a7549d010b07a767604cb9dd71308b /src/gallium
parent1c50ea2cd9ab8752793c99b4a7a2a6656bdde1ac (diff)
gallium: added uses_kill field to tgsi_shader_info
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_scan.c3
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_scan.h1
2 files changed, 4 insertions, 0 deletions
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? */
};