aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_scan.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-03-15 20:54:30 -0500
committerNicolai Hähnle <[email protected]>2016-03-21 15:34:25 -0500
commit79762e877cd9b439d5f7697d3fea8d930ab05646 (patch)
tree38ebf27967bf972a0fa759e151f28f262e13b3a9 /src/gallium/auxiliary/tgsi/tgsi_scan.c
parente9d935ed0e2839d2f07220a9f10477ab3cc79486 (diff)
tgsi/scan: add writes_memory to flag presence of stores or atomics
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 65bdab5b1cd..d32c3a14344 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -196,10 +196,13 @@ scan_instruction(struct tgsi_shader_info *info,
if (is_memory_file(src->Register.File)) {
is_mem_inst = true;
- if (src->Register.File == TGSI_FILE_IMAGE &&
- !src->Register.Indirect &&
- tgsi_get_opcode_info(fullinst->Instruction.Opcode)->is_store)
- info->images_writemask |= 1 << src->Register.Index;
+ if (tgsi_get_opcode_info(fullinst->Instruction.Opcode)->is_store) {
+ info->writes_memory = TRUE;
+
+ if (src->Register.File == TGSI_FILE_IMAGE &&
+ !src->Register.Indirect)
+ info->images_writemask |= 1 << src->Register.Index;
+ }
}
}
@@ -215,6 +218,7 @@ scan_instruction(struct tgsi_shader_info *info,
assert(fullinst->Instruction.Opcode == TGSI_OPCODE_STORE);
is_mem_inst = true;
+ info->writes_memory = TRUE;
if (dst->Register.File == TGSI_FILE_IMAGE &&
!dst->Register.Indirect)