summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-03-08 19:11:35 +0000
committerKeith Whitwell <[email protected]>2010-03-08 19:11:35 +0000
commit99f11d0e18e1ff5a433c84d52ffc13b9684c2650 (patch)
tree37e702c2ed563bcef7b89db84a15a9c8b96f9048 /src/gallium/include
parent90b3baf9b3d0236cbecb171f2e742c9157dd312d (diff)
gallium: introduce target directory
Currently there are still at least two functions bundled up inside the winsys concept: a) that of a backend resource manager, sometimes capable of performing present() operations, b) the initialization code/routine for the whole driver stack. The inclusion of (b) makes it difficult to share implementations of (a) between different drivers. For instance, a clean xlib winsys could be of use for software-rasterized VG, GLES, EGL, etc, stacks. But that is only true as long as there is no dependency from the winsys to higher level code, as would be the case when we include (b) in this component. This change creates a new gallium/targets subtree, specifically for implementing the glue needed to build individual driver stacks, and moves that code out of a single example winsys, namely xlib. Other drivers continue to build unchanged, but hopefully can migrate to this structure over time.
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/state_tracker/xlib_sw_winsys.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gallium/include/state_tracker/xlib_sw_winsys.h b/src/gallium/include/state_tracker/xlib_sw_winsys.h
index 71d39b9cdb9..c703d3b66ca 100644
--- a/src/gallium/include/state_tracker/xlib_sw_winsys.h
+++ b/src/gallium/include/state_tracker/xlib_sw_winsys.h
@@ -4,7 +4,9 @@
#include "state_tracker/sw_winsys.h"
#include <X11/Xlib.h>
-struct sw_winsys *xlib_create_sw_winsys( Display *display );
+
+struct pipe_screen;
+struct pipe_surface;
/* This is what the xlib software winsys expects to find in the
* "private" field of flush_frontbuffers(). Xlib-based state trackers
@@ -17,9 +19,16 @@ struct xlib_drawable {
GC gc; /* temporary? */
};
-void
-xlib_sw_display(struct xlib_drawable *xm_buffer,
- struct sw_displaytarget *dt);
+struct xm_driver {
+ struct pipe_screen *(*create_pipe_screen)( Display *display );
+
+ void (*display_surface)( struct xlib_drawable *,
+ struct pipe_surface * );
+};
+
+/* Called by the libgl-xlib target code to build the rendering stack.
+ */
+struct xm_driver *xlib_sw_winsys_init( void );
#endif