sct.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  * 
00003  * Copyright 2008 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 
00037 #ifndef SCT_H
00038 #define SCT_H
00039 
00040 
00041 #ifdef  __cplusplus
00042 extern "C" {
00043 #endif
00044 
00045 
00046 struct pipe_context;
00047 struct pipe_surface;
00048 
00049 struct sct_context;
00050 struct sct_surface;
00051 
00052 
00056 struct surface_context_tracker
00057 {
00058    struct sct_context *contexts;
00059    struct sct_surface *surfaces;
00060 };
00061 
00062 
00063 
00067 struct sct_context_list
00068 {
00069    const struct pipe_context *context;
00070    struct sct_context_list *next;
00071 };
00072 
00073 
00074 
00075 extern void
00076 sct_bind_surfaces(struct surface_context_tracker *sct,
00077                   struct pipe_context *context,
00078                   uint num_surf,
00079                   struct pipe_surface **surfaces);
00080 
00081 
00082 extern void
00083 sct_bind_texture(struct surface_context_tracker *sct,
00084                  struct pipe_context *context,
00085                  uint unit,
00086                  struct pipe_texture *texture);
00087 
00088 
00089 extern void
00090 sct_update_texture(struct pipe_texture *tex);
00091 
00092 
00093 extern boolean
00094 sct_is_texture_used(struct surface_context_tracker *sct,
00095                     const struct pipe_context *context,
00096                     const struct pipe_texture *texture);
00097 
00098 extern void
00099 sct_flush_textures(struct surface_context_tracker *sct,
00100                    struct pipe_context *context);
00101 
00102 
00103 extern const struct sct_context_list *
00104 sct_get_surface_contexts(struct surface_context_tracker *sct,
00105                          const struct pipe_surface *surf);
00106 
00107 
00108 extern void
00109 sct_destroy_context(struct surface_context_tracker *sct,
00110                     struct pipe_context *context);
00111 
00112 
00113 extern void
00114 sct_destroy_surface(struct surface_context_tracker *sct,
00115                     struct pipe_surface *surface);
00116 
00117 
00118 
00119 #ifdef  __cplusplus
00120 }
00121 #endif
00122 
00123 #endif /* SCT_H */

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