*/
while( !tgsi_parse_end_of_tokens( &parse ) ) {
+ info->num_tokens++;
+
tgsi_parse_token( &parse );
switch( parse.FullToken.Token.Type ) {
for (i = fulldecl->u.DeclarationRange.First;
i <= fulldecl->u.DeclarationRange.Last;
i++) {
+
+ /* only first 32 regs will appear in this bitfield */
info->file_mask[file] |= (1 << i);
info->file_count[file]++;
+ if (file == TGSI_FILE_INPUT) {
+ info->input_semantic_name[info->num_inputs]
+ = fulldecl->Semantic.SemanticName;
+ info->input_semantic_index[info->num_inputs]
+ = fulldecl->Semantic.SemanticIndex;
+ info->num_inputs++;
+ }
+
+ if (file == TGSI_FILE_OUTPUT) {
+ info->output_semantic_name[info->num_outputs]
+ = fulldecl->Semantic.SemanticName;
+ info->output_semantic_index[info->num_outputs]
+ = fulldecl->Semantic.SemanticIndex;
+ info->num_outputs++;
+ }
+
/* special case */
if (procType == TGSI_PROCESSOR_FRAGMENT &&
file == TGSI_FILE_OUTPUT &&
#include "pipe/p_util.h"
+#include "pipe/p_state.h"
#include "pipe/p_shader_tokens.h"
*/
struct tgsi_shader_info
{
+ uint num_tokens;
+
+ /* XXX eventually remove the corresponding fields from pipe_shader_state: */
+ ubyte num_inputs;
+ ubyte num_outputs;
+ ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
+ ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+ ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
+ ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
+
uint file_mask[TGSI_FILE_COUNT]; /**< bitmask of declared registers */
uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */