tgsi_sanity.h File Reference

Include dependency graph for tgsi_sanity.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

boolean tgsi_sanity_check (struct tgsi_token *tokens)


Function Documentation

boolean tgsi_sanity_check ( struct tgsi_token tokens  ) 

Definition at line 342 of file tgsi_sanity.c.

References CALLOC_STRUCT, epilog(), tgsi_iterate_context::epilog, sanity_check_ctx::errors, FALSE, FREE, sanity_check_ctx::index_of_END, sanity_check_ctx::iter, iter_declaration(), iter_immediate(), iter_instruction(), tgsi_iterate_context::iterate_declaration, tgsi_iterate_context::iterate_immediate, tgsi_iterate_context::iterate_instruction, sanity_check_ctx::num_imms, sanity_check_ctx::num_instructions, tgsi_iterate_context::prolog, sanity_check_ctx::regs_decl, sanity_check_ctx::regs_ind_used, sanity_check_ctx::regs_used, tgsi_iterate_shader(), and sanity_check_ctx::warnings.

00344 {
00345    struct sanity_check_ctx *ctx;
00346    boolean ret;
00347    
00348    ctx = CALLOC_STRUCT(sanity_check_ctx);
00349    if(!ctx)
00350       return FALSE;
00351    
00352    ctx->iter.prolog = NULL;
00353    ctx->iter.iterate_instruction = iter_instruction;
00354    ctx->iter.iterate_declaration = iter_declaration;
00355    ctx->iter.iterate_immediate = iter_immediate;
00356    ctx->iter.epilog = epilog;
00357 
00358    memset( ctx->regs_decl, 0, sizeof( ctx->regs_decl ) );
00359    memset( ctx->regs_used, 0, sizeof( ctx->regs_used ) );
00360    memset( ctx->regs_ind_used, 0, sizeof( ctx->regs_ind_used ) );
00361    ctx->num_imms = 0;
00362    ctx->num_instructions = 0;
00363    ctx->index_of_END = ~0;
00364 
00365    ctx->errors = 0;
00366    ctx->warnings = 0;
00367 
00368    ret = tgsi_iterate_shader( tokens, &ctx->iter ) && 
00369          (ctx->errors == 0);
00370  
00371    FREE(ctx);
00372 
00373    return ret;
00374 }


Generated on Tue Sep 29 06:25:26 2009 for Gallium3D by  doxygen 1.5.4