gallium: kill off pipe_surface_unref_no_context()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
This commit is contained in:
Mike Blumenkrantz
2025-05-30 12:33:49 -04:00
committed by Marge Bot
parent 718e277ab5
commit db500d4a56
2 changed files with 1 additions and 20 deletions
-19
View File
@@ -209,25 +209,6 @@ pipe_drop_resource_references(struct pipe_resource *dst, int num_refs)
pipe_resource_destroy(dst);
}
/**
* Same as pipe_surface_unref, but used when pipe_context doesn't exist
* anymore.
*/
static inline void
pipe_surface_unref_no_context(struct pipe_surface **ptr)
{
struct pipe_surface *surf = *ptr;
if (pipe_reference_described(&surf->reference, NULL,
(debug_reference_descriptor)
debug_describe_surface)) {
/* trivially destroy pipe_surface */
pipe_resource_reference(&surf->texture, NULL);
free(surf);
}
*ptr = NULL;
}
/**
* Set *dst to \p src with proper reference counting.
*
+1 -1
View File
@@ -100,7 +100,7 @@ static void evergreen_set_rat(struct r600_pipe_compute *pipe,
/* Add the RAT the list of color buffers. Drop the old buffer first. */
pipe->ctx->framebuffer.state.cbufs[id] = rat_templ;
pipe_surface_unref_no_context(&pipe->ctx->framebuffer.fb_cbufs[id]);
pipe_surface_unref(&pipe->ctx->b.b, &pipe->ctx->framebuffer.fb_cbufs[id]);
pipe->ctx->framebuffer.fb_cbufs[id] = pipe->ctx->b.b.create_surface(
(struct pipe_context *)pipe->ctx,
(struct pipe_resource *)bo, &rat_templ);