Mesa (master): freedreno/a6xx: Remove the "aligned_height" temporary.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 7 18:18:53 UTC 2020


Module: Mesa
Branch: master
Commit: 59a222039860128dc2520fa21d7cddc48c563e2f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=59a222039860128dc2520fa21d7cddc48c563e2f

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 25 14:40:37 2020 -0800

freedreno/a6xx: Remove the "aligned_height" temporary.

Now that we're not incrementally minifying height, we can just modify it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>

---

 src/freedreno/fdl/fd6_layout.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/freedreno/fdl/fd6_layout.c b/src/freedreno/fdl/fd6_layout.c
index fd2ec066577..5a371c173f0 100644
--- a/src/freedreno/fdl/fd6_layout.c
+++ b/src/freedreno/fdl/fd6_layout.c
@@ -132,13 +132,11 @@ fdl6_layout(struct fdl_layout *layout,
 			width = u_minify(width0, level);
 			height = u_minify(height0, level);
 		}
-		uint32_t aligned_height = height;
 		uint32_t pitchalign;
 
 		if (tile_mode) {
 			pitchalign = tile_alignment[ta].pitchalign;
-			aligned_height = align(aligned_height,
-					tile_alignment[ta].heightalign);
+			height = align(height, tile_alignment[ta].heightalign);
 		} else {
 			pitchalign = 64;
 		}
@@ -151,7 +149,7 @@ fdl6_layout(struct fdl_layout *layout,
 		 * may not be:
 		 */
 		if (level == mip_levels - 1)
-			aligned_height = align(aligned_height, 32);
+			height = align(height, 32);
 
 		if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC)
 			slice->pitch =
@@ -161,7 +159,7 @@ fdl6_layout(struct fdl_layout *layout,
 
 		slice->offset = layout->size;
 		uint32_t blocks = util_format_get_nblocks(format,
-				slice->pitch, aligned_height);
+				slice->pitch, height);
 
 		/* 1d array and 2d array textures must all have the same layer size
 		 * for each miplevel on a6xx. 3d textures can have different layer



More information about the mesa-commit mailing list