diff options
author | Marek Olšák <[email protected]> | 2019-09-18 20:48:15 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-10-09 17:06:54 -0400 |
commit | 35680bfea1d0e2fe8ee4504cf1e4ae4aa747b766 (patch) | |
tree | 921e0d45fc8b258329fa460f70ba3e0adcc63c1b /src/gallium/state_trackers | |
parent | a122e708580627f10df00ab9ac3103c398f11a53 (diff) |
vl: use u_format in vl_video_buffer_formats
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/va/surface.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index 86daf0f7988..391eab65e69 100644 --- a/src/gallium/state_trackers/va/surface.c +++ b/src/gallium/state_trackers/va/surface.c @@ -565,7 +565,7 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface, struct pipe_resource res_templ; struct winsys_handle whandle; struct pipe_resource *resources[VL_NUM_COMPONENTS]; - const enum pipe_format *resource_formats = NULL; + enum pipe_format resource_formats[VL_NUM_COMPONENTS]; VAStatus result; int i; @@ -584,9 +584,7 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface, if (memory_attribute->num_planes > VL_NUM_COMPONENTS) return VA_STATUS_ERROR_INVALID_PARAMETER; - resource_formats = vl_video_buffer_formats(pscreen, templat->buffer_format); - if (!resource_formats) - return VA_STATUS_ERROR_INVALID_PARAMETER; + vl_get_video_buffer_formats(pscreen, templat->buffer_format, resource_formats); memset(&res_templ, 0, sizeof(res_templ)); res_templ.target = PIPE_TEXTURE_2D; |