• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file is generated by venus-protocol.  See vn_protocol_driver.h. */
2 
3 /*
4  * Copyright 2020 Google LLC
5  * SPDX-License-Identifier: MIT
6  */
7 
8 #ifndef VN_PROTOCOL_DRIVER_HANDLES_H
9 #define VN_PROTOCOL_DRIVER_HANDLES_H
10 
11 #include "vn_protocol_driver_types.h"
12 
13 /* VK_DEFINE_HANDLE(VkInstance) */
14 
15 static inline size_t
vn_sizeof_VkInstance(const VkInstance * val)16 vn_sizeof_VkInstance(const VkInstance *val)
17 {
18     return sizeof(uint64_t);
19 }
20 
21 static inline void
vn_encode_VkInstance(struct vn_cs_encoder * enc,const VkInstance * val)22 vn_encode_VkInstance(struct vn_cs_encoder *enc, const VkInstance *val)
23 {
24     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_INSTANCE);
25     vn_encode_uint64_t(enc, &id);
26 }
27 
28 static inline void
vn_decode_VkInstance(struct vn_cs_decoder * dec,VkInstance * val)29 vn_decode_VkInstance(struct vn_cs_decoder *dec, VkInstance *val)
30 {
31     uint64_t id;
32     vn_decode_uint64_t(dec, &id);
33     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_INSTANCE);
34 }
35 
36 /* VK_DEFINE_HANDLE(VkPhysicalDevice) */
37 
38 static inline size_t
vn_sizeof_VkPhysicalDevice(const VkPhysicalDevice * val)39 vn_sizeof_VkPhysicalDevice(const VkPhysicalDevice *val)
40 {
41     return sizeof(uint64_t);
42 }
43 
44 static inline void
vn_encode_VkPhysicalDevice(struct vn_cs_encoder * enc,const VkPhysicalDevice * val)45 vn_encode_VkPhysicalDevice(struct vn_cs_encoder *enc, const VkPhysicalDevice *val)
46 {
47     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PHYSICAL_DEVICE);
48     vn_encode_uint64_t(enc, &id);
49 }
50 
51 static inline void
vn_decode_VkPhysicalDevice(struct vn_cs_decoder * dec,VkPhysicalDevice * val)52 vn_decode_VkPhysicalDevice(struct vn_cs_decoder *dec, VkPhysicalDevice *val)
53 {
54     uint64_t id;
55     vn_decode_uint64_t(dec, &id);
56     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PHYSICAL_DEVICE);
57 }
58 
59 /* VK_DEFINE_HANDLE(VkDevice) */
60 
61 static inline size_t
vn_sizeof_VkDevice(const VkDevice * val)62 vn_sizeof_VkDevice(const VkDevice *val)
63 {
64     return sizeof(uint64_t);
65 }
66 
67 static inline void
vn_encode_VkDevice(struct vn_cs_encoder * enc,const VkDevice * val)68 vn_encode_VkDevice(struct vn_cs_encoder *enc, const VkDevice *val)
69 {
70     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEVICE);
71     vn_encode_uint64_t(enc, &id);
72 }
73 
74 static inline void
vn_decode_VkDevice(struct vn_cs_decoder * dec,VkDevice * val)75 vn_decode_VkDevice(struct vn_cs_decoder *dec, VkDevice *val)
76 {
77     uint64_t id;
78     vn_decode_uint64_t(dec, &id);
79     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEVICE);
80 }
81 
82 /* VK_DEFINE_HANDLE(VkQueue) */
83 
84 static inline size_t
vn_sizeof_VkQueue(const VkQueue * val)85 vn_sizeof_VkQueue(const VkQueue *val)
86 {
87     return sizeof(uint64_t);
88 }
89 
90 static inline void
vn_encode_VkQueue(struct vn_cs_encoder * enc,const VkQueue * val)91 vn_encode_VkQueue(struct vn_cs_encoder *enc, const VkQueue *val)
92 {
93     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_QUEUE);
94     vn_encode_uint64_t(enc, &id);
95 }
96 
97 static inline void
vn_decode_VkQueue(struct vn_cs_decoder * dec,VkQueue * val)98 vn_decode_VkQueue(struct vn_cs_decoder *dec, VkQueue *val)
99 {
100     uint64_t id;
101     vn_decode_uint64_t(dec, &id);
102     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_QUEUE);
103 }
104 
105 /* VK_DEFINE_HANDLE(VkCommandBuffer) */
106 
107 static inline size_t
vn_sizeof_VkCommandBuffer(const VkCommandBuffer * val)108 vn_sizeof_VkCommandBuffer(const VkCommandBuffer *val)
109 {
110     return sizeof(uint64_t);
111 }
112 
113 static inline void
vn_encode_VkCommandBuffer(struct vn_cs_encoder * enc,const VkCommandBuffer * val)114 vn_encode_VkCommandBuffer(struct vn_cs_encoder *enc, const VkCommandBuffer *val)
115 {
116     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_COMMAND_BUFFER);
117     vn_encode_uint64_t(enc, &id);
118 }
119 
120 static inline void
vn_decode_VkCommandBuffer(struct vn_cs_decoder * dec,VkCommandBuffer * val)121 vn_decode_VkCommandBuffer(struct vn_cs_decoder *dec, VkCommandBuffer *val)
122 {
123     uint64_t id;
124     vn_decode_uint64_t(dec, &id);
125     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_COMMAND_BUFFER);
126 }
127 
128 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) */
129 
130 static inline size_t
vn_sizeof_VkDeviceMemory(const VkDeviceMemory * val)131 vn_sizeof_VkDeviceMemory(const VkDeviceMemory *val)
132 {
133     return sizeof(uint64_t);
134 }
135 
136 static inline void
vn_encode_VkDeviceMemory(struct vn_cs_encoder * enc,const VkDeviceMemory * val)137 vn_encode_VkDeviceMemory(struct vn_cs_encoder *enc, const VkDeviceMemory *val)
138 {
139     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEVICE_MEMORY);
140     vn_encode_uint64_t(enc, &id);
141 }
142 
143 static inline void
vn_decode_VkDeviceMemory(struct vn_cs_decoder * dec,VkDeviceMemory * val)144 vn_decode_VkDeviceMemory(struct vn_cs_decoder *dec, VkDeviceMemory *val)
145 {
146     uint64_t id;
147     vn_decode_uint64_t(dec, &id);
148     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEVICE_MEMORY);
149 }
150 
151 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) */
152 
153 static inline size_t
vn_sizeof_VkCommandPool(const VkCommandPool * val)154 vn_sizeof_VkCommandPool(const VkCommandPool *val)
155 {
156     return sizeof(uint64_t);
157 }
158 
159 static inline void
vn_encode_VkCommandPool(struct vn_cs_encoder * enc,const VkCommandPool * val)160 vn_encode_VkCommandPool(struct vn_cs_encoder *enc, const VkCommandPool *val)
161 {
162     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_COMMAND_POOL);
163     vn_encode_uint64_t(enc, &id);
164 }
165 
166 static inline void
vn_decode_VkCommandPool(struct vn_cs_decoder * dec,VkCommandPool * val)167 vn_decode_VkCommandPool(struct vn_cs_decoder *dec, VkCommandPool *val)
168 {
169     uint64_t id;
170     vn_decode_uint64_t(dec, &id);
171     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_COMMAND_POOL);
172 }
173 
174 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) */
175 
176 static inline size_t
vn_sizeof_VkBuffer(const VkBuffer * val)177 vn_sizeof_VkBuffer(const VkBuffer *val)
178 {
179     return sizeof(uint64_t);
180 }
181 
182 static inline void
vn_encode_VkBuffer(struct vn_cs_encoder * enc,const VkBuffer * val)183 vn_encode_VkBuffer(struct vn_cs_encoder *enc, const VkBuffer *val)
184 {
185     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_BUFFER);
186     vn_encode_uint64_t(enc, &id);
187 }
188 
189 static inline void
vn_decode_VkBuffer(struct vn_cs_decoder * dec,VkBuffer * val)190 vn_decode_VkBuffer(struct vn_cs_decoder *dec, VkBuffer *val)
191 {
192     uint64_t id;
193     vn_decode_uint64_t(dec, &id);
194     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_BUFFER);
195 }
196 
197 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) */
198 
199 static inline size_t
vn_sizeof_VkBufferView(const VkBufferView * val)200 vn_sizeof_VkBufferView(const VkBufferView *val)
201 {
202     return sizeof(uint64_t);
203 }
204 
205 static inline void
vn_encode_VkBufferView(struct vn_cs_encoder * enc,const VkBufferView * val)206 vn_encode_VkBufferView(struct vn_cs_encoder *enc, const VkBufferView *val)
207 {
208     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_BUFFER_VIEW);
209     vn_encode_uint64_t(enc, &id);
210 }
211 
212 static inline void
vn_decode_VkBufferView(struct vn_cs_decoder * dec,VkBufferView * val)213 vn_decode_VkBufferView(struct vn_cs_decoder *dec, VkBufferView *val)
214 {
215     uint64_t id;
216     vn_decode_uint64_t(dec, &id);
217     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_BUFFER_VIEW);
218 }
219 
220 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) */
221 
222 static inline size_t
vn_sizeof_VkImage(const VkImage * val)223 vn_sizeof_VkImage(const VkImage *val)
224 {
225     return sizeof(uint64_t);
226 }
227 
228 static inline void
vn_encode_VkImage(struct vn_cs_encoder * enc,const VkImage * val)229 vn_encode_VkImage(struct vn_cs_encoder *enc, const VkImage *val)
230 {
231     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_IMAGE);
232     vn_encode_uint64_t(enc, &id);
233 }
234 
235 static inline void
vn_decode_VkImage(struct vn_cs_decoder * dec,VkImage * val)236 vn_decode_VkImage(struct vn_cs_decoder *dec, VkImage *val)
237 {
238     uint64_t id;
239     vn_decode_uint64_t(dec, &id);
240     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_IMAGE);
241 }
242 
243 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) */
244 
245 static inline size_t
vn_sizeof_VkImageView(const VkImageView * val)246 vn_sizeof_VkImageView(const VkImageView *val)
247 {
248     return sizeof(uint64_t);
249 }
250 
251 static inline void
vn_encode_VkImageView(struct vn_cs_encoder * enc,const VkImageView * val)252 vn_encode_VkImageView(struct vn_cs_encoder *enc, const VkImageView *val)
253 {
254     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_IMAGE_VIEW);
255     vn_encode_uint64_t(enc, &id);
256 }
257 
258 static inline void
vn_decode_VkImageView(struct vn_cs_decoder * dec,VkImageView * val)259 vn_decode_VkImageView(struct vn_cs_decoder *dec, VkImageView *val)
260 {
261     uint64_t id;
262     vn_decode_uint64_t(dec, &id);
263     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_IMAGE_VIEW);
264 }
265 
266 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) */
267 
268 static inline size_t
vn_sizeof_VkShaderModule(const VkShaderModule * val)269 vn_sizeof_VkShaderModule(const VkShaderModule *val)
270 {
271     return sizeof(uint64_t);
272 }
273 
274 static inline void
vn_encode_VkShaderModule(struct vn_cs_encoder * enc,const VkShaderModule * val)275 vn_encode_VkShaderModule(struct vn_cs_encoder *enc, const VkShaderModule *val)
276 {
277     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SHADER_MODULE);
278     vn_encode_uint64_t(enc, &id);
279 }
280 
281 static inline void
vn_decode_VkShaderModule(struct vn_cs_decoder * dec,VkShaderModule * val)282 vn_decode_VkShaderModule(struct vn_cs_decoder *dec, VkShaderModule *val)
283 {
284     uint64_t id;
285     vn_decode_uint64_t(dec, &id);
286     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SHADER_MODULE);
287 }
288 
289 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) */
290 
291 static inline size_t
vn_sizeof_VkPipeline(const VkPipeline * val)292 vn_sizeof_VkPipeline(const VkPipeline *val)
293 {
294     return sizeof(uint64_t);
295 }
296 
297 static inline void
vn_encode_VkPipeline(struct vn_cs_encoder * enc,const VkPipeline * val)298 vn_encode_VkPipeline(struct vn_cs_encoder *enc, const VkPipeline *val)
299 {
300     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE);
301     vn_encode_uint64_t(enc, &id);
302 }
303 
304 static inline void
vn_decode_VkPipeline(struct vn_cs_decoder * dec,VkPipeline * val)305 vn_decode_VkPipeline(struct vn_cs_decoder *dec, VkPipeline *val)
306 {
307     uint64_t id;
308     vn_decode_uint64_t(dec, &id);
309     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE);
310 }
311 
312 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) */
313 
314 static inline size_t
vn_sizeof_VkPipelineLayout(const VkPipelineLayout * val)315 vn_sizeof_VkPipelineLayout(const VkPipelineLayout *val)
316 {
317     return sizeof(uint64_t);
318 }
319 
320 static inline void
vn_encode_VkPipelineLayout(struct vn_cs_encoder * enc,const VkPipelineLayout * val)321 vn_encode_VkPipelineLayout(struct vn_cs_encoder *enc, const VkPipelineLayout *val)
322 {
323     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE_LAYOUT);
324     vn_encode_uint64_t(enc, &id);
325 }
326 
327 static inline void
vn_decode_VkPipelineLayout(struct vn_cs_decoder * dec,VkPipelineLayout * val)328 vn_decode_VkPipelineLayout(struct vn_cs_decoder *dec, VkPipelineLayout *val)
329 {
330     uint64_t id;
331     vn_decode_uint64_t(dec, &id);
332     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE_LAYOUT);
333 }
334 
335 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) */
336 
337 static inline size_t
vn_sizeof_VkSampler(const VkSampler * val)338 vn_sizeof_VkSampler(const VkSampler *val)
339 {
340     return sizeof(uint64_t);
341 }
342 
343 static inline void
vn_encode_VkSampler(struct vn_cs_encoder * enc,const VkSampler * val)344 vn_encode_VkSampler(struct vn_cs_encoder *enc, const VkSampler *val)
345 {
346     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SAMPLER);
347     vn_encode_uint64_t(enc, &id);
348 }
349 
350 static inline void
vn_decode_VkSampler(struct vn_cs_decoder * dec,VkSampler * val)351 vn_decode_VkSampler(struct vn_cs_decoder *dec, VkSampler *val)
352 {
353     uint64_t id;
354     vn_decode_uint64_t(dec, &id);
355     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SAMPLER);
356 }
357 
358 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) */
359 
360 static inline size_t
vn_sizeof_VkDescriptorSet(const VkDescriptorSet * val)361 vn_sizeof_VkDescriptorSet(const VkDescriptorSet *val)
362 {
363     return sizeof(uint64_t);
364 }
365 
366 static inline void
vn_encode_VkDescriptorSet(struct vn_cs_encoder * enc,const VkDescriptorSet * val)367 vn_encode_VkDescriptorSet(struct vn_cs_encoder *enc, const VkDescriptorSet *val)
368 {
369     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET);
370     vn_encode_uint64_t(enc, &id);
371 }
372 
373 static inline void
vn_decode_VkDescriptorSet(struct vn_cs_decoder * dec,VkDescriptorSet * val)374 vn_decode_VkDescriptorSet(struct vn_cs_decoder *dec, VkDescriptorSet *val)
375 {
376     uint64_t id;
377     vn_decode_uint64_t(dec, &id);
378     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_SET);
379 }
380 
381 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) */
382 
383 static inline size_t
vn_sizeof_VkDescriptorSetLayout(const VkDescriptorSetLayout * val)384 vn_sizeof_VkDescriptorSetLayout(const VkDescriptorSetLayout *val)
385 {
386     return sizeof(uint64_t);
387 }
388 
389 static inline void
vn_encode_VkDescriptorSetLayout(struct vn_cs_encoder * enc,const VkDescriptorSetLayout * val)390 vn_encode_VkDescriptorSetLayout(struct vn_cs_encoder *enc, const VkDescriptorSetLayout *val)
391 {
392     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT);
393     vn_encode_uint64_t(enc, &id);
394 }
395 
396 static inline void
vn_decode_VkDescriptorSetLayout(struct vn_cs_decoder * dec,VkDescriptorSetLayout * val)397 vn_decode_VkDescriptorSetLayout(struct vn_cs_decoder *dec, VkDescriptorSetLayout *val)
398 {
399     uint64_t id;
400     vn_decode_uint64_t(dec, &id);
401     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT);
402 }
403 
404 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) */
405 
406 static inline size_t
vn_sizeof_VkDescriptorPool(const VkDescriptorPool * val)407 vn_sizeof_VkDescriptorPool(const VkDescriptorPool *val)
408 {
409     return sizeof(uint64_t);
410 }
411 
412 static inline void
vn_encode_VkDescriptorPool(struct vn_cs_encoder * enc,const VkDescriptorPool * val)413 vn_encode_VkDescriptorPool(struct vn_cs_encoder *enc, const VkDescriptorPool *val)
414 {
415     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_POOL);
416     vn_encode_uint64_t(enc, &id);
417 }
418 
419 static inline void
vn_decode_VkDescriptorPool(struct vn_cs_decoder * dec,VkDescriptorPool * val)420 vn_decode_VkDescriptorPool(struct vn_cs_decoder *dec, VkDescriptorPool *val)
421 {
422     uint64_t id;
423     vn_decode_uint64_t(dec, &id);
424     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_POOL);
425 }
426 
427 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) */
428 
429 static inline size_t
vn_sizeof_VkFence(const VkFence * val)430 vn_sizeof_VkFence(const VkFence *val)
431 {
432     return sizeof(uint64_t);
433 }
434 
435 static inline void
vn_encode_VkFence(struct vn_cs_encoder * enc,const VkFence * val)436 vn_encode_VkFence(struct vn_cs_encoder *enc, const VkFence *val)
437 {
438     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_FENCE);
439     vn_encode_uint64_t(enc, &id);
440 }
441 
442 static inline void
vn_decode_VkFence(struct vn_cs_decoder * dec,VkFence * val)443 vn_decode_VkFence(struct vn_cs_decoder *dec, VkFence *val)
444 {
445     uint64_t id;
446     vn_decode_uint64_t(dec, &id);
447     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_FENCE);
448 }
449 
450 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) */
451 
452 static inline size_t
vn_sizeof_VkSemaphore(const VkSemaphore * val)453 vn_sizeof_VkSemaphore(const VkSemaphore *val)
454 {
455     return sizeof(uint64_t);
456 }
457 
458 static inline void
vn_encode_VkSemaphore(struct vn_cs_encoder * enc,const VkSemaphore * val)459 vn_encode_VkSemaphore(struct vn_cs_encoder *enc, const VkSemaphore *val)
460 {
461     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SEMAPHORE);
462     vn_encode_uint64_t(enc, &id);
463 }
464 
465 static inline void
vn_decode_VkSemaphore(struct vn_cs_decoder * dec,VkSemaphore * val)466 vn_decode_VkSemaphore(struct vn_cs_decoder *dec, VkSemaphore *val)
467 {
468     uint64_t id;
469     vn_decode_uint64_t(dec, &id);
470     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SEMAPHORE);
471 }
472 
473 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) */
474 
475 static inline size_t
vn_sizeof_VkEvent(const VkEvent * val)476 vn_sizeof_VkEvent(const VkEvent *val)
477 {
478     return sizeof(uint64_t);
479 }
480 
481 static inline void
vn_encode_VkEvent(struct vn_cs_encoder * enc,const VkEvent * val)482 vn_encode_VkEvent(struct vn_cs_encoder *enc, const VkEvent *val)
483 {
484     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_EVENT);
485     vn_encode_uint64_t(enc, &id);
486 }
487 
488 static inline void
vn_decode_VkEvent(struct vn_cs_decoder * dec,VkEvent * val)489 vn_decode_VkEvent(struct vn_cs_decoder *dec, VkEvent *val)
490 {
491     uint64_t id;
492     vn_decode_uint64_t(dec, &id);
493     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_EVENT);
494 }
495 
496 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) */
497 
498 static inline size_t
vn_sizeof_VkQueryPool(const VkQueryPool * val)499 vn_sizeof_VkQueryPool(const VkQueryPool *val)
500 {
501     return sizeof(uint64_t);
502 }
503 
504 static inline void
vn_encode_VkQueryPool(struct vn_cs_encoder * enc,const VkQueryPool * val)505 vn_encode_VkQueryPool(struct vn_cs_encoder *enc, const VkQueryPool *val)
506 {
507     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_QUERY_POOL);
508     vn_encode_uint64_t(enc, &id);
509 }
510 
511 static inline void
vn_decode_VkQueryPool(struct vn_cs_decoder * dec,VkQueryPool * val)512 vn_decode_VkQueryPool(struct vn_cs_decoder *dec, VkQueryPool *val)
513 {
514     uint64_t id;
515     vn_decode_uint64_t(dec, &id);
516     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_QUERY_POOL);
517 }
518 
519 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) */
520 
521 static inline size_t
vn_sizeof_VkFramebuffer(const VkFramebuffer * val)522 vn_sizeof_VkFramebuffer(const VkFramebuffer *val)
523 {
524     return sizeof(uint64_t);
525 }
526 
527 static inline void
vn_encode_VkFramebuffer(struct vn_cs_encoder * enc,const VkFramebuffer * val)528 vn_encode_VkFramebuffer(struct vn_cs_encoder *enc, const VkFramebuffer *val)
529 {
530     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_FRAMEBUFFER);
531     vn_encode_uint64_t(enc, &id);
532 }
533 
534 static inline void
vn_decode_VkFramebuffer(struct vn_cs_decoder * dec,VkFramebuffer * val)535 vn_decode_VkFramebuffer(struct vn_cs_decoder *dec, VkFramebuffer *val)
536 {
537     uint64_t id;
538     vn_decode_uint64_t(dec, &id);
539     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_FRAMEBUFFER);
540 }
541 
542 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) */
543 
544 static inline size_t
vn_sizeof_VkRenderPass(const VkRenderPass * val)545 vn_sizeof_VkRenderPass(const VkRenderPass *val)
546 {
547     return sizeof(uint64_t);
548 }
549 
550 static inline void
vn_encode_VkRenderPass(struct vn_cs_encoder * enc,const VkRenderPass * val)551 vn_encode_VkRenderPass(struct vn_cs_encoder *enc, const VkRenderPass *val)
552 {
553     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_RENDER_PASS);
554     vn_encode_uint64_t(enc, &id);
555 }
556 
557 static inline void
vn_decode_VkRenderPass(struct vn_cs_decoder * dec,VkRenderPass * val)558 vn_decode_VkRenderPass(struct vn_cs_decoder *dec, VkRenderPass *val)
559 {
560     uint64_t id;
561     vn_decode_uint64_t(dec, &id);
562     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_RENDER_PASS);
563 }
564 
565 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) */
566 
567 static inline size_t
vn_sizeof_VkPipelineCache(const VkPipelineCache * val)568 vn_sizeof_VkPipelineCache(const VkPipelineCache *val)
569 {
570     return sizeof(uint64_t);
571 }
572 
573 static inline void
vn_encode_VkPipelineCache(struct vn_cs_encoder * enc,const VkPipelineCache * val)574 vn_encode_VkPipelineCache(struct vn_cs_encoder *enc, const VkPipelineCache *val)
575 {
576     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE_CACHE);
577     vn_encode_uint64_t(enc, &id);
578 }
579 
580 static inline void
vn_decode_VkPipelineCache(struct vn_cs_decoder * dec,VkPipelineCache * val)581 vn_decode_VkPipelineCache(struct vn_cs_decoder *dec, VkPipelineCache *val)
582 {
583     uint64_t id;
584     vn_decode_uint64_t(dec, &id);
585     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE_CACHE);
586 }
587 
588 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) */
589 
590 static inline size_t
vn_sizeof_VkDescriptorUpdateTemplate(const VkDescriptorUpdateTemplate * val)591 vn_sizeof_VkDescriptorUpdateTemplate(const VkDescriptorUpdateTemplate *val)
592 {
593     return sizeof(uint64_t);
594 }
595 
596 static inline void
vn_encode_VkDescriptorUpdateTemplate(struct vn_cs_encoder * enc,const VkDescriptorUpdateTemplate * val)597 vn_encode_VkDescriptorUpdateTemplate(struct vn_cs_encoder *enc, const VkDescriptorUpdateTemplate *val)
598 {
599     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE);
600     vn_encode_uint64_t(enc, &id);
601 }
602 
603 static inline void
vn_decode_VkDescriptorUpdateTemplate(struct vn_cs_decoder * dec,VkDescriptorUpdateTemplate * val)604 vn_decode_VkDescriptorUpdateTemplate(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplate *val)
605 {
606     uint64_t id;
607     vn_decode_uint64_t(dec, &id);
608     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE);
609 }
610 
611 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) */
612 
613 static inline size_t
vn_sizeof_VkSamplerYcbcrConversion(const VkSamplerYcbcrConversion * val)614 vn_sizeof_VkSamplerYcbcrConversion(const VkSamplerYcbcrConversion *val)
615 {
616     return sizeof(uint64_t);
617 }
618 
619 static inline void
vn_encode_VkSamplerYcbcrConversion(struct vn_cs_encoder * enc,const VkSamplerYcbcrConversion * val)620 vn_encode_VkSamplerYcbcrConversion(struct vn_cs_encoder *enc, const VkSamplerYcbcrConversion *val)
621 {
622     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION);
623     vn_encode_uint64_t(enc, &id);
624 }
625 
626 static inline void
vn_decode_VkSamplerYcbcrConversion(struct vn_cs_decoder * dec,VkSamplerYcbcrConversion * val)627 vn_decode_VkSamplerYcbcrConversion(struct vn_cs_decoder *dec, VkSamplerYcbcrConversion *val)
628 {
629     uint64_t id;
630     vn_decode_uint64_t(dec, &id);
631     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION);
632 }
633 
634 /* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlot) */
635 
636 static inline size_t
vn_sizeof_VkPrivateDataSlot(const VkPrivateDataSlot * val)637 vn_sizeof_VkPrivateDataSlot(const VkPrivateDataSlot *val)
638 {
639     return sizeof(uint64_t);
640 }
641 
642 static inline void
vn_encode_VkPrivateDataSlot(struct vn_cs_encoder * enc,const VkPrivateDataSlot * val)643 vn_encode_VkPrivateDataSlot(struct vn_cs_encoder *enc, const VkPrivateDataSlot *val)
644 {
645     const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT);
646     vn_encode_uint64_t(enc, &id);
647 }
648 
649 static inline void
vn_decode_VkPrivateDataSlot(struct vn_cs_decoder * dec,VkPrivateDataSlot * val)650 vn_decode_VkPrivateDataSlot(struct vn_cs_decoder *dec, VkPrivateDataSlot *val)
651 {
652     uint64_t id;
653     vn_decode_uint64_t(dec, &id);
654     vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT);
655 }
656 
657 #endif /* VN_PROTOCOL_DRIVER_HANDLES_H */
658