diff options
Diffstat (limited to 'src/gallium/include/state_tracker')
-rw-r--r-- | src/gallium/include/state_tracker/graw.h | 24 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 11 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/swrast_screen_create.h | 67 |
3 files changed, 34 insertions, 68 deletions
diff --git a/src/gallium/include/state_tracker/graw.h b/src/gallium/include/state_tracker/graw.h index 6a99b234aa..217fa31ba1 100644 --- a/src/gallium/include/state_tracker/graw.h +++ b/src/gallium/include/state_tracker/graw.h @@ -44,8 +44,9 @@ #include "pipe/p_compiler.h" #include "pipe/p_format.h" -struct pipe_screen; struct pipe_context; +struct pipe_screen; +struct pipe_surface; /* Returns a handle to be used with flush_frontbuffer()/present(). * @@ -71,4 +72,25 @@ PUBLIC void *graw_parse_vertex_shader( struct pipe_context *pipe, PUBLIC void *graw_parse_fragment_shader( struct pipe_context *pipe, const char *text ); +/* Parse a single command-line option, if any. Options include: + * + * -o <filename> + * + * If an option has been successfully parsed, argi is updated + * to point just after the option and return TRUE. + */ +PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]); + +/* Saves surface contents to a file. + * + * If filename is NULL, the filename provided with the `-o' option + * is used. If the option has not been specified, the surface + * will not be saved. + * + * Returns TRUE if the surface has been saved. + */ +PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe, + struct pipe_surface *surface, + const char *filename); + #endif diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 21e2165ed9..565a09614a 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -349,6 +349,12 @@ struct st_context_iface struct st_context_iface *stsrci, unsigned mask); /** + * Used to implement wglShareLists. + */ + boolean (*share)(struct st_context_iface *stctxi, + struct st_context_iface *stsrci); + + /** * Look up and return the info of a resource for EGLImage. * * This function is optional. @@ -402,6 +408,11 @@ struct st_manager struct st_api { /** + * The name of the rendering API. This is informative. + */ + const char *name; + + /** * The supported rendering API. */ enum st_api_type api; diff --git a/src/gallium/include/state_tracker/swrast_screen_create.h b/src/gallium/include/state_tracker/swrast_screen_create.h deleted file mode 100644 index a08f83a325..0000000000 --- a/src/gallium/include/state_tracker/swrast_screen_create.h +++ /dev/null @@ -1,67 +0,0 @@ -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "target-helpers/wrap_screen.h" - -struct sw_winsys; - -#ifdef GALLIUM_SOFTPIPE -#include "softpipe/sp_public.h" -#endif - -#ifdef GALLIUM_LLVMPIPE -#include "llvmpipe/lp_public.h" -#endif - -#ifdef GALLIUM_CELL -#include "cell/ppu/cell_public.h" -#endif - -/* - * Helper function to choose and instantiate one of the software rasterizers: - * cell, llvmpipe, softpipe. - * - * This function could be shared, but currently causes headaches for - * the build systems, particularly scons if we try. Long term, want - * to avoid having global #defines for things like GALLIUM_LLVMPIPE, - * GALLIUM_CELL, etc. Scons already eliminates those #defines, so - * things that are painful for it now are likely to be painful for - * other build systems in the future. - */ - -static INLINE struct pipe_screen * -swrast_screen_create(struct sw_winsys *winsys) -{ - const char *default_driver; - const char *driver; - struct pipe_screen *screen = NULL; - -#if defined(GALLIUM_CELL) - default_driver = "cell"; -#elif defined(GALLIUM_LLVMPIPE) - default_driver = "llvmpipe"; -#elif defined(GALLIUM_SOFTPIPE) - default_driver = "softpipe"; -#else - default_driver = ""; -#endif - - driver = debug_get_option("GALLIUM_DRIVER", default_driver); - -#if defined(GALLIUM_CELL) - if (screen == NULL && strcmp(driver, "cell") == 0) - screen = cell_create_screen( winsys ); -#endif - -#if defined(GALLIUM_LLVMPIPE) - if (screen == NULL && strcmp(driver, "llvmpipe") == 0) - screen = llvmpipe_create_screen( winsys ); -#endif - -#if defined(GALLIUM_SOFTPIPE) - if (screen == NULL) - screen = softpipe_create_screen( winsys ); -#endif - - return gallium_wrap_screen( screen ); -} - |