Mesa (master): vc4: Re-add R4 to the "any" register class.

Eric Anholt anholt at kemper.freedesktop.org
Wed Nov 23 00:47:32 UTC 2016


Module: Mesa
Branch: master
Commit: 1f0ba902f0ef87e182e50b7e19a406b0936f5293
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f0ba902f0ef87e182e50b7e19a406b0936f5293

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Nov 21 23:29:04 2016 -0800

vc4: Re-add R4 to the "any" register class.

I screwed this up in fdad4d24024ab7bc9b6b9cb6288f8b76ccac0d89 which was
supposed to be making this code more maintainable.  What's amazing is
multithreaded FS showed the wins it did despite this bug.

shader-db results:
total instructions in shared programs: 103535 -> 100548 (-2.89%)
instructions in affected programs:     83794 -> 80807 (-3.56%)

---

 src/gallium/drivers/vc4/vc4_register_allocate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_register_allocate.c b/src/gallium/drivers/vc4/vc4_register_allocate.c
index 247467b..2992a6b 100644
--- a/src/gallium/drivers/vc4/vc4_register_allocate.c
+++ b/src/gallium/drivers/vc4/vc4_register_allocate.c
@@ -141,6 +141,8 @@ vc4_alloc_reg_set(struct vc4_context *vc4)
         for (int i = 0; i < 2; i++) {
                 ra_class_add_reg(vc4->regs, vc4->reg_class_r4_or_a[i],
                                  ACC_INDEX + 4);
+                ra_class_add_reg(vc4->regs, vc4->reg_class_any[i],
+                                 ACC_INDEX + 4);
         }
 
         /* A/B */




More information about the mesa-commit mailing list