diff options
author | Eric Anholt <[email protected]> | 2016-09-07 12:40:39 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-09-14 06:08:03 +0100 |
commit | c31a7f529fadc016786eedc35ce65802a915ce09 (patch) | |
tree | 3d613e0273d4873a9e5758032df88ac30ffd8f38 /src/gallium/drivers/vc4/vc4_blit.c | |
parent | 774a556b6dc0d49f9f29c438349a66e69062e6e4 (diff) |
vc4: Always unref the current job surfaces at job reset time.
Drops some tricky logic in vc4_flush() trying to update the pointers, and
fixes a broken lack of unref for MSAA surfaces at context destroy time.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_blit.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_blit.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/vc4/vc4_blit.c b/src/gallium/drivers/vc4/vc4_blit.c index c37354425b6..ee08ab8c0f3 100644 --- a/src/gallium/drivers/vc4/vc4_blit.c +++ b/src/gallium/drivers/vc4/vc4_blit.c @@ -132,15 +132,10 @@ vc4_tile_blit(struct pipe_context *pctx, const struct pipe_blit_info *info) vc4_get_blit_surface(pctx, info->src.resource, info->src.level); pipe_surface_reference(&vc4->color_read, src_surf); - pipe_surface_reference(&vc4->color_write, - dst_surf->texture->nr_samples > 1 ? - NULL : dst_surf); - pipe_surface_reference(&vc4->msaa_color_write, - dst_surf->texture->nr_samples > 1 ? - dst_surf : NULL); - pipe_surface_reference(&vc4->zs_read, NULL); - pipe_surface_reference(&vc4->zs_write, NULL); - pipe_surface_reference(&vc4->msaa_zs_write, NULL); + if (dst_surf->texture->nr_samples > 1) + pipe_surface_reference(&vc4->color_write, dst_surf); + else + pipe_surface_reference(&vc4->msaa_color_write, dst_surf); vc4->draw_min_x = info->dst.box.x; vc4->draw_min_y = info->dst.box.y; |