mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
zink: fix refcounting of zink_surface objects
this was previously a no-op because the pointers were identical, leading to an extra unref in check_framebuffer_surface_mutable() cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34077>
This commit is contained in:
parent
9d359c6d10
commit
f5c66e2d4a
1 changed files with 4 additions and 1 deletions
|
|
@ -364,9 +364,12 @@ zink_create_surface(struct pipe_context *pctx,
|
|||
|
||||
csurf->needs_mutable = needs_mutable;
|
||||
if (needs_mutable) {
|
||||
pipe_resource_reference(&csurf->base.texture, pres);
|
||||
struct pipe_resource *ref = NULL;
|
||||
pipe_resource_reference(&ref, pres);
|
||||
init_pipe_surface_info(pctx, &csurf->base, templ, pres);
|
||||
}
|
||||
/* this may or may not be set previously depending whether templ->texture is set */
|
||||
csurf->base.texture = pres;
|
||||
|
||||
if (templ->nr_samples && !screen->info.have_EXT_multisampled_render_to_single_sampled) {
|
||||
/* transient fb attachment: not cached */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue