summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 1294a7a98a7..05b711148ce 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -36,6 +36,7 @@
#include "util/u_debug.h"
#include "util/u_math.h"
+#include "util/u_memory.h"
#include "util/u_prim.h"
#include "tgsi/tgsi_parse.h"
#include "tgsi/tgsi_util.h"
@@ -128,6 +129,18 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
if (src->Register.Indirect) {
info->indirect_files |= (1 << src->Register.File);
}
+
+ /* MSAA samplers */
+ if (src->Register.File == TGSI_FILE_SAMPLER) {
+ assert(fullinst->Instruction.Texture);
+ assert(src->Register.Index < Elements(info->is_msaa_sampler));
+
+ if (fullinst->Instruction.Texture &&
+ (fullinst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ||
+ fullinst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA)) {
+ info->is_msaa_sampler[src->Register.Index] = TRUE;
+ }
+ }
}
/* check for indirect register writes */