1 // Generated Code - DO NOT EDIT !!
2 // generated by 'emugen'
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include "magma_client_context.h"
6 
7 extern "C" {
8 	magma_status_t magma_device_import(magma_handle_t device_channel, magma_device_t* device_out);
9 	void magma_device_release(magma_device_t device);
10 	magma_status_t magma_device_query(magma_device_t device, uint64_t id, magma_handle_t* result_buffer_out, uint64_t* result_out);
11 	magma_status_t magma_device_query_fudge(magma_device_t device, uint64_t id, magma_bool_t host_allocate, uint64_t* result_buffer_mapping_id_inout, uint64_t* result_buffer_size_inout, uint64_t* result_out);
12 	magma_status_t magma_device_create_connection(magma_device_t device, magma_connection_t* connection_out);
13 	void magma_connection_release(magma_connection_t connection);
14 	magma_status_t magma_connection_get_error(magma_connection_t connection);
15 	magma_status_t magma_connection_create_context(magma_connection_t connection, uint32_t* context_id_out);
16 	void magma_connection_release_context(magma_connection_t connection, uint32_t context_id);
17 	magma_status_t magma_connection_create_buffer(magma_connection_t connection, uint64_t size, uint64_t* size_out, magma_buffer_t* buffer_out, magma_buffer_id_t* id_out);
18 	void magma_connection_release_buffer(magma_connection_t connection, magma_buffer_t buffer);
19 	magma_status_t magma_connection_import_buffer(magma_connection_t connection, magma_handle_t buffer_handle, uint64_t* size_out, magma_buffer_t* buffer_out, magma_buffer_id_t* id_out);
20 	magma_status_t magma_connection_create_semaphore(magma_connection_t connection, magma_semaphore_t* semaphore_out, magma_semaphore_id_t* id_out);
21 	void magma_connection_release_semaphore(magma_connection_t connection, magma_semaphore_t semaphore);
22 	magma_status_t magma_connection_import_semaphore(magma_connection_t connection, magma_handle_t semaphore_handle, magma_semaphore_t* semaphore_out, magma_semaphore_id_t* id_out);
23 	magma_status_t magma_connection_perform_buffer_op(magma_connection_t connection, magma_buffer_t buffer, uint32_t options, uint64_t start_offset, uint64_t length);
24 	magma_status_t magma_connection_map_buffer(magma_connection_t connection, uint64_t hw_va, magma_buffer_t buffer, uint64_t offset, uint64_t length, uint64_t map_flags);
25 	void magma_connection_unmap_buffer(magma_connection_t connection, uint64_t hw_va, magma_buffer_t buffer);
26 	magma_status_t magma_connection_execute_command(magma_connection_t connection, uint32_t context_id, magma_command_descriptor_t* descriptor);
27 	magma_status_t magma_connection_execute_command_fudge(magma_connection_t connection, uint32_t context_id, void* descriptor, uint64_t descriptor_size);
28 	magma_status_t magma_connection_execute_immediate_commands(magma_connection_t connection, uint32_t context_id, uint64_t command_count, magma_inline_command_buffer_t* command_buffers);
29 	magma_status_t magma_connection_execute_immediate_commands_fudge(magma_connection_t connection, uint32_t context_id, uint64_t command_count, void* command_buffers, uint64_t command_buffers_size, uint64_t* command_buffer_offsets);
30 	magma_status_t magma_connection_flush(magma_connection_t connection);
31 	magma_handle_t magma_connection_get_notification_channel_handle(magma_connection_t connection);
32 	magma_status_t magma_connection_read_notification_channel(magma_connection_t connection, void* buffer, uint64_t buffer_size, uint64_t* buffer_size_out, magma_bool_t* more_data_out);
33 	magma_status_t magma_buffer_clean_cache(magma_buffer_t buffer, uint64_t offset, uint64_t size, magma_cache_operation_t operation);
34 	magma_status_t magma_buffer_set_cache_policy(magma_buffer_t buffer, magma_cache_policy_t policy);
35 	magma_status_t magma_buffer_get_cache_policy(magma_buffer_t buffer, magma_cache_policy_t* cache_policy_out);
36 	magma_status_t magma_buffer_set_name(magma_buffer_t buffer, const char* name);
37 	magma_status_t magma_buffer_set_name_fudge(magma_buffer_t buffer, void* name, uint64_t name_size);
38 	magma_status_t magma_buffer_get_info(magma_buffer_t buffer, magma_buffer_info_t* info_out);
39 	magma_status_t magma_buffer_get_handle(magma_buffer_t buffer, magma_handle_t* handle_out);
40 	magma_status_t magma_buffer_export(magma_buffer_t buffer, magma_handle_t* buffer_handle_out);
41 	void magma_semaphore_signal(magma_semaphore_t semaphore);
42 	void magma_semaphore_reset(magma_semaphore_t semaphore);
43 	magma_status_t magma_semaphore_export(magma_semaphore_t semaphore, magma_handle_t* semaphore_handle_out);
44 	magma_status_t magma_poll(magma_poll_item_t* items, uint32_t count, uint64_t timeout_ns);
45 	magma_status_t magma_initialize_tracing(magma_handle_t channel);
46 	magma_status_t magma_initialize_logging(magma_handle_t channel);
47 	magma_status_t magma_connection_enable_performance_counter_access(magma_connection_t connection, magma_handle_t channel);
48 	magma_status_t magma_connection_enable_performance_counters(magma_connection_t connection, uint64_t* counters, uint64_t counters_count);
49 	magma_status_t magma_connection_create_performance_counter_buffer_pool(magma_connection_t connection, magma_perf_count_pool_t* pool_id_out, magma_handle_t* notification_handle_out);
50 	magma_status_t magma_connection_release_performance_counter_buffer_pool(magma_connection_t connection, magma_perf_count_pool_t pool_id);
51 	magma_status_t magma_connection_add_performance_counter_buffer_offsets_to_pool(magma_connection_t connection, magma_perf_count_pool_t pool_id, const magma_buffer_offset_t* offsets, uint64_t offsets_count);
52 	magma_status_t magma_connection_remove_performance_counter_buffer_from_pool(magma_connection_t connection, magma_perf_count_pool_t pool_id, magma_buffer_t buffer);
53 	magma_status_t magma_connection_dump_performance_counters(magma_connection_t connection, magma_perf_count_pool_t pool_id, uint32_t trigger_id);
54 	magma_status_t magma_connection_clear_performance_counters(magma_connection_t connection, uint64_t* counters, uint64_t counters_count);
55 	magma_status_t magma_connection_read_performance_counter_completion(magma_connection_t connection, magma_perf_count_pool_t pool_id, uint32_t* trigger_id_out, uint64_t* buffer_id_out, uint32_t* buffer_offset_out, uint64_t* time_out, uint32_t* result_flags_out);
56 	magma_status_t magma_virt_connection_create_image(magma_connection_t connection, magma_image_create_info_t* create_info, uint64_t* size_out, magma_buffer_t* image_out, magma_buffer_id_t* buffer_id_out);
57 	magma_status_t magma_virt_connection_get_image_info(magma_connection_t connection, magma_buffer_t image, magma_image_info_t* image_info_out);
58 };
59 
60 #ifndef GET_CONTEXT
61 static magma_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
setContextAccessor(CONTEXT_ACCESSOR_TYPE * f)62 void magma_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }
63 #define GET_CONTEXT magma_client_context_t * ctx = getCurrentContext()
64 #endif
65 
magma_device_import(magma_handle_t device_channel,magma_device_t * device_out)66 magma_status_t magma_device_import(magma_handle_t device_channel, magma_device_t* device_out)
67 {
68 	GET_CONTEXT;
69 	return ctx->magma_device_import(ctx, device_channel, device_out);
70 }
71 
magma_device_release(magma_device_t device)72 void magma_device_release(magma_device_t device)
73 {
74 	GET_CONTEXT;
75 	ctx->magma_device_release(ctx, device);
76 }
77 
magma_device_query(magma_device_t device,uint64_t id,magma_handle_t * result_buffer_out,uint64_t * result_out)78 magma_status_t magma_device_query(magma_device_t device, uint64_t id, magma_handle_t* result_buffer_out, uint64_t* result_out)
79 {
80 	GET_CONTEXT;
81 	return ctx->magma_device_query(ctx, device, id, result_buffer_out, result_out);
82 }
83 
magma_device_query_fudge(magma_device_t device,uint64_t id,magma_bool_t host_allocate,uint64_t * result_buffer_mapping_id_inout,uint64_t * result_buffer_size_inout,uint64_t * result_out)84 magma_status_t magma_device_query_fudge(magma_device_t device, uint64_t id, magma_bool_t host_allocate, uint64_t* result_buffer_mapping_id_inout, uint64_t* result_buffer_size_inout, uint64_t* result_out)
85 {
86 	GET_CONTEXT;
87 	return ctx->magma_device_query_fudge(ctx, device, id, host_allocate, result_buffer_mapping_id_inout, result_buffer_size_inout, result_out);
88 }
89 
magma_device_create_connection(magma_device_t device,magma_connection_t * connection_out)90 magma_status_t magma_device_create_connection(magma_device_t device, magma_connection_t* connection_out)
91 {
92 	GET_CONTEXT;
93 	return ctx->magma_device_create_connection(ctx, device, connection_out);
94 }
95 
magma_connection_release(magma_connection_t connection)96 void magma_connection_release(magma_connection_t connection)
97 {
98 	GET_CONTEXT;
99 	ctx->magma_connection_release(ctx, connection);
100 }
101 
magma_connection_get_error(magma_connection_t connection)102 magma_status_t magma_connection_get_error(magma_connection_t connection)
103 {
104 	GET_CONTEXT;
105 	return ctx->magma_connection_get_error(ctx, connection);
106 }
107 
magma_connection_create_context(magma_connection_t connection,uint32_t * context_id_out)108 magma_status_t magma_connection_create_context(magma_connection_t connection, uint32_t* context_id_out)
109 {
110 	GET_CONTEXT;
111 	return ctx->magma_connection_create_context(ctx, connection, context_id_out);
112 }
113 
magma_connection_release_context(magma_connection_t connection,uint32_t context_id)114 void magma_connection_release_context(magma_connection_t connection, uint32_t context_id)
115 {
116 	GET_CONTEXT;
117 	ctx->magma_connection_release_context(ctx, connection, context_id);
118 }
119 
magma_connection_create_buffer(magma_connection_t connection,uint64_t size,uint64_t * size_out,magma_buffer_t * buffer_out,magma_buffer_id_t * id_out)120 magma_status_t magma_connection_create_buffer(magma_connection_t connection, uint64_t size, uint64_t* size_out, magma_buffer_t* buffer_out, magma_buffer_id_t* id_out)
121 {
122 	GET_CONTEXT;
123 	return ctx->magma_connection_create_buffer(ctx, connection, size, size_out, buffer_out, id_out);
124 }
125 
magma_connection_release_buffer(magma_connection_t connection,magma_buffer_t buffer)126 void magma_connection_release_buffer(magma_connection_t connection, magma_buffer_t buffer)
127 {
128 	GET_CONTEXT;
129 	ctx->magma_connection_release_buffer(ctx, connection, buffer);
130 }
131 
magma_connection_import_buffer(magma_connection_t connection,magma_handle_t buffer_handle,uint64_t * size_out,magma_buffer_t * buffer_out,magma_buffer_id_t * id_out)132 magma_status_t magma_connection_import_buffer(magma_connection_t connection, magma_handle_t buffer_handle, uint64_t* size_out, magma_buffer_t* buffer_out, magma_buffer_id_t* id_out)
133 {
134 	GET_CONTEXT;
135 	return ctx->magma_connection_import_buffer(ctx, connection, buffer_handle, size_out, buffer_out, id_out);
136 }
137 
magma_connection_create_semaphore(magma_connection_t connection,magma_semaphore_t * semaphore_out,magma_semaphore_id_t * id_out)138 magma_status_t magma_connection_create_semaphore(magma_connection_t connection, magma_semaphore_t* semaphore_out, magma_semaphore_id_t* id_out)
139 {
140 	GET_CONTEXT;
141 	return ctx->magma_connection_create_semaphore(ctx, connection, semaphore_out, id_out);
142 }
143 
magma_connection_release_semaphore(magma_connection_t connection,magma_semaphore_t semaphore)144 void magma_connection_release_semaphore(magma_connection_t connection, magma_semaphore_t semaphore)
145 {
146 	GET_CONTEXT;
147 	ctx->magma_connection_release_semaphore(ctx, connection, semaphore);
148 }
149 
magma_connection_import_semaphore(magma_connection_t connection,magma_handle_t semaphore_handle,magma_semaphore_t * semaphore_out,magma_semaphore_id_t * id_out)150 magma_status_t magma_connection_import_semaphore(magma_connection_t connection, magma_handle_t semaphore_handle, magma_semaphore_t* semaphore_out, magma_semaphore_id_t* id_out)
151 {
152 	GET_CONTEXT;
153 	return ctx->magma_connection_import_semaphore(ctx, connection, semaphore_handle, semaphore_out, id_out);
154 }
155 
magma_connection_perform_buffer_op(magma_connection_t connection,magma_buffer_t buffer,uint32_t options,uint64_t start_offset,uint64_t length)156 magma_status_t magma_connection_perform_buffer_op(magma_connection_t connection, magma_buffer_t buffer, uint32_t options, uint64_t start_offset, uint64_t length)
157 {
158 	GET_CONTEXT;
159 	return ctx->magma_connection_perform_buffer_op(ctx, connection, buffer, options, start_offset, length);
160 }
161 
magma_connection_map_buffer(magma_connection_t connection,uint64_t hw_va,magma_buffer_t buffer,uint64_t offset,uint64_t length,uint64_t map_flags)162 magma_status_t magma_connection_map_buffer(magma_connection_t connection, uint64_t hw_va, magma_buffer_t buffer, uint64_t offset, uint64_t length, uint64_t map_flags)
163 {
164 	GET_CONTEXT;
165 	return ctx->magma_connection_map_buffer(ctx, connection, hw_va, buffer, offset, length, map_flags);
166 }
167 
magma_connection_unmap_buffer(magma_connection_t connection,uint64_t hw_va,magma_buffer_t buffer)168 void magma_connection_unmap_buffer(magma_connection_t connection, uint64_t hw_va, magma_buffer_t buffer)
169 {
170 	GET_CONTEXT;
171 	ctx->magma_connection_unmap_buffer(ctx, connection, hw_va, buffer);
172 }
173 
magma_connection_execute_command(magma_connection_t connection,uint32_t context_id,magma_command_descriptor_t * descriptor)174 magma_status_t magma_connection_execute_command(magma_connection_t connection, uint32_t context_id, magma_command_descriptor_t* descriptor)
175 {
176 	GET_CONTEXT;
177 	return ctx->magma_connection_execute_command(ctx, connection, context_id, descriptor);
178 }
179 
magma_connection_execute_command_fudge(magma_connection_t connection,uint32_t context_id,void * descriptor,uint64_t descriptor_size)180 magma_status_t magma_connection_execute_command_fudge(magma_connection_t connection, uint32_t context_id, void* descriptor, uint64_t descriptor_size)
181 {
182 	GET_CONTEXT;
183 	return ctx->magma_connection_execute_command_fudge(ctx, connection, context_id, descriptor, descriptor_size);
184 }
185 
magma_connection_execute_immediate_commands(magma_connection_t connection,uint32_t context_id,uint64_t command_count,magma_inline_command_buffer_t * command_buffers)186 magma_status_t magma_connection_execute_immediate_commands(magma_connection_t connection, uint32_t context_id, uint64_t command_count, magma_inline_command_buffer_t* command_buffers)
187 {
188 	GET_CONTEXT;
189 	return ctx->magma_connection_execute_immediate_commands(ctx, connection, context_id, command_count, command_buffers);
190 }
191 
magma_connection_execute_immediate_commands_fudge(magma_connection_t connection,uint32_t context_id,uint64_t command_count,void * command_buffers,uint64_t command_buffers_size,uint64_t * command_buffer_offsets)192 magma_status_t magma_connection_execute_immediate_commands_fudge(magma_connection_t connection, uint32_t context_id, uint64_t command_count, void* command_buffers, uint64_t command_buffers_size, uint64_t* command_buffer_offsets)
193 {
194 	GET_CONTEXT;
195 	return ctx->magma_connection_execute_immediate_commands_fudge(ctx, connection, context_id, command_count, command_buffers, command_buffers_size, command_buffer_offsets);
196 }
197 
magma_connection_flush(magma_connection_t connection)198 magma_status_t magma_connection_flush(magma_connection_t connection)
199 {
200 	GET_CONTEXT;
201 	return ctx->magma_connection_flush(ctx, connection);
202 }
203 
magma_connection_get_notification_channel_handle(magma_connection_t connection)204 magma_handle_t magma_connection_get_notification_channel_handle(magma_connection_t connection)
205 {
206 	GET_CONTEXT;
207 	return ctx->magma_connection_get_notification_channel_handle(ctx, connection);
208 }
209 
magma_connection_read_notification_channel(magma_connection_t connection,void * buffer,uint64_t buffer_size,uint64_t * buffer_size_out,magma_bool_t * more_data_out)210 magma_status_t magma_connection_read_notification_channel(magma_connection_t connection, void* buffer, uint64_t buffer_size, uint64_t* buffer_size_out, magma_bool_t* more_data_out)
211 {
212 	GET_CONTEXT;
213 	return ctx->magma_connection_read_notification_channel(ctx, connection, buffer, buffer_size, buffer_size_out, more_data_out);
214 }
215 
magma_buffer_clean_cache(magma_buffer_t buffer,uint64_t offset,uint64_t size,magma_cache_operation_t operation)216 magma_status_t magma_buffer_clean_cache(magma_buffer_t buffer, uint64_t offset, uint64_t size, magma_cache_operation_t operation)
217 {
218 	GET_CONTEXT;
219 	return ctx->magma_buffer_clean_cache(ctx, buffer, offset, size, operation);
220 }
221 
magma_buffer_set_cache_policy(magma_buffer_t buffer,magma_cache_policy_t policy)222 magma_status_t magma_buffer_set_cache_policy(magma_buffer_t buffer, magma_cache_policy_t policy)
223 {
224 	GET_CONTEXT;
225 	return ctx->magma_buffer_set_cache_policy(ctx, buffer, policy);
226 }
227 
magma_buffer_get_cache_policy(magma_buffer_t buffer,magma_cache_policy_t * cache_policy_out)228 magma_status_t magma_buffer_get_cache_policy(magma_buffer_t buffer, magma_cache_policy_t* cache_policy_out)
229 {
230 	GET_CONTEXT;
231 	return ctx->magma_buffer_get_cache_policy(ctx, buffer, cache_policy_out);
232 }
233 
magma_buffer_set_name(magma_buffer_t buffer,const char * name)234 magma_status_t magma_buffer_set_name(magma_buffer_t buffer, const char* name)
235 {
236 	GET_CONTEXT;
237 	return ctx->magma_buffer_set_name(ctx, buffer, name);
238 }
239 
magma_buffer_set_name_fudge(magma_buffer_t buffer,void * name,uint64_t name_size)240 magma_status_t magma_buffer_set_name_fudge(magma_buffer_t buffer, void* name, uint64_t name_size)
241 {
242 	GET_CONTEXT;
243 	return ctx->magma_buffer_set_name_fudge(ctx, buffer, name, name_size);
244 }
245 
magma_buffer_get_info(magma_buffer_t buffer,magma_buffer_info_t * info_out)246 magma_status_t magma_buffer_get_info(magma_buffer_t buffer, magma_buffer_info_t* info_out)
247 {
248 	GET_CONTEXT;
249 	return ctx->magma_buffer_get_info(ctx, buffer, info_out);
250 }
251 
magma_buffer_get_handle(magma_buffer_t buffer,magma_handle_t * handle_out)252 magma_status_t magma_buffer_get_handle(magma_buffer_t buffer, magma_handle_t* handle_out)
253 {
254 	GET_CONTEXT;
255 	return ctx->magma_buffer_get_handle(ctx, buffer, handle_out);
256 }
257 
magma_buffer_export(magma_buffer_t buffer,magma_handle_t * buffer_handle_out)258 magma_status_t magma_buffer_export(magma_buffer_t buffer, magma_handle_t* buffer_handle_out)
259 {
260 	GET_CONTEXT;
261 	return ctx->magma_buffer_export(ctx, buffer, buffer_handle_out);
262 }
263 
magma_semaphore_signal(magma_semaphore_t semaphore)264 void magma_semaphore_signal(magma_semaphore_t semaphore)
265 {
266 	GET_CONTEXT;
267 	ctx->magma_semaphore_signal(ctx, semaphore);
268 }
269 
magma_semaphore_reset(magma_semaphore_t semaphore)270 void magma_semaphore_reset(magma_semaphore_t semaphore)
271 {
272 	GET_CONTEXT;
273 	ctx->magma_semaphore_reset(ctx, semaphore);
274 }
275 
magma_semaphore_export(magma_semaphore_t semaphore,magma_handle_t * semaphore_handle_out)276 magma_status_t magma_semaphore_export(magma_semaphore_t semaphore, magma_handle_t* semaphore_handle_out)
277 {
278 	GET_CONTEXT;
279 	return ctx->magma_semaphore_export(ctx, semaphore, semaphore_handle_out);
280 }
281 
magma_poll(magma_poll_item_t * items,uint32_t count,uint64_t timeout_ns)282 magma_status_t magma_poll(magma_poll_item_t* items, uint32_t count, uint64_t timeout_ns)
283 {
284 	GET_CONTEXT;
285 	return ctx->magma_poll(ctx, items, count, timeout_ns);
286 }
287 
magma_initialize_tracing(magma_handle_t channel)288 magma_status_t magma_initialize_tracing(magma_handle_t channel)
289 {
290 	GET_CONTEXT;
291 	return ctx->magma_initialize_tracing(ctx, channel);
292 }
293 
magma_initialize_logging(magma_handle_t channel)294 magma_status_t magma_initialize_logging(magma_handle_t channel)
295 {
296 	GET_CONTEXT;
297 	return ctx->magma_initialize_logging(ctx, channel);
298 }
299 
magma_connection_enable_performance_counter_access(magma_connection_t connection,magma_handle_t channel)300 magma_status_t magma_connection_enable_performance_counter_access(magma_connection_t connection, magma_handle_t channel)
301 {
302 	GET_CONTEXT;
303 	return ctx->magma_connection_enable_performance_counter_access(ctx, connection, channel);
304 }
305 
magma_connection_enable_performance_counters(magma_connection_t connection,uint64_t * counters,uint64_t counters_count)306 magma_status_t magma_connection_enable_performance_counters(magma_connection_t connection, uint64_t* counters, uint64_t counters_count)
307 {
308 	GET_CONTEXT;
309 	return ctx->magma_connection_enable_performance_counters(ctx, connection, counters, counters_count);
310 }
311 
magma_connection_create_performance_counter_buffer_pool(magma_connection_t connection,magma_perf_count_pool_t * pool_id_out,magma_handle_t * notification_handle_out)312 magma_status_t magma_connection_create_performance_counter_buffer_pool(magma_connection_t connection, magma_perf_count_pool_t* pool_id_out, magma_handle_t* notification_handle_out)
313 {
314 	GET_CONTEXT;
315 	return ctx->magma_connection_create_performance_counter_buffer_pool(ctx, connection, pool_id_out, notification_handle_out);
316 }
317 
magma_connection_release_performance_counter_buffer_pool(magma_connection_t connection,magma_perf_count_pool_t pool_id)318 magma_status_t magma_connection_release_performance_counter_buffer_pool(magma_connection_t connection, magma_perf_count_pool_t pool_id)
319 {
320 	GET_CONTEXT;
321 	return ctx->magma_connection_release_performance_counter_buffer_pool(ctx, connection, pool_id);
322 }
323 
magma_connection_add_performance_counter_buffer_offsets_to_pool(magma_connection_t connection,magma_perf_count_pool_t pool_id,const magma_buffer_offset_t * offsets,uint64_t offsets_count)324 magma_status_t magma_connection_add_performance_counter_buffer_offsets_to_pool(magma_connection_t connection, magma_perf_count_pool_t pool_id, const magma_buffer_offset_t* offsets, uint64_t offsets_count)
325 {
326 	GET_CONTEXT;
327 	return ctx->magma_connection_add_performance_counter_buffer_offsets_to_pool(ctx, connection, pool_id, offsets, offsets_count);
328 }
329 
magma_connection_remove_performance_counter_buffer_from_pool(magma_connection_t connection,magma_perf_count_pool_t pool_id,magma_buffer_t buffer)330 magma_status_t magma_connection_remove_performance_counter_buffer_from_pool(magma_connection_t connection, magma_perf_count_pool_t pool_id, magma_buffer_t buffer)
331 {
332 	GET_CONTEXT;
333 	return ctx->magma_connection_remove_performance_counter_buffer_from_pool(ctx, connection, pool_id, buffer);
334 }
335 
magma_connection_dump_performance_counters(magma_connection_t connection,magma_perf_count_pool_t pool_id,uint32_t trigger_id)336 magma_status_t magma_connection_dump_performance_counters(magma_connection_t connection, magma_perf_count_pool_t pool_id, uint32_t trigger_id)
337 {
338 	GET_CONTEXT;
339 	return ctx->magma_connection_dump_performance_counters(ctx, connection, pool_id, trigger_id);
340 }
341 
magma_connection_clear_performance_counters(magma_connection_t connection,uint64_t * counters,uint64_t counters_count)342 magma_status_t magma_connection_clear_performance_counters(magma_connection_t connection, uint64_t* counters, uint64_t counters_count)
343 {
344 	GET_CONTEXT;
345 	return ctx->magma_connection_clear_performance_counters(ctx, connection, counters, counters_count);
346 }
347 
magma_connection_read_performance_counter_completion(magma_connection_t connection,magma_perf_count_pool_t pool_id,uint32_t * trigger_id_out,uint64_t * buffer_id_out,uint32_t * buffer_offset_out,uint64_t * time_out,uint32_t * result_flags_out)348 magma_status_t magma_connection_read_performance_counter_completion(magma_connection_t connection, magma_perf_count_pool_t pool_id, uint32_t* trigger_id_out, uint64_t* buffer_id_out, uint32_t* buffer_offset_out, uint64_t* time_out, uint32_t* result_flags_out)
349 {
350 	GET_CONTEXT;
351 	return ctx->magma_connection_read_performance_counter_completion(ctx, connection, pool_id, trigger_id_out, buffer_id_out, buffer_offset_out, time_out, result_flags_out);
352 }
353 
magma_virt_connection_create_image(magma_connection_t connection,magma_image_create_info_t * create_info,uint64_t * size_out,magma_buffer_t * image_out,magma_buffer_id_t * buffer_id_out)354 magma_status_t magma_virt_connection_create_image(magma_connection_t connection, magma_image_create_info_t* create_info, uint64_t* size_out, magma_buffer_t* image_out, magma_buffer_id_t* buffer_id_out)
355 {
356 	GET_CONTEXT;
357 	return ctx->magma_virt_connection_create_image(ctx, connection, create_info, size_out, image_out, buffer_id_out);
358 }
359 
magma_virt_connection_get_image_info(magma_connection_t connection,magma_buffer_t image,magma_image_info_t * image_info_out)360 magma_status_t magma_virt_connection_get_image_info(magma_connection_t connection, magma_buffer_t image, magma_image_info_t* image_info_out)
361 {
362 	GET_CONTEXT;
363 	return ctx->magma_virt_connection_get_image_info(ctx, connection, image, image_info_out);
364 }
365 
366