diff options
author | Lepton Wu <lepton@chromium.org> | 2018-03-12 10:14:56 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-13 19:00:16 -0700 |
commit | 667a7dfd555a9e1113cb93c4098a11aa75201eb2 (patch) | |
tree | 7abec2880aaa5d0cdf6eaf414cd4891ff64d2368 /src | |
parent | d9619b2fba92a72238e995985d3142a2a6e737af (diff) |
CHROMIUM: virgl: Fix crash on destruction.
We need to set surface/sampler_view destruction callbacks for
surface and sampler_view after https://chromium-review.googlesource.com/558120
BUG=b:70179880
TEST=Run android apps on bettyvirgl (rendering only works sometimes.)
Change-Id: I85cedb53a3dd86caba1d8cf890f63a0a5dfce4bd
Reviewed-on: https://chromium-review.googlesource.com/959231
Commit-Ready: Lepton Wu <lepton@chromium.org>
Tested-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Joe Kniss <djmk@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 232d2951c0b..8ad0a4372e0 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -206,6 +206,7 @@ static struct pipe_surface *virgl_create_surface(struct pipe_context *ctx, pipe_reference_init(&surf->base.reference, 1); pipe_resource_reference(&surf->base.texture, resource); surf->base.context = ctx; + surf->base.surface_destroy = ctx->surface_destroy; surf->base.format = templ->format; if (resource->target != PIPE_BUFFER) { surf->base.width = u_minify(resource->width0, templ->u.tex.level); @@ -676,6 +677,7 @@ static struct pipe_sampler_view *virgl_create_sampler_view(struct pipe_context * grview->base.texture = NULL; grview->base.context = ctx; + grview->base.sampler_view_destroy = ctx->sampler_view_destroy; pipe_resource_reference(&grview->base.texture, texture); grview->handle = handle; return &grview->base; |