Mesa (master): tgsi/scan: add tgsi_shader_info::msaa_images_declared
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 9 21:14:17 UTC 2019
Module: Mesa
Branch: master
Commit: 279da8a2011d0d81449e059a08c912e8004ae291
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=279da8a2011d0d81449e059a08c912e8004ae291
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Sep 12 21:09:19 2019 -0400
tgsi/scan: add tgsi_shader_info::msaa_images_declared
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
---
src/gallium/auxiliary/tgsi/tgsi_scan.c | 17 +++++++++++++++++
src/gallium/auxiliary/tgsi/tgsi_scan.h | 2 ++
2 files changed, 19 insertions(+)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index e1247c3da26..0cd4a8883ae 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -293,6 +293,15 @@ scan_src_operand(struct tgsi_shader_info *info,
!is_mem_query_inst(fullinst->Instruction.Opcode)) {
*is_mem_inst = true;
+ if (src->Register.File == TGSI_FILE_IMAGE &&
+ (fullinst->Memory.Texture == TGSI_TEXTURE_2D_MSAA ||
+ fullinst->Memory.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA)) {
+ if (src->Register.Indirect)
+ info->msaa_images_declared = info->images_declared;
+ else
+ info->msaa_images_declared |= 1 << src->Register.Index;
+ }
+
if (tgsi_get_opcode_info(fullinst->Instruction.Opcode)->is_store) {
info->writes_memory = TRUE;
@@ -560,6 +569,14 @@ scan_instruction(struct tgsi_shader_info *info,
info->writes_memory = TRUE;
if (dst->Register.File == TGSI_FILE_IMAGE) {
+ if (fullinst->Memory.Texture == TGSI_TEXTURE_2D_MSAA ||
+ fullinst->Memory.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA) {
+ if (dst->Register.Indirect)
+ info->msaa_images_declared = info->images_declared;
+ else
+ info->msaa_images_declared |= 1 << dst->Register.Index;
+ }
+
if (dst->Register.Indirect)
info->images_store = info->images_declared;
else
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index a2938e5fd38..c446ee5e65a 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -144,6 +144,8 @@ struct tgsi_shader_info
unsigned num_written_clipdistance;
unsigned images_declared; /**< bitmask of declared images */
+ unsigned msaa_images_declared; /**< bitmask of declared MSAA images */
+
/**
* Bitmask indicating which declared image is a buffer.
*/
More information about the mesa-commit
mailing list