diff options
author | Michal Krol <[email protected]> | 2008-07-17 20:23:26 +0200 |
---|---|---|
committer | Michal Krol <[email protected]> | 2008-07-17 20:23:26 +0200 |
commit | 10d1dc68a413eaf642bf1bda2e5452835f7b7050 (patch) | |
tree | f2c74973bf1edad852f37a0cfe5e990837e031dc /src/gallium/auxiliary | |
parent | 3c5ec98e45880d6a896f3c094f8004000f50a149 (diff) |
tgsi: Perform a sanity check after reading a shader from text.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/util/tgsi_text.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_text.c b/src/gallium/auxiliary/tgsi/util/tgsi_text.c index 6cab475b889..803f7a23b8e 100644 --- a/src/gallium/auxiliary/tgsi/util/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/util/tgsi_text.c @@ -29,6 +29,7 @@ #include "tgsi_text.h" #include "tgsi_build.h" #include "tgsi_parse.h" +#include "tgsi_sanity.h" #include "tgsi_util.h" static boolean is_alpha_underscore( const char *cur ) @@ -1064,5 +1065,8 @@ tgsi_text_translate( ctx.tokens_cur = tokens; ctx.tokens_end = tokens + num_tokens; - return translate( &ctx ); + if (!translate( &ctx )) + return FALSE; + + return tgsi_sanity_check( tokens ); } |