freedreno: add env var to override tiles-per-pipe
authorRob Clark <robdclark@chromium.org>
Tue, 25 Aug 2020 19:23:38 +0000 (12:23 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 25 Aug 2020 22:20:41 +0000 (22:20 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6461>

src/gallium/drivers/freedreno/freedreno_gmem.c

index 6119f564400c51de3499e8225e489d582ec38920..457a5c8f76c3814f897db5a74a66707651d206bc 100644 (file)
@@ -24,6 +24,7 @@
  *    Rob Clark <robclark@freedesktop.org>
  */
 
+#include "util/debug.h"
 #include "pipe/p_state.h"
 #include "util/hash_table.h"
 #include "util/u_dump.h"
@@ -326,6 +327,11 @@ gmem_stateobj_init(struct fd_screen *screen, struct gmem_key *key)
                        tpp_x += 1;
        }
 
+#ifdef DEBUG
+       tpp_x = env_var_as_unsigned("TPP_X", tpp_x);
+       tpp_y = env_var_as_unsigned("TPP_Y", tpp_x);
+#endif
+
        gmem->maxpw = tpp_x;
        gmem->maxph = tpp_y;