diff options
author | Marek Olšák <[email protected]> | 2016-10-20 00:57:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-24 21:41:28 +0200 |
commit | f095a4eb171aadf525198e6583a1796ffe5a07b7 (patch) | |
tree | f148c9f7cbb6d51b61799c2fbacb47e38d195c77 /src/gallium/auxiliary/tgsi | |
parent | 965a5f181047846b081bf1d510ddc4e5424f6b32 (diff) |
tgsi/scan: get information about indirect 2D file access
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 |
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 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_ */ |