mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
tgsi: track max array per file
NOTE IN[] and OUT[] don't need (have?) ArrayID's.. and TEMP[] can optionally have them. So we implicitly assume that ArrayID==0 always exists for each file. This is why array_max[file] is never less than zero. You can tell from indirect_files(_read/written) if the legacy array- id zero was actually used. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
49b4a6331f
commit
18899d1b80
2 changed files with 4 additions and 0 deletions
|
|
@ -165,6 +165,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
|||
= &parse.FullToken.FullDeclaration;
|
||||
const uint file = fulldecl->Declaration.File;
|
||||
uint reg;
|
||||
if (fulldecl->Declaration.Array)
|
||||
info->array_max[file] = MAX2(info->array_max[file], fulldecl->Array.ArrayID);
|
||||
for (reg = fulldecl->Range.First;
|
||||
reg <= fulldecl->Range.Last;
|
||||
reg++) {
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ struct tgsi_shader_info
|
|||
int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */
|
||||
int const_file_max[PIPE_MAX_CONSTANT_BUFFERS];
|
||||
|
||||
unsigned array_max[TGSI_FILE_COUNT]; /**< highest index array per register file */
|
||||
|
||||
uint immediate_count; /**< number of immediates declared */
|
||||
uint num_instructions;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue