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 00050 #ifndef PB_BUFFER_FENCED_H_ 00051 #define PB_BUFFER_FENCED_H_ 00052 00053 00054 #include "pipe/p_debug.h" 00055 00056 00057 #ifdef __cplusplus 00058 extern "C" { 00059 #endif 00060 00061 00062 struct pipe_winsys; 00063 struct pipe_buffer; 00064 struct pipe_fence_handle; 00065 00066 00070 struct fenced_buffer_list; 00071 00072 00078 extern const struct pb_vtbl fenced_buffer_vtbl; 00079 00080 00086 struct fenced_buffer_list * 00087 fenced_buffer_list_create(struct pipe_winsys *winsys); 00088 00089 00093 void 00094 fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list, 00095 int wait); 00096 00097 00098 #ifdef DEBUG 00099 void 00100 fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list); 00101 #endif 00102 00103 00104 void 00105 fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list); 00106 00107 00113 struct pb_buffer * 00114 fenced_buffer_create(struct fenced_buffer_list *fenced, 00115 struct pb_buffer *buffer); 00116 00117 00124 void 00125 buffer_fence(struct pb_buffer *buf, 00126 struct pipe_fence_handle *fence); 00127 00128 00129 #ifdef __cplusplus 00130 } 00131 #endif 00132 00133 #endif /*PB_BUFFER_FENCED_H_*/