diff options
author | Dave Airlie <airlied@redhat.com> | 2015-12-21 15:03:56 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-01-18 15:33:57 +1000 |
commit | f57006b1800481af154a529acd07d29bd70c142d (patch) | |
tree | d6331753c95b3e7fa5e9ad9cceb0113c1c7a63c8 | |
parent | 0e60c8568970b75f8b7da2b4f029f08b9907fc4e (diff) |
scan: add ability to find dimension files
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index e04f407..40f3db8 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -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++; diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 7e9a559..0849add 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -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_ */ /** |