svga: stop using pipe_context::create_surface()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Call svga_create_surface() directly instead.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35565>
This commit is contained in:
Brian Paul 2025-06-16 16:23:59 -06:00 committed by Marge Bot
parent 8d13fc447e
commit 21a83aba3b
4 changed files with 9 additions and 4 deletions

View file

@ -278,7 +278,7 @@ svga_clear_texture(struct pipe_context *pipe,
tmpl.last_layer = box->z + box->depth - 1;
tmpl.level = level;
surface = pipe->create_surface(pipe, res, &tmpl);
surface = svga_create_surface(pipe, res, &tmpl);
if (surface == NULL) {
debug_printf("failed to create surface\n");
return;

View file

@ -110,7 +110,7 @@ svga_copy_framebuffer_state(struct svga_context *svga,
}
struct pipe_surface *psurf = src->cbufs[i].texture
? pctx->create_surface(pctx, src->cbufs[i].texture, &src->cbufs[i])
? svga_create_surface(pctx, src->cbufs[i].texture, &src->cbufs[i])
: NULL;
if (dst->cbufs[i]) {
svga_surface_unref(pctx, &dst->cbufs[i]);
@ -134,7 +134,7 @@ svga_copy_framebuffer_state(struct svga_context *svga,
}
struct pipe_surface *psurf = src->zsbuf.texture
? pctx->create_surface(pctx, src->zsbuf.texture, &src->zsbuf)
? svga_create_surface(pctx, src->zsbuf.texture, &src->zsbuf)
: NULL;
if (dst->zsbuf) {
svga_surface_unref(pctx, &dst->zsbuf);

View file

@ -402,7 +402,7 @@ done:
}
static struct pipe_surface *
struct pipe_surface *
svga_create_surface(struct pipe_context *pipe,
struct pipe_resource *pt,
const struct pipe_surface *surf_tmpl)

View file

@ -135,6 +135,11 @@ svga_texture_copy_handle(struct svga_context *svga,
unsigned width, unsigned height, unsigned depth);
struct pipe_surface *
svga_create_surface(struct pipe_context *pipe,
struct pipe_resource *pt,
const struct pipe_surface *surf_tmpl);
static inline struct svga_surface *
svga_surface(struct pipe_surface *surface)
{