i915_winsys.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  * 
00003  * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
00004  * All Rights Reserved.
00005  * 
00006  * Permission is hereby granted, free of charge, to any person obtaining a
00007  * copy of this software and associated documentation files (the
00008  * "Software"), to deal in the Software without restriction, including
00009  * without limitation the rights to use, copy, modify, merge, publish,
00010  * distribute, sub license, and/or sell copies of the Software, and to
00011  * permit persons to whom the Software is furnished to do so, subject to
00012  * the following conditions:
00013  * 
00014  * The above copyright notice and this permission notice (including the
00015  * next paragraph) shall be included in all copies or substantial portions
00016  * of the Software.
00017  * 
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00019  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
00021  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
00022  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00023  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00024  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  * 
00026  **************************************************************************/
00027 
00036 #ifndef I915_WINSYS_H
00037 #define I915_WINSYS_H
00038 
00039 
00040 #include "pipe/p_defines.h"
00041 
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046 
00047    
00048 /* Pipe drivers are (meant to be!) independent of both GL and the
00049  * window system.  The window system provides a buffer manager and a
00050  * set of additional hooks for things like command buffer submission,
00051  * etc.
00052  *
00053  * There clearly has to be some agreement between the window system
00054  * driver and the hardware driver about the format of command buffers,
00055  * etc.
00056  */
00057 
00058 struct i915_batchbuffer;
00059 struct pipe_buffer;
00060 struct pipe_fence_handle;
00061 struct pipe_winsys;
00062 struct pipe_screen;
00063 
00064 
00076 struct i915_winsys {
00077 
00078    void (*destroy)( struct i915_winsys *sws );
00079    
00083    struct i915_batchbuffer *(*batch_get)( struct i915_winsys *sws );
00084 
00095    void (*batch_reloc)( struct i915_winsys *sws,
00096                         struct pipe_buffer *buf,
00097                         unsigned access_flags,
00098                         unsigned delta );
00099 
00103    void (*batch_flush)( struct i915_winsys *sws,
00104                         struct pipe_fence_handle **fence );
00105 };
00106 
00107 #define I915_BUFFER_ACCESS_WRITE   0x1 
00108 #define I915_BUFFER_ACCESS_READ    0x2
00109 
00110 #define I915_BUFFER_USAGE_LIT_VERTEX  (PIPE_BUFFER_USAGE_CUSTOM << 0)
00111 
00112 
00113 struct pipe_context *i915_create_context( struct pipe_screen *,
00114                                           struct pipe_winsys *,
00115                                           struct i915_winsys * );
00116 
00117 #ifdef __cplusplus
00118 }
00119 #endif
00120 
00121 #endif 

Generated on Tue Sep 29 06:25:16 2009 for Gallium3D by  doxygen 1.5.4