vc4: Fix pitch alignment of linear textures.
authorEric Anholt <eric@anholt.net>
Mon, 16 Mar 2015 21:48:26 +0000 (14:48 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 24 Mar 2015 17:39:12 +0000 (10:39 -0700)
Fixes some non-power-of-two texture rendering when I force ARGB8888 to
raster.

src/gallium/drivers/vc4/vc4_resource.c

index b8628ec725881bfd9f221ace1ac3253059f38cdd..544c032b018665236e790a5fc8a75f9bb339cbd7 100644 (file)
@@ -258,7 +258,7 @@ vc4_setup_slices(struct vc4_resource *rsc)
 
                 if (!rsc->tiled) {
                         slice->tiling = VC4_TILING_FORMAT_LINEAR;
-                        level_width = align(level_width, 16);
+                        level_width = align(level_width, utile_w);
                 } else {
                         if (vc4_size_is_lt(level_width, level_height,
                                            rsc->cpp)) {