diff options
author | Kristian H. Kristensen <[email protected]> | 2019-11-25 21:50:57 -0800 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-12-19 09:56:05 -0800 |
commit | e0ebaa819df33de74f73f42e17536f4f2dc5446a (patch) | |
tree | b3ff13e03db6a82036c6b4adc28d029ea09b6071 /src/gallium/drivers/freedreno | |
parent | b59222640e9f5787feba9119100861cd6eca51e9 (diff) |
freedreno/a6xx: Pick blitter swap based on resource tiling
The linear levels in a tiled resource are stored in the canonical
swap, WZYX. We need to pick the swap based on whether or not the
resource is tiled, not whether the the level in question is tiled.
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Kristian H. Kristensen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c index 98e2ab9d71c..58b564f8f4b 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c @@ -387,8 +387,11 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring, stile = fd_resource_tile_mode(info->src.resource, info->src.level); dtile = fd_resource_tile_mode(info->dst.resource, info->dst.level); - sswap = stile ? WZYX : fd6_pipe2swap(info->src.format); - dswap = dtile ? WZYX : fd6_pipe2swap(info->dst.format); + /* Linear levels of a tiled resource are always WZYX, so look at + * rsc->tile_mode to determine the swap. + */ + sswap = src->layout.tile_mode ? WZYX : fd6_pipe2swap(info->src.format); + dswap = dst->layout.tile_mode ? WZYX : fd6_pipe2swap(info->dst.format); if (util_format_is_compressed(info->src.format)) { debug_assert(info->src.format == info->dst.format); |