st/mesa: Try re-importing resource if necessary in st_vdpau_map_surface
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 17 Jul 2019 10:18:11 +0000 (12:18 +0200)
committerMichel Dänzer <michel@daenzer.net>
Tue, 23 Jul 2019 14:28:02 +0000 (16:28 +0200)
commit22c7738520e2642a7f297d9b85f3dbfba37ca862
treeba28be0b1ce16f9b25857156a245a2b82e1cc24e
parent7499e7362d70c315399731eb20b89478ba794846
st/mesa: Try re-importing resource if necessary in st_vdpau_map_surface

This can be the case if the resource was obtained from
st_vdpau_output/video_surface_gallium.

st_vdpau_output/video_surface_dma_buf do a similar dance internally.

v2:
* Pass PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE instead of 0 for usage.

Bugzilla: https://bugs.freedesktop.org/111099
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> # v1
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_vdpau.c