frontends/va: check decoder in va surface call
authorBoyuan Zhang <boyuan.zhang@amd.com>
Thu, 23 Mar 2023 13:34:55 +0000 (09:34 -0400)
committerBoyuan Zhang <boyuan.zhang@amd.com>
Thu, 23 Mar 2023 14:14:14 +0000 (10:14 -0400)
commit2c1da7fbde06900433993fda7813114510d59c0c
tree8ccc8cb8595dc2a62d7c04e54ec2491adc9fc548
parent3f544150bb346847a46162bc89f542cc66d08e30
frontends/va: check decoder in va surface call

Add a check to see if decoder is valid before using it. Currently we
only support decode and encode operations, return unsupported error
for all other entrypoints.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21905>
src/gallium/frontends/va/surface.c