summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-12-23 14:39:16 -0500
committerZack Rusin <[email protected]>2009-12-25 05:52:19 -0500
commit960be012a9d185c80bfcb9ff5c3781314dfb7b25 (patch)
treed9594880812347e71d5da8eab3fbcb018b51b56c /src/gallium/auxiliary/tgsi
parente9c6f01a52fe5f9ba993505c246740dd20fab344 (diff)
tgsi: fix property parsing/building
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 92903fe57f3..de9cbc86305 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -1025,7 +1025,7 @@ tgsi_build_full_property(
size++;
*property = tgsi_build_property(
- TGSI_PROPERTY_GS_INPUT_PRIM,
+ full_prop->Property.PropertyName,
header );
assert( full_prop->Property.NrTokens <= 8 + 1 );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 80d3a1e39fa..ca247a1f97c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -62,18 +62,20 @@ static boolean uprcase( char c )
}
/*
- * Ignore case of str1 and assume str2 is already uppercase.
+ * Ignore case of str1 and assume str1 is already uppercase.
* Return TRUE iff str1 and str2 are equal.
*/
static int
streq_nocase_uprcase(const char *str1,
const char *str2)
{
- while (*str1 && uprcase(*str1) == *str2) {
+ while (*str1 && *str2) {
+ if (*str1 != uprcase(*str2))
+ return FALSE;
str1++;
str2++;
}
- return *str1 == *str2;
+ return TRUE;
}
static boolean str_match_no_case( const char **pcur, const char *str )
@@ -1166,7 +1168,7 @@ static boolean parse_property( struct translate_ctx *ctx )
}
for (property_name = 0; property_name < TGSI_PROPERTY_COUNT;
++property_name) {
- if (streq_nocase_uprcase(id, property_names[property_name])) {
+ if (streq_nocase_uprcase(property_names[property_name], id)) {
break;
}
}