st/va: implement VaDeriveImage
authorJulien Isorce <j.isorce@samsung.com>
Fri, 30 Oct 2015 11:42:52 +0000 (11:42 +0000)
committerChristian König <christian.koenig@amd.com>
Fri, 30 Oct 2015 12:21:11 +0000 (13:21 +0100)
commit802ba6f8655bf967299b027204ecdd5855050609
treee79cde893485075a1720a75010a39b5dba42dfa5
parent5e763aaa21654d0591b7da14c573fc03d4a60205
st/va: implement VaDeriveImage

And apply relatives change to:
vlVaBufferSetNumElements
vlVaCreateBuffer
vlVaMapBuffer
vlVaUnmapBuffer
vlVaDestroyBuffer
vlVaPutImage

It is unfortunate that there is no proper va buffer type and struct
for this. Only possible to use VAImageBufferType which is normally
used for normal user data array.
On of the consequences is that it is only possible VaDeriveImage
is only useful on surfaces backed with contiguous planes.
Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/buffer.c
src/gallium/state_trackers/va/image.c
src/gallium/state_trackers/va/va_private.h