summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-03-15 14:09:50 -0700
committerJason Ekstrand <[email protected]>2016-03-15 14:09:50 -0700
commit7f6a0cb29c89a03441be744680a2145445be3a3c (patch)
tree516824ab49962521563b95fa79430cf948baaccc /src/gallium/state_trackers/va
parentb83785d86d2c7f07323920615c72a9f09695a9a7 (diff)
parente103b52aec773537d2821d8acc42ac9caa2a4b17 (diff)
Merge remote-tracking branch 'public/master' into vulkan
Diffstat (limited to 'src/gallium/state_trackers/va')
-rw-r--r--src/gallium/state_trackers/va/buffer.c3
-rw-r--r--src/gallium/state_trackers/va/surface.c3
-rw-r--r--src/gallium/state_trackers/va/va_private.h5
3 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c
index c2c24d693f2..2fd86612e9a 100644
--- a/src/gallium/state_trackers/va/buffer.c
+++ b/src/gallium/state_trackers/va/buffer.c
@@ -302,7 +302,8 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id,
memset(&whandle, 0, sizeof(whandle));
whandle.type = DRM_API_HANDLE_TYPE_FD;
- if (!screen->resource_get_handle(screen, buf->derived_surface.resource, &whandle))
+ if (!screen->resource_get_handle(screen, buf->derived_surface.resource,
+ &whandle, PIPE_HANDLE_USAGE_READ_WRITE))
return VA_STATUS_ERROR_INVALID_BUFFER;
buf_info->handle = (intptr_t)whandle.handle;
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 84a94949c47..861dac260a9 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -470,7 +470,8 @@ suface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
whandle.handle = memory_attibute->buffers[index];
whandle.stride = memory_attibute->pitches[index];
- resource = pscreen->resource_from_handle(pscreen, &res_templ, &whandle);
+ resource = pscreen->resource_from_handle(pscreen, &res_templ, &whandle,
+ PIPE_HANDLE_USAGE_READ_WRITE);
if (!resource)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h
index 614fa98fef7..d91de442fa7 100644
--- a/src/gallium/state_trackers/va/va_private.h
+++ b/src/gallium/state_trackers/va/va_private.h
@@ -148,11 +148,12 @@ PipeToProfile(enum pipe_video_profile profile)
return VAProfileH264High;
case PIPE_VIDEO_PROFILE_HEVC_MAIN:
return VAProfileHEVCMain;
+ case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
+ return VAProfileHEVCMain10;
case PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444:
- case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
case PIPE_VIDEO_PROFILE_HEVC_MAIN_12:
case PIPE_VIDEO_PROFILE_HEVC_MAIN_STILL:
case PIPE_VIDEO_PROFILE_HEVC_MAIN_444:
@@ -190,6 +191,8 @@ ProfileToPipe(VAProfile profile)
return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH;
case VAProfileHEVCMain:
return PIPE_VIDEO_PROFILE_HEVC_MAIN;
+ case VAProfileHEVCMain10:
+ return PIPE_VIDEO_PROFILE_HEVC_MAIN_10;
case VAProfileNone:
return PIPE_VIDEO_PROFILE_UNKNOWN;
default: