X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_winsys.h;h=d4bb176f9a82dc93bad1427c6c87553a3b8883e0;hb=f0f04cd12db156ec53b7ea46fae27199af121f90;hp=59f299c185865fc21fd25e3a8d8ca5aaf6ecaa95;hpb=cefee4e327c92daa2f01b6de650a43eddd348063;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h index 59f299c1858..d4bb176f9a8 100644 --- a/src/gallium/drivers/svga/svga_winsys.h +++ b/src/gallium/drivers/svga/svga_winsys.h @@ -51,6 +51,7 @@ struct pipe_context; struct pipe_fence_handle; struct pipe_texture; struct svga_region; +struct winsys_handle; #define SVGA_BUFFER_USAGE_PINNED (PIPE_BUFFER_USAGE_CUSTOM << 0) @@ -186,6 +187,25 @@ struct svga_winsys_screen uint32 numFaces, uint32 numMipLevels); + /** + * Creates a surface from a winsys handle. + * Used to implement pipe_screen::texture_from_handle. + */ + struct svga_winsys_surface * + (*surface_from_handle)(struct svga_winsys_screen *sws, + struct winsys_handle *whandle, + SVGA3dSurfaceFormat *format); + + /** + * Get a winsys_handle from a surface. + * Used to implement pipe_screen::texture_get_handle. + */ + boolean + (*surface_get_handle)(struct svga_winsys_screen *sws, + struct svga_winsys_surface *surface, + unsigned stride, + struct winsys_handle *whandle); + /** * Whether this surface is sitting in a validate list */ @@ -272,9 +292,6 @@ struct svga_winsys_screen }; -struct pipe_context * -svga_context_create(struct pipe_screen *screen); - struct pipe_screen * svga_screen_create(struct svga_winsys_screen *sws); @@ -286,14 +303,7 @@ svga_screen_buffer_wrap_surface(struct pipe_screen *screen, enum SVGA3dSurfaceFormat format, struct svga_winsys_surface *srf); -struct svga_winsys_surface * -svga_screen_texture_get_winsys_surface(struct pipe_texture *texture); struct svga_winsys_surface * svga_screen_buffer_get_winsys_surface(struct pipe_buffer *buffer); -boolean -svga_screen_buffer_from_texture(struct pipe_texture *texture, - struct pipe_buffer **buffer, - unsigned *stride); - #endif /* SVGA_WINSYS_H_ */