aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorSatyajit Sahu <[email protected]>2020-02-20 14:05:32 +0530
committerMarge Bot <[email protected]>2020-03-03 17:06:07 +0000
commit0ab5c88a0ac0dacac085c17bef23c9c67eaf9e86 (patch)
tree05ac2c9668023d681130874818bdb535d25925cf /src/gallium
parentcd40110420b48b3005c9d1d4ea30e2cbcc9a3d40 (diff)
st/va: GetConfigAttributes: check profile and entrypoint combination
Added check if profile is supported or not for the entrypoint in GetConfigAttributes. Signed-off-by: Satyajit Sahu <[email protected]> Acked-by: Leo Liu <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3889> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3889>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/va/config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
index 53d50fde63f..617ca6944c4 100644
--- a/src/gallium/state_trackers/va/config.c
+++ b/src/gallium/state_trackers/va/config.c
@@ -121,7 +121,9 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
for (i = 0; i < num_attribs; ++i) {
unsigned int value;
- if (entrypoint == VAEntrypointVLD) {
+ if ((entrypoint == VAEntrypointVLD) &&
+ (pscreen->get_video_param(pscreen, ProfileToPipe(profile),
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_SUPPORTED))) {
switch (attrib_list[i].type) {
case VAConfigAttribRTFormat:
value = VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV422;
@@ -134,7 +136,9 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
value = VA_ATTRIB_NOT_SUPPORTED;
break;
}
- } else if (entrypoint == VAEntrypointEncSlice) {
+ } else if ((entrypoint == VAEntrypointEncSlice) &&
+ (pscreen->get_video_param(pscreen, ProfileToPipe(profile),
+ PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_SUPPORTED))) {
switch (attrib_list[i].type) {
case VAConfigAttribRTFormat:
value = VA_RT_FORMAT_YUV420;