diff options
author | Rob Clark <[email protected]> | 2019-07-24 14:28:10 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-08-02 10:24:14 -0700 |
commit | 1cbb7f7601a666be4ab4e243bd2263f9e86a4780 (patch) | |
tree | 5862e1b2e500f9caf425196491ac7891b7735b76 /src/gallium/drivers/freedreno/freedreno_gmem.c | |
parent | 44f3c1cf01167c599d40f6ac35152b406cfbd51d (diff) |
freedreno: refresh tile debug
Fix some #ifdef'd bitrot, and get rid of #ifdef so it doesn't bitrot
again.
And add a prints for per-tile state.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_gmem.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index f400f256a27..2f939b34ca9 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -66,6 +66,8 @@ * resolve. */ +#define BIN_DEBUG 0 + static uint32_t bin_width(struct fd_screen *screen) { if (is_a4xx(screen) || is_a5xx(screen) || is_a6xx(screen)) @@ -278,14 +280,14 @@ calculate_tiles(struct fd_batch *batch) pipe->x = pipe->y = pipe->w = pipe->h = 0; } -#if 0 /* debug */ - printf("%dx%d ... tpp=%dx%d\n", nbins_x, nbins_y, tpp_x, tpp_y); - for (i = 0; i < 8; i++) { - struct fd_vsc_pipe *pipe = &ctx->pipe[i]; - printf("pipe[%d]: %ux%u @ %u,%u\n", i, - pipe->w, pipe->h, pipe->x, pipe->y); + if (BIN_DEBUG) { + printf("%dx%d ... tpp=%dx%d\n", nbins_x, nbins_y, tpp_x, tpp_y); + for (i = 0; i < ARRAY_SIZE(ctx->vsc_pipe); i++) { + struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i]; + printf("pipe[%d]: %ux%u @ %u,%u\n", i, + pipe->w, pipe->h, pipe->x, pipe->y); + } } -#endif /* configure tiles: */ t = 0; @@ -319,6 +321,11 @@ calculate_tiles(struct fd_batch *batch) tile->xoff = xoff; tile->yoff = yoff; + if (BIN_DEBUG) { + printf("tile[%d]: p=%u, bin=%ux%u+%u+%u\n", t, + p, bw, bh, xoff, yoff); + } + t++; xoff += bw; @@ -327,16 +334,16 @@ calculate_tiles(struct fd_batch *batch) yoff += bh; } -#if 0 /* debug */ - t = 0; - for (i = 0; i < nbins_y; i++) { - for (j = 0; j < nbins_x; j++) { - struct fd_tile *tile = &ctx->tile[t++]; - printf("|p:%u n:%u|", tile->p, tile->n); + if (BIN_DEBUG) { + t = 0; + for (i = 0; i < nbins_y; i++) { + for (j = 0; j < nbins_x; j++) { + struct fd_tile *tile = &ctx->tile[t++]; + printf("|p:%u n:%u|", tile->p, tile->n); + } + printf("\n"); } - printf("\n"); } -#endif } static void |