mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
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 <satyajit.sahu@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3889> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3889>
This commit is contained in:
parent
cd40110420
commit
0ab5c88a0a
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue