diff options
author | Axel Davy <[email protected]> | 2015-05-01 01:16:24 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-05-11 19:31:44 +0200 |
commit | 4cd546df82c557b9a765e40db2f96c4faa299846 (patch) | |
tree | 42337a927c0e466ccbbebde32c243cdf58bb9d71 /src/egl/drivers/dri2/egl_dri2.h | |
parent | fb0960a14bd6980aa63deef45ec3cf1ab99bcf0a (diff) |
egl/wayland: Implement DRI_PRIME support
When the server gpu and requested gpu are different:
. They likely don't support the same tiling modes
. They likely do not have fast access to the same locations
Thus we do:
. render to a tiled buffer we do not share with the server
. Copy the content at every swap to a buffer with no tiling
that we share with the server.
This is similar to the glx dri3 DRI_PRIME implementation.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 3ee3f806db8..cabeb2dfdc6 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -201,6 +201,7 @@ struct dri2_egl_display int formats; uint32_t capabilities; int is_render_node; + int is_different_gpu; #endif }; @@ -254,6 +255,8 @@ struct dri2_egl_surface #ifdef HAVE_WAYLAND_PLATFORM struct wl_buffer *wl_buffer; __DRIimage *dri_image; + /* for is_different_gpu case. NULL else */ + __DRIimage *linear_copy; #endif #ifdef HAVE_DRM_PLATFORM struct gbm_bo *bo; |