ac/nir: Remove stale TODO
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 5 Jun 2019 14:54:24 +0000 (16:54 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Thu, 6 Jun 2019 15:14:28 +0000 (17:14 +0200)
While we're here, copy the comment explaining this from radeonsi.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_nir_to_llvm.c

index dd673cf5ea0e43a59f0f561c1e52858e82901b9e..360e139bf5f25b94a7e0ca55bf72a59212fcd7e2 100644 (file)
@@ -3895,7 +3895,13 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)
                args.offset = NULL;
        }
 
-       /* TODO TG4 support */
+       /* DMASK was repurposed for GATHER4. 4 components are always
+        * returned and DMASK works like a swizzle - it selects
+        * the component to fetch. The only valid DMASK values are
+        * 1=red, 2=green, 4=blue, 8=alpha. (e.g. 1 returns
+        * (red,red,red,red) etc.) The ISA document doesn't mention
+        * this.
+        */
        args.dmask = 0xf;
        if (instr->op == nir_texop_tg4) {
                if (instr->is_shadow)