gallium/util: kill off util_framebuffer_init

no more users

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40440>
This commit is contained in:
Mike Blumenkrantz 2026-03-16 10:58:26 -04:00 committed by Marge Bot
parent f1a52cf71c
commit 3ea293a9d1
2 changed files with 0 additions and 44 deletions

View file

@ -282,41 +282,3 @@ util_sample_locations_flip_y(struct pipe_screen *screen, unsigned fb_height,
memcpy(locations, new_locations, grid_width * grid_height * samples);
}
void
util_framebuffer_init(struct pipe_context *pctx, const struct pipe_framebuffer_state *fb, struct pipe_surface **cbufs, struct pipe_surface **zsbuf)
{
if (fb) {
for (unsigned i = 0; i < fb->nr_cbufs; i++) {
if (cbufs[i] && pipe_surface_equal(&fb->cbufs[i], cbufs[i]))
continue;
struct pipe_surface *psurf = fb->cbufs[i].texture ? pctx->create_surface(pctx, fb->cbufs[i].texture, &fb->cbufs[i]) : NULL;
if (cbufs[i])
pipe_surface_unref(pctx, &cbufs[i]);
cbufs[i] = psurf;
}
for (unsigned i = fb->nr_cbufs; i < PIPE_MAX_COLOR_BUFS; i++) {
if (cbufs[i])
pipe_surface_unref(pctx, &cbufs[i]);
cbufs[i] = NULL;
}
if (*zsbuf && pipe_surface_equal(&fb->zsbuf, *zsbuf))
return;
struct pipe_surface *zsurf = fb->zsbuf.texture ? pctx->create_surface(pctx, fb->zsbuf.texture, &fb->zsbuf) : NULL;
if (*zsbuf)
pipe_surface_unref(pctx, zsbuf);
*zsbuf = zsurf;
} else {
for (unsigned i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
if (cbufs[i])
pipe_surface_unref(pctx, &cbufs[i]);
cbufs[i] = NULL;
}
if (*zsbuf)
pipe_surface_unref(pctx, zsbuf);
*zsbuf = NULL;
}
}

View file

@ -69,12 +69,6 @@ util_sample_locations_flip_y(struct pipe_screen *screen, unsigned fb_height,
unsigned samples, uint8_t *locations);
void
#ifndef _WIN32
__attribute__((deprecated))
#endif
util_framebuffer_init(struct pipe_context *pctx, const struct pipe_framebuffer_state *fb, struct pipe_surface **cbufs, struct pipe_surface **zsbuf);
/* if you see this in your driver stop using it */
#define PIPE_FB_SURFACES \
struct pipe_surface *fb_cbufs[PIPE_MAX_COLOR_BUFS]; \