diff options
author | Eric Anholt <[email protected]> | 2017-11-02 11:47:30 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-11-07 09:40:24 -0800 |
commit | 73ec70bf13a939e687ddf9c2a7e08962042a09eb (patch) | |
tree | c2bccc724f3ed18a85334913d9410329521a8812 /src/gallium/drivers/vc5 | |
parent | e23c6991bed6597c777b145a3f24b79e1d28be56 (diff) |
broadcom/vc5: Fix height padding of small UIF slices.
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.
Diffstat (limited to 'src/gallium/drivers/vc5')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_resource.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c index ffd5abac35b..c4d4e8c2347 100644 --- a/src/gallium/drivers/vc5/vc5_resource.c +++ b/src/gallium/drivers/vc5/vc5_resource.c @@ -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); } } |