tgsi: simplify tgsi_shader_info::is_msaa_sampler checking
authorBrian Paul <brianp@vmware.com>
Tue, 29 Mar 2016 17:43:02 +0000 (11:43 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 30 Mar 2016 00:13:46 +0000 (18:13 -0600)
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.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c

index 6d4b00d8879acf401c7641ba07f93b4bfcd2c4d4..c71c7770bfb4555d64850a0eccc7dae1ec9dfe38 100644 (file)
@@ -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;
          }
       }