brw_shader_info.c File Reference

Include dependency graph for brw_shader_info.c:

Go to the source code of this file.

Functions

void brw_shader_info (const struct tgsi_token *tokens, struct brw_shader_info *info)
 XXX this obsolete new and no longer compiled.


Function Documentation

void brw_shader_info ( const struct tgsi_token tokens,
struct brw_shader_info *  info 
)

XXX this obsolete new and no longer compiled.

Definition at line 12 of file brw_shader_info.c.

References tgsi_full_declaration::Declaration, tgsi_full_declaration::DeclarationRange, tgsi_declaration::File, tgsi_full_token::FullDeclaration, tgsi_parse_context::FullToken, tgsi_declaration_range::Last, MAX2, tgsi_parse_end_of_tokens(), tgsi_parse_free(), tgsi_parse_init(), tgsi_parse_token(), TGSI_TOKEN_TYPE_DECLARATION, TGSI_TOKEN_TYPE_IMMEDIATE, TGSI_TOKEN_TYPE_INSTRUCTION, tgsi_full_token::Token, and tgsi_token::Type.

00014 {
00015    struct tgsi_parse_context parse;
00016    int done = 0;
00017 
00018    tgsi_parse_init( &parse, tokens );
00019 
00020    while( !done &&
00021           !tgsi_parse_end_of_tokens( &parse ) ) 
00022    {
00023       tgsi_parse_token( &parse );
00024 
00025       switch( parse.FullToken.Token.Type ) {
00026       case TGSI_TOKEN_TYPE_DECLARATION:
00027       {
00028          const struct tgsi_full_declaration *decl = &parse.FullToken.FullDeclaration;
00029          unsigned last = decl->DeclarationRange.Last;
00030       
00031          // Broken by crazy wpos init:
00032          //assert( info->nr_regs[decl->Declaration.File] <= last);
00033 
00034          info->nr_regs[decl->Declaration.File] = MAX2(info->nr_regs[decl->Declaration.File],
00035                                                       last+1);
00036          break;
00037       }
00038       case TGSI_TOKEN_TYPE_IMMEDIATE:
00039       case TGSI_TOKEN_TYPE_INSTRUCTION:
00040       default:
00041          done = 1;
00042          break;
00043       }
00044    }
00045 
00046    tgsi_parse_free (&parse);
00047    
00048 }


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