[Mesa-dev] [PATCH 2/2] tgsi: simplify tgsi_shader_info::is_msaa_sampler checking
Brian Paul
brianp at vmware.com
Tue Mar 29 19:41:54 UTC 2016
We assert that fullinst->Instruction.Texture != 0 above so no need to
check it in the conditional. We also have the fullinst->Texture.Texture
value in a local variable, so use it.
---
src/gallium/auxiliary/tgsi/tgsi_scan.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 6d4b00d..c71c777 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -208,9 +208,8 @@ scan_instruction(struct tgsi_shader_info *info,
}
/* MSAA samplers */
- if (fullinst->Instruction.Texture &&
- (fullinst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ||
- fullinst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA)) {
+ if (target == TGSI_TEXTURE_2D_MSAA ||
+ target == TGSI_TEXTURE_2D_ARRAY_MSAA) {
info->is_msaa_sampler[src->Register.Index] = TRUE;
}
}
--
1.9.1
More information about the mesa-dev
mailing list