From 2c21683dfbdd62bb14385487f22434c19febf603 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 21 Dec 2015 15:03:56 +1000 Subject: [PATCH] scan: add ability to find dimension files This adds the ability for the scanner to locate files that need dimensions. Tested-by: Gurchetan Singh Reviewed-by: Gurchetan Singh --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 5 +++++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 2 ++ 2 files changed, 7 insertions(+) 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_ */ /**