summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_context.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c
index 2b6b3566388..32dde06ae7d 100644
--- a/src/gallium/drivers/virgl/virgl_context.c
+++ b/src/gallium/drivers/virgl/virgl_context.c
@@ -231,7 +231,7 @@ static void virgl_surface_destroy(struct pipe_context *ctx,
struct pipe_surface *psurf)
{
struct virgl_context *vctx = virgl_context(ctx);
- struct virgl_surface *surf = (struct virgl_surface *)psurf;
+ struct virgl_surface *surf = virgl_surface(psurf);
pipe_resource_reference(&surf->base.texture, NULL);
virgl_encode_delete_object(vctx, surf->handle, VIRGL_OBJECT_SURFACE);