diff options
author | Leo Liu <[email protected]> | 2017-09-15 22:23:03 -0400 |
---|---|---|
committer | Leo Liu <[email protected]> | 2017-09-25 09:42:14 -0400 |
commit | 1d1299f8a41edbf6373222eda5708af5a5390d3c (patch) | |
tree | 82a458ae78c29a5eaa6cacc8ec1325ba3926e2ce /src/gallium/state_trackers/va/surface.c | |
parent | 96f89f440b9ad5cc2765dfa12265ca756aee83ea (diff) |
st/va: make internal func vlVaHandleSurfaceAllocate() call simpler
Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/surface.c')
-rw-r--r-- | src/gallium/state_trackers/va/surface.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index 67773cf76a4..643cdcd54ab 100644 --- a/src/gallium/state_trackers/va/surface.c +++ b/src/gallium/state_trackers/va/surface.c @@ -557,15 +557,12 @@ suface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface, } VAStatus -vlVaHandleSurfaceAllocate(VADriverContextP ctx, vlVaSurface *surface, +vlVaHandleSurfaceAllocate(vlVaDriver *drv, vlVaSurface *surface, struct pipe_video_buffer *templat) { - vlVaDriver *drv; struct pipe_surface **surfaces; unsigned i; - drv = VL_VA_DRIVER(ctx); - surface->buffer = drv->pipe->create_video_buffer(drv->pipe, templat); if (!surface->buffer) return VA_STATUS_ERROR_ALLOCATION_FAILED; @@ -730,7 +727,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format, !(memory_attibute->flags & VA_SURFACE_EXTBUF_DESC_ENABLE_TILING)) templat.bind = PIPE_BIND_LINEAR | PIPE_BIND_SHARED; - vaStatus = vlVaHandleSurfaceAllocate(ctx, surf, &templat); + vaStatus = vlVaHandleSurfaceAllocate(drv, surf, &templat); if (vaStatus != VA_STATUS_SUCCESS) goto free_surf; break; |