loader/dri3: import prime buffers in the currently-bound screen
authorMartin Peres <martin.peres@linux.intel.com>
Thu, 6 Oct 2016 14:10:35 +0000 (17:10 +0300)
committerMartin Peres <martin.peres@linux.intel.com>
Fri, 7 Oct 2016 08:11:55 +0000 (11:11 +0300)
commita599b1c2037ac8aca6c92350c8a7b3e42c81deaa
treed70b3cc93642d24a0f63ebf044349f80f325ba0e
parent0247e5ee3edd546b8598082d5b45d110f61853d0
loader/dri3: import prime buffers in the currently-bound screen

This tries to mirrors the codepath taken by DRI2 in IntelSetTexBuffer2()
and fixes many applications when using DRI3:
 - Totem with libva on hw-accelerated decoding
 - obs-studio, using Window Capture (Xcomposite) as a Source
 - gstreamer with VAAPI

v2:
 - introduce get_dri_screen() in the dri3 loader's vtable (krh)

Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
Tested-by: Ionut Biru <biru.ionut@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71759
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
src/loader/loader_dri3_helper.c