|
|
@ -531,6 +531,7 @@ tgsi_sanity_check( |
|
|
|
const struct tgsi_token *tokens ) |
|
|
|
const struct tgsi_token *tokens ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct sanity_check_ctx ctx; |
|
|
|
struct sanity_check_ctx ctx; |
|
|
|
|
|
|
|
boolean retval; |
|
|
|
|
|
|
|
|
|
|
|
ctx.iter.prolog = NULL; |
|
|
|
ctx.iter.prolog = NULL; |
|
|
|
ctx.iter.iterate_instruction = iter_instruction; |
|
|
|
ctx.iter.iterate_instruction = iter_instruction; |
|
|
@ -552,11 +553,12 @@ tgsi_sanity_check( |
|
|
|
ctx.implied_array_size = 0; |
|
|
|
ctx.implied_array_size = 0; |
|
|
|
ctx.print = debug_get_option_print_sanity(); |
|
|
|
ctx.print = debug_get_option_print_sanity(); |
|
|
|
|
|
|
|
|
|
|
|
if (!tgsi_iterate_shader( tokens, &ctx.iter )) |
|
|
|
retval = tgsi_iterate_shader( tokens, &ctx.iter ); |
|
|
|
return FALSE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
regs_hash_destroy(ctx.regs_decl); |
|
|
|
regs_hash_destroy(ctx.regs_decl); |
|
|
|
regs_hash_destroy(ctx.regs_used); |
|
|
|
regs_hash_destroy(ctx.regs_used); |
|
|
|
regs_hash_destroy(ctx.regs_ind_used); |
|
|
|
regs_hash_destroy(ctx.regs_ind_used); |
|
|
|
|
|
|
|
if (retval == FALSE) |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
|
|
|
|
return ctx.errors == 0; |
|
|
|
return ctx.errors == 0; |
|
|
|
} |
|
|
|
} |
|
|
|