tgsi/scan: add info about declared samplers (v2)

v2: get it from declarations, not instructions
This commit is contained in:
Marek Olšák
2015-10-05 00:08:30 +02:00
parent 417927ebde
commit c80c19a9d5
2 changed files with 3 additions and 0 deletions

View File

@@ -409,6 +409,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->writes_edgeflag = TRUE;
}
}
} else if (file == TGSI_FILE_SAMPLER) {
info->samplers_declared |= 1 << reg;
}
}
}

View File

@@ -64,6 +64,7 @@ struct tgsi_shader_info
uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */
int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */
int const_file_max[PIPE_MAX_CONSTANT_BUFFERS];
unsigned samplers_declared; /**< bitmask of declared samplers */
ubyte input_array_first[PIPE_MAX_SHADER_INPUTS];
ubyte input_array_last[PIPE_MAX_SHADER_INPUTS];