diff options
author | Marek Olšák <[email protected]> | 2016-11-16 00:47:35 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-03 15:29:30 +0100 |
commit | 455c79b24f91fbceaed57d49718fa198e2a6b0ff (patch) | |
tree | e15fdd51cef17e6e18e6def4b7bb38555dc60139 /src/gallium/auxiliary/tgsi/tgsi_scan.c | |
parent | 3958c0176267315132a83b26b9c98f93a16c6994 (diff) |
tgsi/scan: record load/store/atomic image usage
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 7d5496c9603..99799fa16e2 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -283,9 +283,9 @@ scan_src_operand(struct tgsi_shader_info *info, if (src->Register.File == TGSI_FILE_IMAGE) { if (src->Register.Indirect) - info->images_writemask = info->images_declared; + info->images_atomic = info->images_declared; else - info->images_writemask |= 1 << src->Register.Index; + info->images_atomic |= 1 << src->Register.Index; } else if (src->Register.File == TGSI_FILE_BUFFER) { if (src->Register.Indirect) info->shader_buffers_atomic = info->shader_buffers_declared; @@ -293,7 +293,12 @@ scan_src_operand(struct tgsi_shader_info *info, info->shader_buffers_atomic |= 1 << src->Register.Index; } } else { - if (src->Register.File == TGSI_FILE_BUFFER) { + if (src->Register.File == TGSI_FILE_IMAGE) { + if (src->Register.Indirect) + info->images_load = info->images_declared; + else + info->images_load |= 1 << src->Register.Index; + } else if (src->Register.File == TGSI_FILE_BUFFER) { if (src->Register.Indirect) info->shader_buffers_load = info->shader_buffers_declared; else @@ -425,9 +430,9 @@ scan_instruction(struct tgsi_shader_info *info, if (dst->Register.File == TGSI_FILE_IMAGE) { if (dst->Register.Indirect) - info->images_writemask = info->images_declared; + info->images_store = info->images_declared; else - info->images_writemask |= 1 << dst->Register.Index; + info->images_store |= 1 << dst->Register.Index; } else if (dst->Register.File == TGSI_FILE_BUFFER) { if (dst->Register.Indirect) info->shader_buffers_store = info->shader_buffers_declared; |