st/dri: Check for kernel support before enabling fd sharing v2
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 17 Dec 2013 13:44:38 +0000 (05:44 -0800)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 18 Dec 2013 08:11:24 +0000 (09:11 +0100)
commit00cf048b12a82f1cde066c12bea63a9f20f5f216
tree1646fe98b027d5b878e2e947e55ea05cbfb760f8
parent37c24e6d867606e176a5164fc7ef1857862e76f8
st/dri: Check for kernel support before enabling fd sharing v2

The dri2 state tracker is checking for driver support before enabling
dri2ImageExtension version 7. This commit adds a check that also the
kernel driver supports fd sharing through prime.

Note that this adds a libdrm dependency on dri2.c.

v2: Removed unnecessary clamping of bool expression

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
src/gallium/state_trackers/dri/drm/dri2.c
src/gallium/targets/dri-vmwgfx/target.c