Mesa (master): broadcom/vc5: Fix image_h setup for both loads and stores.

Eric Anholt anholt at kemper.freedesktop.org
Thu Feb 1 19:02:53 UTC 2018


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 24 12:13:53 2018 +1100

broadcom/vc5: Fix image_h setup for both loads and stores.

The image_h for the tiling algorithm needs to be the padded-to-a-uifblock
height of the level, not the unpadded height or the height of level 0.
Fixes some cases of KHR-GLES3.texture_repeat_mode.* and
depthstencil-render-miplevels.

---

 src/gallium/drivers/vc5/vc5_resource.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c
index f37ffe928f..e2fe2826c2 100644
--- a/src/gallium/drivers/vc5/vc5_resource.c
+++ b/src/gallium/drivers/vc5/vc5_resource.c
@@ -133,8 +133,7 @@ vc5_resource_transfer_unmap(struct pipe_context *pctx,
                                               slice->stride,
                                               trans->map, ptrans->stride,
                                               slice->tiling, rsc->cpp,
-                                              u_minify(rsc->base.height0,
-                                                       ptrans->level),
+                                              slice->size / slice->stride,
                                               &ptrans->box);
                 }
                 free(trans->map);
@@ -265,7 +264,7 @@ vc5_resource_transfer_map(struct pipe_context *pctx,
                                              ptrans->box.z * rsc->cube_map_stride,
                                              slice->stride,
                                              slice->tiling, rsc->cpp,
-                                             rsc->base.height0,
+                                             slice->size / slice->stride,
                                              &ptrans->box);
                 }
                 return trans->map;




More information about the mesa-commit mailing list