diff options
author | Kristian Høgsberg <[email protected]> | 2013-11-08 22:06:51 -0800 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2013-11-12 16:01:40 -0800 |
commit | 04e3ef00dbeab177793954781ddfd298724b6d8d (patch) | |
tree | 8aa1ff80dd87d0f8fbed458557c0f6941984b244 /src/gbm/backends/dri/gbm_driint.h | |
parent | 5ba6be2617a46a7cd8567ffe65f496e917a93374 (diff) |
gbm: Add support for __DRIimage based getBuffers when available
This lets us allocate color buffers as __DRIimages and pass them into
the driver instead of having to create a __DRIbuffer with the flink
that requires.
With this patch, we can now run gbm on render-nodes. A render-node is a
drm device that doesn't support modesetting and all the legacy DRI ioctls.
flink is also not supported, but now that gbm doesn't need flink, we can
run piglit on head-less gbm or head-less GPGPU.
Signed-off-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Tested-by: Jordan Justen <[email protected]>
Cc: "10.0" <[email protected]>
Diffstat (limited to 'src/gbm/backends/dri/gbm_driint.h')
-rw-r--r-- | src/gbm/backends/dri/gbm_driint.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h index cb4e477abf4..fb303a3be55 100644 --- a/src/gbm/backends/dri/gbm_driint.h +++ b/src/gbm/backends/dri/gbm_driint.h @@ -52,7 +52,7 @@ struct gbm_dri_device { __DRIdri2LoaderExtension *loader; const __DRIconfig **driver_configs; - const __DRIextension *extensions[4]; + const __DRIextension *extensions[5]; const __DRIextension **driver_extensions; __DRIimage *(*lookup_image)(__DRIscreen *screen, void *image, void *data); @@ -67,6 +67,12 @@ struct gbm_dri_device { int *width, int *height, unsigned int *attachments, int count, int *out_count, void *data); + int (*image_get_buffers)(__DRIdrawable *driDrawable, + unsigned int format, + uint32_t *stamp, + void *loaderPrivate, + uint32_t buffer_mask, + struct __DRIimageList *buffers); struct wl_drm *wl_drm; }; |