diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-24 13:53:44 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-25 13:39:17 -0700 |
commit | 06211f45a7fd76c29ba4369542b6f2eb04e1d034 (patch) | |
tree | 68ea08386a7ddd8171e38f510edfda1a6b6fc10c /src/gallium/drivers/panfrost/pan_blit.c | |
parent | 6729912a4bba88e6d0af8560bc9de692d044c906 (diff) |
panfrost: Respect mip level when wallpapering
Fixes DATA_INVALID_FAULT raised when wallpapering while rendering to a
mipmap.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_blit.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_blit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_blit.c b/src/gallium/drivers/panfrost/pan_blit.c index c98e08e8a0b..e6ef70ea7b8 100644 --- a/src/gallium/drivers/panfrost/pan_blit.c +++ b/src/gallium/drivers/panfrost/pan_blit.c @@ -109,10 +109,16 @@ panfrost_blit_wallpaper(struct panfrost_context *ctx) panfrost_blitter_save(ctx, ctx->blitter_wallpaper); + struct pipe_surface *surf = ctx->pipe_framebuffer.cbufs[0]; + unsigned level = surf->u.tex.level; + unsigned layer = surf->u.tex.first_layer; + assert(surf->u.tex.last_layer == layer); + binfo.src.resource = binfo.dst.resource = ctx->pipe_framebuffer.cbufs[0]->texture; - binfo.src.level = binfo.dst.level = 0; + binfo.src.level = binfo.dst.level = level; binfo.src.box.x = binfo.dst.box.x = 0; binfo.src.box.y = binfo.dst.box.y = 0; + binfo.src.box.z = binfo.dst.box.z = layer; binfo.src.box.width = binfo.dst.box.width = ctx->pipe_framebuffer.width; binfo.src.box.height = binfo.dst.box.height = ctx->pipe_framebuffer.height; binfo.src.box.depth = binfo.dst.box.depth = 1; |