diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-01-29 11:08:07 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-01-29 11:08:07 +0000 |
commit | 6b139c2063623e9310025247cd966490b9aa57ea (patch) | |
tree | 375acfd898ca3d721250aa17291bbb90a8d7250a /lib/mesa/src/gallium/include | |
parent | cce99579dcfb1d54c54cff65573be3430e77f2c5 (diff) |
Import Mesa 18.3.2
Diffstat (limited to 'lib/mesa/src/gallium/include')
4 files changed, 64 insertions, 3 deletions
diff --git a/lib/mesa/src/gallium/include/state_tracker/drisw_api.h b/lib/mesa/src/gallium/include/state_tracker/drisw_api.h index 03d5ee405..e365ab81f 100644 --- a/lib/mesa/src/gallium/include/state_tracker/drisw_api.h +++ b/lib/mesa/src/gallium/include/state_tracker/drisw_api.h @@ -2,6 +2,7 @@ #define _DRISW_API_H_ #include "pipe/p_compiler.h" +#include "sw_winsys.h" struct pipe_screen; struct dri_drawable; @@ -18,6 +19,9 @@ struct drisw_loader_funcs void *data, unsigned width, unsigned height); void (*put_image2) (struct dri_drawable *dri_drawable, void *data, int x, int y, unsigned width, unsigned height, unsigned stride); + void (*put_image_shm) (struct dri_drawable *dri_drawable, + int shmid, char *shmaddr, unsigned offset, + int x, int y, unsigned width, unsigned height, unsigned stride); }; #endif diff --git a/lib/mesa/src/gallium/include/state_tracker/graw.h b/lib/mesa/src/gallium/include/state_tracker/graw.h index 217fa31ba..78ddf0a87 100644 --- a/lib/mesa/src/gallium/include/state_tracker/graw.h +++ b/lib/mesa/src/gallium/include/state_tracker/graw.h @@ -33,7 +33,7 @@ * necessary to implement this interface is orchestrated by the * individual target building this entity. * - * For instance, the graw-xlib target includes code to implent these + * For instance, the graw-xlib target includes code to implement these * interfaces on top of the X window system. * * Programs using this interface may additionally benefit from some of diff --git a/lib/mesa/src/gallium/include/state_tracker/sw_winsys.h b/lib/mesa/src/gallium/include/state_tracker/sw_winsys.h index 0b792cd0c..cd5838ad1 100644 --- a/lib/mesa/src/gallium/include/state_tracker/sw_winsys.h +++ b/lib/mesa/src/gallium/include/state_tracker/sw_winsys.h @@ -37,14 +37,13 @@ #include "pipe/p_compiler.h" /* for boolean */ #include "pipe/p_format.h" - +#include "state_tracker/winsys_handle.h" #ifdef __cplusplus extern "C" { #endif -struct winsys_handle; struct pipe_screen; struct pipe_context; struct pipe_resource; diff --git a/lib/mesa/src/gallium/include/state_tracker/winsys_handle.h b/lib/mesa/src/gallium/include/state_tracker/winsys_handle.h new file mode 100644 index 000000000..167c1a937 --- /dev/null +++ b/lib/mesa/src/gallium/include/state_tracker/winsys_handle.h @@ -0,0 +1,58 @@ + +#ifndef _WINSYS_HANDLE_H_ +#define _WINSYS_HANDLE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define WINSYS_HANDLE_TYPE_SHARED 0 +#define WINSYS_HANDLE_TYPE_KMS 1 +#define WINSYS_HANDLE_TYPE_FD 2 +#define WINSYS_HANDLE_TYPE_SHMID 3 + +/** + * For use with pipe_screen::{texture_from_handle|texture_get_handle}. + */ +struct winsys_handle +{ + /** + * Input for texture_from_handle, valid values are + * WINSYS_HANDLE_TYPE_SHARED or WINSYS_HANDLE_TYPE_FD. + * Input to texture_get_handle, + * to select handle for kms, flink, or prime. + */ + unsigned type; + /** + * Input for texture_get_handle, allows to export the offset + * of a specific layer of an array texture. + */ + unsigned layer; + /** + * Input to texture_from_handle. + * Output for texture_get_handle. + */ + unsigned handle; + /** + * Input to texture_from_handle. + * Output for texture_get_handle. + */ + unsigned stride; + /** + * Input to texture_from_handle. + * Output for texture_get_handle. + */ + unsigned offset; + + /** + * Input to resource_from_handle. + * Output from resource_get_handle. + */ + uint64_t modifier; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _WINSYS_HANDLE_H_ */ |