summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-06-09 13:36:24 -0400
committerRob Clark <[email protected]>2014-06-13 15:20:34 -0400
commit3394900dd33fbbe98a639e4e7945c0e6c2d9fc2b (patch)
tree5686364f6ba7779df4176d3288a5121d87f5df43 /src/gallium/drivers
parent6aeeb706d218be030b39e431e53ec07edb974564 (diff)
freedreno: try for more squarish tile dimensions
Worth about ~0.5fps in xonotic, for example. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_gmem.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 861ebf5675e..661458fe0aa 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -128,11 +128,17 @@ calculate_tiles(struct fd_context *ctx)
bin_w = align(width / nbins_x, 32);
}
- /* then find a bin height that satisfies the memory constraints:
+ /* then find a bin width/height that satisfies the memory
+ * constraints:
*/
while ((bin_w * bin_h * cpp) > gmem_size) {
- nbins_y++;
- bin_h = align(height / nbins_y, 32);
+ if (bin_w > bin_h) {
+ nbins_x++;
+ bin_w = align(width / nbins_x, 32);
+ } else {
+ nbins_y++;
+ bin_h = align(height / nbins_y, 32);
+ }
}
DBG("using %d bins of size %dx%d", nbins_x*nbins_y, bin_w, bin_h);