1 #if !defined TGSI_PARSE_H
4 #include "pipe/p_shader_tokens.h"
6 #if defined __cplusplus
10 struct tgsi_full_version
12 struct tgsi_version Version
;
15 struct tgsi_full_header
17 struct tgsi_header Header
;
18 struct tgsi_processor Processor
;
21 struct tgsi_full_dst_register
23 struct tgsi_dst_register DstRegister
;
24 struct tgsi_dst_register_ext_concode DstRegisterExtConcode
;
25 struct tgsi_dst_register_ext_modulate DstRegisterExtModulate
;
28 struct tgsi_full_src_register
30 struct tgsi_src_register SrcRegister
;
31 struct tgsi_src_register_ext_swz SrcRegisterExtSwz
;
32 struct tgsi_src_register_ext_mod SrcRegisterExtMod
;
33 struct tgsi_src_register SrcRegisterInd
;
34 struct tgsi_dimension SrcRegisterDim
;
35 struct tgsi_src_register SrcRegisterDimInd
;
38 struct tgsi_full_declaration
40 struct tgsi_declaration Declaration
;
43 struct tgsi_declaration_range DeclarationRange
;
44 struct tgsi_declaration_mask DeclarationMask
;
46 struct tgsi_declaration_interpolation Interpolation
;
47 struct tgsi_declaration_semantic Semantic
;
50 struct tgsi_full_immediate
52 struct tgsi_immediate Immediate
;
56 const struct tgsi_immediate_float32
*ImmediateFloat32
;
60 #define TGSI_FULL_MAX_DST_REGISTERS 2
61 #define TGSI_FULL_MAX_SRC_REGISTERS 4 /* TXD has 4 */
63 struct tgsi_full_instruction
65 struct tgsi_instruction Instruction
;
66 struct tgsi_instruction_ext_nv InstructionExtNv
;
67 struct tgsi_instruction_ext_label InstructionExtLabel
;
68 struct tgsi_instruction_ext_texture InstructionExtTexture
;
69 struct tgsi_full_dst_register FullDstRegisters
[TGSI_FULL_MAX_DST_REGISTERS
];
70 struct tgsi_full_src_register FullSrcRegisters
[TGSI_FULL_MAX_SRC_REGISTERS
];
75 struct tgsi_token Token
;
76 struct tgsi_full_declaration FullDeclaration
;
77 struct tgsi_full_immediate FullImmediate
;
78 struct tgsi_full_instruction FullInstruction
;
83 union tgsi_full_token
*full_token
);
87 union tgsi_full_token
*full_token
);
89 struct tgsi_parse_context
91 const struct tgsi_token
*Tokens
;
93 struct tgsi_full_version FullVersion
;
94 struct tgsi_full_header FullHeader
;
95 union tgsi_full_token FullToken
;
98 #define TGSI_PARSE_OK 0
99 #define TGSI_PARSE_ERROR 1
103 struct tgsi_parse_context
*ctx
,
104 const struct tgsi_token
*tokens
);
108 struct tgsi_parse_context
*ctx
);
111 tgsi_parse_end_of_tokens(
112 struct tgsi_parse_context
*ctx
);
116 struct tgsi_parse_context
*ctx
);
119 tgsi_num_tokens(const struct tgsi_token
*tokens
);
122 #if defined __cplusplus
126 #endif /* TGSI_PARSE_H */