00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00049 #ifndef PB_BUFMGR_H_
00050 #define PB_BUFMGR_H_
00051
00052
00053 #include "pipe/p_compiler.h"
00054 #include "pipe/p_error.h"
00055
00056
00057 #ifdef __cplusplus
00058 extern "C" {
00059 #endif
00060
00061
00062 struct pb_desc;
00063 struct pipe_buffer;
00064 struct pipe_winsys;
00065
00066
00070 struct pb_manager
00071 {
00072 void
00073 (*destroy)( struct pb_manager *mgr );
00074
00075 struct pb_buffer *
00076 (*create_buffer)( struct pb_manager *mgr,
00077 size_t size,
00078 const struct pb_desc *desc);
00079
00086 void
00087 (*flush)( struct pb_manager *mgr );
00088 };
00089
00090
00096 struct pb_manager *
00097 pb_malloc_bufmgr_create(void);
00098
00099
00108 struct pb_manager *
00109 pool_bufmgr_create(struct pb_manager *provider,
00110 size_t n, size_t size,
00111 const struct pb_desc *desc);
00112
00113
00121 struct pb_manager *
00122 mm_bufmgr_create(struct pb_manager *provider,
00123 size_t size, size_t align2);
00124
00130 struct pb_manager *
00131 mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
00132 size_t size, size_t align2);
00133
00134
00138 struct pb_manager *
00139 pb_slab_manager_create(struct pb_manager *provider,
00140 size_t bufSize,
00141 size_t slabSize,
00142 const struct pb_desc *desc);
00143
00148 struct pb_manager *
00149 pb_slab_range_manager_create(struct pb_manager *provider,
00150 size_t minBufSize,
00151 size_t maxBufSize,
00152 size_t slabSize,
00153 const struct pb_desc *desc);
00154
00155
00161 struct pb_manager *
00162 pb_cache_manager_create(struct pb_manager *provider,
00163 unsigned usecs);
00164
00165
00175 struct pb_manager *
00176 fenced_bufmgr_create(struct pb_manager *provider,
00177 struct pipe_winsys *winsys);
00178
00179
00180 struct pb_manager *
00181 pb_alt_manager_create(struct pb_manager *provider1,
00182 struct pb_manager *provider2);
00183
00184
00190 struct pb_manager *
00191 pb_debug_manager_create(struct pb_manager *provider, size_t band_size);
00192
00193
00194 #ifdef __cplusplus
00195 }
00196 #endif
00197
00198 #endif