dri: Add a new capabilities for drivers that can't share buffers

Graphics / Mesa 3D Graphics Library / Mesa - Giovanni Campagna [src.gnome.org] - 30 July 2014 10:43 UTC

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.

e57ad3d dri: Add a new capabilities for drivers that can't share buffers
include/GL/internal/dri_interface.h | 17 +++++++++++++-
src/egl/drivers/dri2/egl_dri2.c | 10 ++++++++-
src/egl/drivers/dri2/platform_drm.c | 14 ++++++++++--
src/gallium/drivers/llvmpipe/lp_screen.c | 2 +-
src/gallium/state_trackers/dri/dri2.c | 25 +++++++++++++++++----
src/gallium/state_trackers/dri/dri_screen.h | 1 +
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 12 +++++++---
7 files changed, 69 insertions(+), 12 deletions(-)

Upstream: cgit.freedesktop.org


  • Share