st/mesa: don't leak pipe_surface if pipe_context is not current
authorMarek Olšák <marek.olsak@amd.com>
Tue, 8 Jan 2019 16:12:05 +0000 (11:12 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 9 Jan 2019 16:08:44 +0000 (11:08 -0500)
commite986c1ca1d61bd7492936f43e45996cd4f8bdb61
tree4b18c8901de891ce4b4238dd7f9fe123c52d0226
parentfd82a1d1d6be1a3636ca5d8d952ae29fa260abc8
st/mesa: don't leak pipe_surface if pipe_context is not current

We have found some pipe_surface leaks internally.

This is the same code as surface_destroy in radeonsi.
Ideally, surface_destroy would be in pipe_screen.

Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_inlines.h
src/mesa/state_tracker/st_cb_fbo.c