st/va: make surface allocate functions more usefully
authorLeo Liu <leo.liu@amd.com>
Tue, 15 Aug 2017 13:07:06 +0000 (09:07 -0400)
committerLeo Liu <leo.liu@amd.com>
Mon, 21 Aug 2017 14:09:09 +0000 (10:09 -0400)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/surface.c
src/gallium/state_trackers/va/va_private.h

index f968e9ede17b056d725ea20cd8a950515b94ead7..b116fc3f27f1fd4e9a3e7086edcdc1ba0d2da045 100644 (file)
@@ -558,9 +558,9 @@ suface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
    return VA_STATUS_SUCCESS;
 }
 
-static VAStatus
-surface_allocate(VADriverContextP ctx, vlVaSurface *surface,
-                struct pipe_video_buffer *templat)
+VAStatus
+vlVaHandleSurfaceAllocate(VADriverContextP ctx, vlVaSurface *surface,
+                          struct pipe_video_buffer *templat)
 {
    vlVaDriver *drv;
    struct pipe_surface **surfaces;
@@ -734,7 +734,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 = surface_allocate(ctx, surf, &templat);
+        vaStatus = vlVaHandleSurfaceAllocate(ctx, surf, &templat);
          if (vaStatus != VA_STATUS_SUCCESS)
             goto free_surf;
          break;
index 24b74509c859f993480729bde0e5a88b45fbd017..a437a5b90f1ae58125673a9a312ed88d6f54963e 100644 (file)
@@ -396,6 +396,7 @@ VAStatus vlVaQueryVideoProcPipelineCaps(VADriverContextP ctx, VAContextID contex
 
 // internal functions
 VAStatus vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
+VAStatus vlVaHandleSurfaceAllocate(VADriverContextP ctx, vlVaSurface *surface, struct pipe_video_buffer *templat);
 void vlVaGetReferenceFrame(vlVaDriver *drv, VASurfaceID surface_id, struct pipe_video_buffer **ref_frame);
 void vlVaHandlePictureParameterBufferMPEG12(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
 void vlVaHandleIQMatrixBufferMPEG12(vlVaContext *context, vlVaBuffer *buf);