diff options
author | Marek Olšák <[email protected]> | 2013-08-06 06:35:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-08-15 02:03:02 +0200 |
commit | 128819d394fa722acb73e248a9adce585b4ef061 (patch) | |
tree | 464046e845b20d52f4c6bdb1c5e8e2bbdf0e05eb /src/gallium | |
parent | 0ee4bae70d188118417c50ba223fe3638a85b8ce (diff) |
tgsi: add info about MSAA samplers to tgsi_shader_info
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 13 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 |
2 files changed, 14 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 */ diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index e2fa73a3fa7..d9147bd5bd9 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -80,6 +80,7 @@ struct tgsi_shader_info boolean color0_writes_all_cbufs; boolean writes_viewport_index; boolean writes_layer; + boolean is_msaa_sampler[PIPE_MAX_SAMPLERS]; unsigned num_written_culldistance; unsigned num_written_clipdistance; |