2 #include "brw_context.h"
4 #include "util/u_memory.h"
5 #include "pipe/p_shader_tokens.h"
6 #include "tgsi/tgsi_parse.h"
10 * XXX this obsolete new and no longer compiled.
12 void brw_shader_info(const struct tgsi_token
*tokens
,
13 struct brw_shader_info
*info
)
15 struct tgsi_parse_context parse
;
18 tgsi_parse_init( &parse
, tokens
);
21 !tgsi_parse_end_of_tokens( &parse
) )
23 tgsi_parse_token( &parse
);
25 switch( parse
.FullToken
.Token
.Type
) {
26 case TGSI_TOKEN_TYPE_DECLARATION
:
28 const struct tgsi_full_declaration
*decl
= &parse
.FullToken
.FullDeclaration
;
29 unsigned last
= decl
->DeclarationRange
.Last
;
31 // Broken by crazy wpos init:
32 //assert( info->nr_regs[decl->Declaration.File] <= last);
34 info
->nr_regs
[decl
->Declaration
.File
] = MAX2(info
->nr_regs
[decl
->Declaration
.File
],
38 case TGSI_TOKEN_TYPE_IMMEDIATE
:
39 case TGSI_TOKEN_TYPE_INSTRUCTION
:
46 tgsi_parse_free (&parse
);