Mesa (master): vc4: Fix pitch alignment of linear textures.

Eric Anholt anholt at kemper.freedesktop.org
Tue Mar 24 17:39:48 UTC 2015


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

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 16 14:48:26 2015 -0700

vc4: Fix pitch alignment of linear textures.

Fixes some non-power-of-two texture rendering when I force ARGB8888 to
raster.

---

 src/gallium/drivers/vc4/vc4_resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index b8628ec..544c032 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -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)) {




More information about the mesa-commit mailing list