From: Marek Olšák Date: Wed, 19 Oct 2016 22:57:07 +0000 (+0200) Subject: tgsi/scan: get information about indirect 2D file access X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f095a4eb171aadf525198e6583a1796ffe5a07b7;p=mesa.git tgsi/scan: get information about indirect 2D file access Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 0c810053fe5..e5edea8657b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -285,6 +285,9 @@ scan_instruction(struct tgsi_shader_info *info, } } + if (src->Register.Dimension && src->Dimension.Indirect) + info->dim_indirect_files |= 1u << src->Register.File; + /* Texture samplers */ if (src->Register.File == TGSI_FILE_SAMPLER) { const unsigned index = src->Register.Index; @@ -338,6 +341,9 @@ scan_instruction(struct tgsi_shader_info *info, info->indirect_files_written |= (1 << dst->Register.File); } + if (dst->Register.Dimension && dst->Dimension.Indirect) + info->dim_indirect_files |= 1u << dst->Register.File; + if (is_memory_file(dst->Register.File)) { assert(fullinst->Instruction.Opcode == TGSI_OPCODE_STORE); diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 2e61dc76842..47528d5f12d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -142,6 +142,7 @@ struct tgsi_shader_info */ unsigned indirect_files_read; unsigned indirect_files_written; + unsigned dim_indirect_files; /**< shader resource indexing */ unsigned const_buffers_indirect; /**< const buffers using indirect addressing */ unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */