Mesa (master): lima: always set stride in texture descriptor

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 2 17:02:48 UTC 2021


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

Author: Erico Nunes <nunes.erico at gmail.com>
Date:   Mon Feb  1 01:27:50 2021 +0100

lima: always set stride in texture descriptor

We can just always specify the stride parameter regardless of whether
an alignment was forced or not. This fixes some issues where it is not
straightforward to detect the need to specify stride by checking the
buffer width (e.g. imported dmabuf to be used as texture).

Signed-off-by: Erico Nunes <nunes.erico at gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8549>

---

 src/gallium/drivers/lima/lima_texture.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/lima/lima_texture.c b/src/gallium/drivers/lima/lima_texture.c
index 4ac363178a9..7079865a3b5 100644
--- a/src/gallium/drivers/lima/lima_texture.c
+++ b/src/gallium/drivers/lima/lima_texture.c
@@ -91,11 +91,8 @@ lima_texture_desc_set_res(struct lima_context *ctx, lima_tex_desc *desc,
    if (lima_res->tiled)
       layout = 3;
    else {
-      /* for padded linear texture */
-      if (lima_res->levels[first_level].width != width) {
-         desc->stride = lima_res->levels[first_level].stride;
-         desc->has_stride = 1;
-      }
+      desc->stride = lima_res->levels[first_level].stride;
+      desc->has_stride = 1;
       layout = 0;
    }
 



More information about the mesa-commit mailing list