v3d: Add a note about i/o indirection for future performance work.
authorEric Anholt <eric@anholt.net>
Mon, 22 Apr 2019 17:40:47 +0000 (10:40 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 26 Apr 2019 19:42:30 +0000 (12:42 -0700)
src/broadcom/compiler/nir_to_vir.c

index 30fd4002ef9bed7ac9fe16d10202bbda11b2423e..3fa2e1de953f2d172c7c85ada61165a3f02b64c4 100644 (file)
@@ -1737,6 +1737,9 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
                 break;
 
         case nir_intrinsic_load_input:
+                /* Use ldvpmv (uniform offset) or ldvpmd (non-uniform offset)
+                 * and enable PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR.
+                 */
                 offset = (nir_intrinsic_base(instr) +
                           nir_src_as_uint(instr->src[0]));
                 if (c->s->info.stage != MESA_SHADER_FRAGMENT &&
@@ -1778,6 +1781,10 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
                 break;
 
         case nir_intrinsic_store_output:
+                /* XXX perf: Use stvpmv with uniform non-constant offsets and
+                 * stvpmd with non-uniform offsets and enable
+                 * PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR.
+                 */
                 if (c->s->info.stage == MESA_SHADER_FRAGMENT) {
                         offset = ((nir_intrinsic_base(instr) +
                                    nir_src_as_uint(instr->src[1])) * 4 +