scan: add ability to find dimension files

This adds the ability for the scanner to locate files
that need dimensions.

Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Dave Airlie 9 years ago
parent 1022754ca1
commit 2c21683dfb
  1. 5
      src/gallium/auxiliary/tgsi/tgsi_scan.c
  2. 2
      src/gallium/auxiliary/tgsi/tgsi_scan.h

@ -203,6 +203,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->indirect_files_read |= (1 << src->Register.File);
}
if (src->Register.Dimension && src->Dimension.Indirect) {
info->dimension_indirect_files |= (1 << src->Register.File);
}
/* MSAA samplers */
if (src->Register.File == TGSI_FILE_SAMPLER) {
assert(fullinst->Instruction.Texture);
@ -223,6 +226,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->indirect_files |= (1 << dst->Register.File);
info->indirect_files_written |= (1 << dst->Register.File);
}
if (dst->Register.Dimension && dst->Dimension.Indirect)
info->dimension_indirect_files |= (1 << dst->Register.File);
}
info->num_instructions++;

@ -125,6 +125,8 @@ struct tgsi_shader_info
unsigned indirect_files_read;
unsigned indirect_files_written;
unsigned dimension_indirect_files;
unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
/**

Loading…
Cancel
Save