v3d: Add a note for a potential performance win on multop/umul24.
authorEric Anholt <eric@anholt.net>
Wed, 26 Dec 2018 20:54:58 +0000 (12:54 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 30 Dec 2018 16:05:11 +0000 (08:05 -0800)
Noticed while debugging a testcase.

src/broadcom/compiler/vir_to_qpu.c

index 60d39063d538a22244b50a529e03285ebbabb284..c66bb84b3fc735e44c529a672f340bfb6f9b736d 100644 (file)
@@ -241,6 +241,10 @@ v3d_generate_code_block(struct v3d_compile *c,
                                 src[i] = temp_registers[index];
                                 break;
                         case QFILE_UNIF:
+                                /* XXX perf: If the last ldunif we emitted was
+                                 * the same uniform value, skip it.  Common
+                                 * for multop/umul24 sequences.
+                                 */
                                 if (!emitted_ldunif) {
                                         new_ldunif_instr(qinst, i);
                                         c->num_uniforms++;