mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
svga: simplify some surface management
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
This commit is contained in:
parent
17d9f1dc64
commit
a4c0f5ba6f
3 changed files with 8 additions and 4 deletions
|
|
@ -315,7 +315,7 @@ svga_clear_texture(struct pipe_context *pipe,
|
|||
svga_validate_surface_view(svga, svga_surface_dst);
|
||||
|
||||
if (!dsv) {
|
||||
pipe_surface_reference(&surface, NULL);
|
||||
svga_surface_destroy(pipe, surface);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ svga_clear_texture(struct pipe_context *pipe,
|
|||
svga_validate_surface_view(svga, svga_surface_dst);
|
||||
|
||||
if (!rtv) {
|
||||
pipe_surface_reference(&surface, NULL);
|
||||
svga_surface_destroy(pipe, surface);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -430,7 +430,7 @@ svga_clear_texture(struct pipe_context *pipe,
|
|||
}
|
||||
}
|
||||
}
|
||||
pipe_surface_reference(&surface, NULL);
|
||||
svga_surface_destroy(pipe, surface);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
svga_surface_destroy(struct pipe_context *pipe,
|
||||
struct pipe_surface *surf)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -140,6 +140,10 @@ svga_create_surface(struct pipe_context *pipe,
|
|||
struct pipe_resource *pt,
|
||||
const struct pipe_surface *surf_tmpl);
|
||||
|
||||
void
|
||||
svga_surface_destroy(struct pipe_context *pipe,
|
||||
struct pipe_surface *surf);
|
||||
|
||||
static inline struct svga_surface *
|
||||
svga_surface(struct pipe_surface *surface)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue