etnaviv: don't try to copy PIPE_BUFFER with the 3D engine

PIPE_BUFFER layout is incompatible with the 3D pipe, so don't try to
blit it via a 3D engine blit, but fall back to the software copy.

Fixes crashes in piglit tests arb_copy_buffer and arb_map_buffer_range.

Fixes: c9e8b49b88 (etnaviv: gallium driver for Vivante GPUs)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9310>
This commit is contained in:
Lucas Stach 2021-02-26 21:28:20 +01:00
parent 22ea985d70
commit 171d7a3081
1 changed files with 2 additions and 1 deletions

View File

@ -165,7 +165,8 @@ etna_resource_copy_region(struct pipe_context *pctx, struct pipe_resource *dst,
* to non-aligned: can fall back to rendering-based copy?
* XXX this goes wrong when source surface is supertiled.
*/
if (util_blitter_is_copy_supported(ctx->blitter, dst, src)) {
if (src->target != PIPE_BUFFER && dst->target != PIPE_BUFFER &&
util_blitter_is_copy_supported(ctx->blitter, dst, src)) {
etna_blit_save_state(ctx);
util_blitter_copy_texture(ctx->blitter, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box);