OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 11 Jan 2019 19:19:09 +0000 (19:19 +0000)
commitfe9ff38d51a79ab19505b2c0d09e94bed6010165
tree86bcac5f43a9ee0f941733187ec2eefb17b148d2
parent78dd4d6536db38ec83791c0a81155767a051f156
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>
(cherry picked from commit e986c1ca1d61bd7492936f43e45996cd4f8bdb61)
src/gallium/auxiliary/util/u_inlines.h
src/mesa/state_tracker/st_cb_fbo.c