mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 09:00:10 +01:00
r600g: fix stencil buffer ref counting on evergreen
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
This commit is contained in:
parent
8e366dc365
commit
d5e91a2364
1 changed files with 4 additions and 1 deletions
|
|
@ -350,6 +350,9 @@ static void r600_texture_destroy(struct pipe_screen *screen,
|
||||||
if (rtex->flushed_depth_texture)
|
if (rtex->flushed_depth_texture)
|
||||||
pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
|
pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
|
||||||
|
|
||||||
|
if (rtex->stencil)
|
||||||
|
pipe_resource_reference((struct pipe_resource **)&rtex->stencil, NULL);
|
||||||
|
|
||||||
pb_reference(&resource->buf, NULL);
|
pb_reference(&resource->buf, NULL);
|
||||||
FREE(rtex);
|
FREE(rtex);
|
||||||
}
|
}
|
||||||
|
|
@ -469,7 +472,7 @@ r600_texture_create_object(struct pipe_screen *screen,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtex->stencil) {
|
if (rtex->stencil) {
|
||||||
rtex->stencil->resource.buf = rtex->resource.buf;
|
pb_reference(&rtex->stencil->resource.buf, rtex->resource.buf);
|
||||||
rtex->stencil->resource.cs_buf = rtex->resource.cs_buf;
|
rtex->stencil->resource.cs_buf = rtex->resource.cs_buf;
|
||||||
}
|
}
|
||||||
return rtex;
|
return rtex;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue