diff options
author | Rob Clark <[email protected]> | 2017-05-06 14:00:35 -0400 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-08 11:32:49 +0100 |
commit | 639481e3406d1a76472387eb483a554342ba4391 (patch) | |
tree | 71cdbe82e6d72471d6f55217ebdd3d03cc2fc66f /src/gallium | |
parent | ee0254a12fb1cdadcd263ee77b4c25c055100561 (diff) |
freedreno/a3xx: fix hang w/ large render targets and small gmem
Possibly other gen's have a similar limit. Fixes glmark2 -b shadow
with larger resolutions on devices with small gmem (for example,
fullscreen 1080p on 8x16/db410c).
Cc: [email protected]
Signed-off-by: Rob Clark <[email protected]>
(cherry picked from commit 6050d5bf3d8d0043386de35cad4efa77e8be957e)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 493fdd29e5c..0ec769b9d6d 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -149,6 +149,9 @@ use_hw_binning(struct fd_batch *batch) if (gmem->minx || gmem->miny) return false; + if ((gmem->maxpw * gmem->maxph) > 32) + return false; + return fd_binning_enabled && ((gmem->nbins_x * gmem->nbins_y) > 2); } diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index d9f707d9c9a..dc8619248ba 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -219,6 +219,9 @@ calculate_tiles(struct fd_batch *batch) div_round_up(nbins_x, tpp_x)) > 8) tpp_x += 1; + gmem->maxpw = tpp_x; + gmem->maxph = tpp_y; + /* configure pipes: */ xoff = yoff = 0; for (i = 0; i < ARRAY_SIZE(ctx->pipe); i++) { diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.h b/src/gallium/drivers/freedreno/freedreno_gmem.h index 6598ea9cc8b..07e13f57328 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.h +++ b/src/gallium/drivers/freedreno/freedreno_gmem.h @@ -57,6 +57,7 @@ struct fd_gmem_stateobj { uint16_t bin_w, nbins_x; uint16_t minx, miny; uint16_t width, height; + uint16_t maxpw, maxph; /* maximum pipe width/height */ }; struct fd_batch; |