From 2d9f5d3bcd6b7dbf30bfc81e7d75f3352f5a0682 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 30 May 2025 12:32:50 -0400 Subject: [PATCH] util/debug: delete more pipe_context::create_surface usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_debug_image.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug_image.c b/src/gallium/auxiliary/util/u_debug_image.c index fdf5388a343..df782b77d7b 100644 --- a/src/gallium/auxiliary/util/u_debug_image.c +++ b/src/gallium/auxiliary/util/u_debug_image.c @@ -137,18 +137,14 @@ debug_dump_texture(struct pipe_context *pipe, const char *prefix, struct pipe_resource *texture) { - struct pipe_surface *surface, surf_tmpl; + struct pipe_surface surf_tmpl; if (!texture) return; /* XXX for now, just dump image for layer=0, level=0 */ u_surface_default_template(&surf_tmpl, texture); - surface = pipe->create_surface(pipe, texture, &surf_tmpl); - if (surface) { - debug_dump_surface(pipe, prefix, surface); - pipe->surface_destroy(pipe, surface); - } + debug_dump_surface(pipe, prefix, &surf_tmpl); }