diff options
author | Keith Whitwell <[email protected]> | 2009-09-12 14:05:37 -0700 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-09-12 14:05:37 -0700 |
commit | e90fb86ac3f3a000c91d2cd9fab2bf27d4ede0e7 (patch) | |
tree | aff6fcd0a851fc4a3f54ac3f7d40f8d698097c41 /src | |
parent | 983b261e6d85020ae19418428d25f2e70f43d7dd (diff) |
tgsi: sanity check ureg programs
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index f7096bd8e2c..0780e2e0635 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -31,6 +31,7 @@ #include "tgsi/tgsi_ureg.h" #include "tgsi/tgsi_info.h" #include "tgsi/tgsi_dump.h" +#include "tgsi/tgsi_sanity.h" #include "util/u_memory.h" #include "util/u_math.h" @@ -890,6 +891,15 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg ) ureg->domain[DOMAIN_DECL].count); tgsi_dump( tokens, 0 ); } + +#if DEBUG + if (tokens && !tgsi_sanity_check(tokens)) { + debug_printf("tgsi_ureg.c, sanity check failed on generated tokens:\n"); + tgsi_dump(tokens, 0); + assert(0); + } +#endif + return tokens; } |