dri: Add a new capabilities for drivers that can't share buffers
authorGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 23 Jul 2014 18:28:52 +0000 (19:28 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 30 Jul 2014 15:43:41 +0000 (16:43 +0100)
commite57ad3d38cab091ef341838b651dbda16cee007b
treefaa36d31ce343aeaa8a134c3bddfca8abecbcd52
parent3b176c441b7ddc5f7d2f891da3f76cf3c1814ce1
dri: Add a new capabilities for drivers that can't share buffers

The kms-dri swrast driver cannot share buffers using the GEM,
so it must tell the loader to disable extensions relying on
that, without disabling the image DRI extension altogether
(which would prevent the loader from working at all).
This requires a new gallium capability (which is queried on
the pipe_screen and for swrast drivers it's forwarded to the
winsys), and requires a new version of the DRI image extension.

[Emil Velikov]
 - Rebased on top of gallium-dri megadrivers.
 - Drop PIPE_CAP_BUFFER_SHARE and sw_winsys::get_param hook.
The can_share_buffer cap is set at InitScreen. We use a different
InitScreen (and thus value for the cap) function for kms_dri, due to
deeper differences originating from dri megadrivers.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
include/GL/internal/dri_interface.h
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/platform_drm.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/state_trackers/dri/dri2.c
src/gallium/state_trackers/dri/dri_screen.h
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c