agx: Fix AGX_MESA_DEBUG=demand
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 30 Jul 2023 20:08:35 +0000 (16:08 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:27 +0000 (20:31 +0000)
No wonder it seemed like it wasn't doing anything!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>

src/asahi/compiler/agx_register_allocate.c

index f3a0a56..3d2b315 100644 (file)
@@ -1108,7 +1108,7 @@ agx_ra(agx_context *ctx)
 
    /* Or, we can bound tightly for debugging */
    if (agx_compiler_debug & AGX_DBG_DEMAND)
-      max_regs = ALIGN_POT(MAX2(max_regs, 12), 8);
+      max_regs = ALIGN_POT(MAX2(demand, 12), 8);
 
    /* ...but not too tightly */
    assert((max_regs % 8) == 0 && "occupancy limits are 8 register aligned");