st/va: use provided sizes and coords for vlVaGetImage
authorBoyuan Zhang <boyuan.zhang@amd.com>
Wed, 10 Oct 2018 19:08:44 +0000 (15:08 -0400)
committerLeo Liu <leo.liu@amd.com>
Thu, 11 Oct 2018 13:00:18 +0000 (09:00 -0400)
commitd76c2774219bf47e3cabe1b9cb49e30aea110c3e
tree3c3ebc87b3d3b83adea205e6214036c759d8c0bb
parent229803b66a3715da29ed8d5dc2c70e08587beebe
st/va: use provided sizes and coords for vlVaGetImage

vlVaGetImage should respect the width, height, and coordinates x and y that
passed in. Therefore, pipe_box should be created with the passed in values
instead of surface width/height.

v2: add input size check, return error when size out of bounds
v3: fix the size check for vaimage
v4: add size adjustment for x and y coordinates

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Cc: "18.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/image.c