diff options
author | Icecream95 <ixn@disroot.org> | 2022-04-15 23:50:33 +1200 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-04-20 21:44:49 -0700 |
commit | 62b00f70fdc4338170352346acb4f95a3e30af48 (patch) | |
tree | b61655385fae2651921798ee37a1a1a473d2118a | |
parent | ff76add8055f36d4145092afde243afa2737e05e (diff) |
panfrost: Stop overallocating compressed textures
The line stride uses the number of bytes in the entire block, so both
the width and height need to be reduced for compressed textures so
that the surface stride is calculated correctly.
Fixes: 051d62cf041 ("panfrost: Add a pan_image_layout_init() helper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6286
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15989>
(cherry picked from commit f267000240b629c48d4935ff38bbe70fe85435ce)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/panfrost/lib/pan_texture.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 89be4fa3290..3d605be27db 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1426,7 +1426,7 @@ "description": "panfrost: Stop overallocating compressed textures", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "051d62cf041054bf0fdbd0ae5d2160d1b02e0203" }, diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 9a9b5a6d7d5..c5a4e1cecbf 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -202,7 +202,7 @@ pan_image_layout_init(const struct panfrost_device *dev, if (should_align) { effective_width = ALIGN_POT(effective_width, tile_w) >> tile_shift; - effective_height = ALIGN_POT(effective_height, tile_h); + effective_height = ALIGN_POT(effective_height, tile_h) >> tile_shift; /* We don't need to align depth */ } |