lima: fix stride in texture descriptor
authorArno Messiaen <arnomessiaen@gmail.com>
Sun, 29 Sep 2019 21:21:39 +0000 (23:21 +0200)
committerVasily Khoruzhick <anarsoul@gmail.com>
Thu, 31 Oct 2019 06:29:31 +0000 (06:29 +0000)
Signed-off-by: Arno Messiaen <arnomessiaen@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
src/gallium/drivers/lima/lima_texture.c
src/gallium/drivers/lima/lima_texture.h

index a259a1c7b7a1691277c9a6020e5cc099e819ef0e..b25d84ec20f87a06c357adfcb3b74c92a47f790b 100644 (file)
@@ -89,7 +89,7 @@ lima_texture_desc_set_res(struct lima_context *ctx, lima_tex_desc *desc,
    else {
       /* for padded linear texture */
       if (lima_res->levels[first_level].width != width) {
-         desc->stride = lima_res->levels[first_level].width;
+         desc->stride = lima_res->levels[first_level].stride;
          desc->has_stride = 1;
       }
       layout = 0;
index 82e65df70deb5d4bbb2c8920cc922e1c65589bd6..e9b896763eae28af7a87ab62572c1f4aa9472694 100644 (file)
@@ -32,8 +32,8 @@ typedef struct __attribute__((__packed__)) {
    uint32_t format : 6;
    uint32_t flag1: 1;
    uint32_t swap_r_b: 1;
-   uint32_t unknown_0_1: 10;
-   uint32_t stride: 13;
+   uint32_t unknown_0_1: 8;
+   uint32_t stride: 15;
    uint32_t unknown_0_2: 1;
 
    /* Word 1-3 */