broadcom/vc5: Fix height padding of small UIF slices.
authorEric Anholt <eric@anholt.net>
Thu, 2 Nov 2017 18:47:30 +0000 (11:47 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 7 Nov 2017 17:40:24 +0000 (09:40 -0800)
The HW doesn't pad the slice's height to make a full 4x4 group of UIF
blocks.  We just need to pad to columns, and the start of the next column
appears in the bottom of the previous column's last block.

Fixes piglit fs-textureOffset-2D.

src/gallium/drivers/vc5/vc5_resource.c

index ffd5abac35b6b5c583c1fff1dc2f532fef8541f1..c4d4e8c2347142f8f122f3a6b78987c3b8e7fd70 100644 (file)
@@ -462,10 +462,14 @@ vc5_setup_slices(struct vc5_resource *rsc)
                         } else {
                                 slice->tiling = VC5_TILING_UIF_NO_XOR;
 
+                                /* We align the width to a 4-block column of
+                                 * UIF blocks, but we only align height to UIF
+                                 * blocks.
+                                 */
                                 level_width = align(level_width,
                                                     4 * uif_block_w);
                                 level_height = align(level_height,
-                                                     4 * uif_block_h);
+                                                     uif_block_h);
                         }
                 }