mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
nouveau: fix buffer object leak
Very apparent with resizing windows on DRI2.
This commit is contained in:
parent
db8b363eb9
commit
4911443d36
1 changed files with 4 additions and 1 deletions
|
|
@ -197,6 +197,7 @@ nouveau_drm_pt_from_name(struct drm_api *api, struct pipe_screen *pscreen,
|
|||
unsigned stride, unsigned handle)
|
||||
{
|
||||
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
|
||||
struct pipe_texture *pt;
|
||||
struct pipe_buffer *pb;
|
||||
int ret;
|
||||
|
||||
|
|
@ -218,7 +219,9 @@ nouveau_drm_pt_from_name(struct drm_api *api, struct pipe_screen *pscreen,
|
|||
pb->usage = PIPE_BUFFER_USAGE_GPU_READ_WRITE |
|
||||
PIPE_BUFFER_USAGE_CPU_READ_WRITE;
|
||||
pb->size = nouveau_bo(pb)->size;
|
||||
return pscreen->texture_blanket(pscreen, templ, &stride, pb);
|
||||
pt = pscreen->texture_blanket(pscreen, templ, &stride, pb);
|
||||
pipe_buffer_reference(&pb, NULL);
|
||||
return pt;
|
||||
}
|
||||
|
||||
static boolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue