Test descriptor_update_template, push_descriptor
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / framework / vulkan / vkRefUtilImpl.inl
1 /* WARNING: This is auto-generated file. Do not modify, since changes will
2  * be lost! Modify the generating script instead.
3  */
4 namespace refdetails
5 {
6
7 template<>
8 void Deleter<VkDeviceMemory>::operator() (VkDeviceMemory obj) const
9 {
10         m_deviceIface->freeMemory(m_device, obj, m_allocator);
11 }
12
13 template<>
14 void Deleter<VkFence>::operator() (VkFence obj) const
15 {
16         m_deviceIface->destroyFence(m_device, obj, m_allocator);
17 }
18
19 template<>
20 void Deleter<VkSemaphore>::operator() (VkSemaphore obj) const
21 {
22         m_deviceIface->destroySemaphore(m_device, obj, m_allocator);
23 }
24
25 template<>
26 void Deleter<VkEvent>::operator() (VkEvent obj) const
27 {
28         m_deviceIface->destroyEvent(m_device, obj, m_allocator);
29 }
30
31 template<>
32 void Deleter<VkQueryPool>::operator() (VkQueryPool obj) const
33 {
34         m_deviceIface->destroyQueryPool(m_device, obj, m_allocator);
35 }
36
37 template<>
38 void Deleter<VkBuffer>::operator() (VkBuffer obj) const
39 {
40         m_deviceIface->destroyBuffer(m_device, obj, m_allocator);
41 }
42
43 template<>
44 void Deleter<VkBufferView>::operator() (VkBufferView obj) const
45 {
46         m_deviceIface->destroyBufferView(m_device, obj, m_allocator);
47 }
48
49 template<>
50 void Deleter<VkImage>::operator() (VkImage obj) const
51 {
52         m_deviceIface->destroyImage(m_device, obj, m_allocator);
53 }
54
55 template<>
56 void Deleter<VkImageView>::operator() (VkImageView obj) const
57 {
58         m_deviceIface->destroyImageView(m_device, obj, m_allocator);
59 }
60
61 template<>
62 void Deleter<VkShaderModule>::operator() (VkShaderModule obj) const
63 {
64         m_deviceIface->destroyShaderModule(m_device, obj, m_allocator);
65 }
66
67 template<>
68 void Deleter<VkPipelineCache>::operator() (VkPipelineCache obj) const
69 {
70         m_deviceIface->destroyPipelineCache(m_device, obj, m_allocator);
71 }
72
73 template<>
74 void Deleter<VkPipeline>::operator() (VkPipeline obj) const
75 {
76         m_deviceIface->destroyPipeline(m_device, obj, m_allocator);
77 }
78
79 template<>
80 void Deleter<VkPipelineLayout>::operator() (VkPipelineLayout obj) const
81 {
82         m_deviceIface->destroyPipelineLayout(m_device, obj, m_allocator);
83 }
84
85 template<>
86 void Deleter<VkSampler>::operator() (VkSampler obj) const
87 {
88         m_deviceIface->destroySampler(m_device, obj, m_allocator);
89 }
90
91 template<>
92 void Deleter<VkDescriptorSetLayout>::operator() (VkDescriptorSetLayout obj) const
93 {
94         m_deviceIface->destroyDescriptorSetLayout(m_device, obj, m_allocator);
95 }
96
97 template<>
98 void Deleter<VkDescriptorPool>::operator() (VkDescriptorPool obj) const
99 {
100         m_deviceIface->destroyDescriptorPool(m_device, obj, m_allocator);
101 }
102
103 template<>
104 void Deleter<VkFramebuffer>::operator() (VkFramebuffer obj) const
105 {
106         m_deviceIface->destroyFramebuffer(m_device, obj, m_allocator);
107 }
108
109 template<>
110 void Deleter<VkRenderPass>::operator() (VkRenderPass obj) const
111 {
112         m_deviceIface->destroyRenderPass(m_device, obj, m_allocator);
113 }
114
115 template<>
116 void Deleter<VkCommandPool>::operator() (VkCommandPool obj) const
117 {
118         m_deviceIface->destroyCommandPool(m_device, obj, m_allocator);
119 }
120
121 template<>
122 void Deleter<VkSwapchainKHR>::operator() (VkSwapchainKHR obj) const
123 {
124         m_deviceIface->destroySwapchainKHR(m_device, obj, m_allocator);
125 }
126
127 template<>
128 void Deleter<VkIndirectCommandsLayoutNVX>::operator() (VkIndirectCommandsLayoutNVX obj) const
129 {
130         m_deviceIface->destroyIndirectCommandsLayoutNVX(m_device, obj, m_allocator);
131 }
132
133 template<>
134 void Deleter<VkObjectTableNVX>::operator() (VkObjectTableNVX obj) const
135 {
136         m_deviceIface->destroyObjectTableNVX(m_device, obj, m_allocator);
137 }
138
139 template<>
140 void Deleter<VkDescriptorUpdateTemplateKHR>::operator() (VkDescriptorUpdateTemplateKHR obj) const
141 {
142         m_deviceIface->destroyDescriptorUpdateTemplateKHR(m_device, obj, m_allocator);
143 }
144
145 } // refdetails
146
147 Move<VkInstance> createInstance (const PlatformInterface& vk, const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
148 {
149         VkInstance object = 0;
150         VK_CHECK(vk.createInstance(pCreateInfo, pAllocator, &object));
151         return Move<VkInstance>(check<VkInstance>(object), Deleter<VkInstance>(vk, object, pAllocator));
152 }
153
154 Move<VkDevice> createDevice (const InstanceInterface& vk, VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
155 {
156         VkDevice object = 0;
157         VK_CHECK(vk.createDevice(physicalDevice, pCreateInfo, pAllocator, &object));
158         return Move<VkDevice>(check<VkDevice>(object), Deleter<VkDevice>(vk, object, pAllocator));
159 }
160
161 Move<VkDeviceMemory> allocateMemory (const DeviceInterface& vk, VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator)
162 {
163         VkDeviceMemory object = 0;
164         VK_CHECK(vk.allocateMemory(device, pAllocateInfo, pAllocator, &object));
165         return Move<VkDeviceMemory>(check<VkDeviceMemory>(object), Deleter<VkDeviceMemory>(vk, device, pAllocator));
166 }
167
168 Move<VkFence> createFence (const DeviceInterface& vk, VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
169 {
170         VkFence object = 0;
171         VK_CHECK(vk.createFence(device, pCreateInfo, pAllocator, &object));
172         return Move<VkFence>(check<VkFence>(object), Deleter<VkFence>(vk, device, pAllocator));
173 }
174
175 Move<VkSemaphore> createSemaphore (const DeviceInterface& vk, VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
176 {
177         VkSemaphore object = 0;
178         VK_CHECK(vk.createSemaphore(device, pCreateInfo, pAllocator, &object));
179         return Move<VkSemaphore>(check<VkSemaphore>(object), Deleter<VkSemaphore>(vk, device, pAllocator));
180 }
181
182 Move<VkEvent> createEvent (const DeviceInterface& vk, VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
183 {
184         VkEvent object = 0;
185         VK_CHECK(vk.createEvent(device, pCreateInfo, pAllocator, &object));
186         return Move<VkEvent>(check<VkEvent>(object), Deleter<VkEvent>(vk, device, pAllocator));
187 }
188
189 Move<VkQueryPool> createQueryPool (const DeviceInterface& vk, VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
190 {
191         VkQueryPool object = 0;
192         VK_CHECK(vk.createQueryPool(device, pCreateInfo, pAllocator, &object));
193         return Move<VkQueryPool>(check<VkQueryPool>(object), Deleter<VkQueryPool>(vk, device, pAllocator));
194 }
195
196 Move<VkBuffer> createBuffer (const DeviceInterface& vk, VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
197 {
198         VkBuffer object = 0;
199         VK_CHECK(vk.createBuffer(device, pCreateInfo, pAllocator, &object));
200         return Move<VkBuffer>(check<VkBuffer>(object), Deleter<VkBuffer>(vk, device, pAllocator));
201 }
202
203 Move<VkBufferView> createBufferView (const DeviceInterface& vk, VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
204 {
205         VkBufferView object = 0;
206         VK_CHECK(vk.createBufferView(device, pCreateInfo, pAllocator, &object));
207         return Move<VkBufferView>(check<VkBufferView>(object), Deleter<VkBufferView>(vk, device, pAllocator));
208 }
209
210 Move<VkImage> createImage (const DeviceInterface& vk, VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
211 {
212         VkImage object = 0;
213         VK_CHECK(vk.createImage(device, pCreateInfo, pAllocator, &object));
214         return Move<VkImage>(check<VkImage>(object), Deleter<VkImage>(vk, device, pAllocator));
215 }
216
217 Move<VkImageView> createImageView (const DeviceInterface& vk, VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
218 {
219         VkImageView object = 0;
220         VK_CHECK(vk.createImageView(device, pCreateInfo, pAllocator, &object));
221         return Move<VkImageView>(check<VkImageView>(object), Deleter<VkImageView>(vk, device, pAllocator));
222 }
223
224 Move<VkShaderModule> createShaderModule (const DeviceInterface& vk, VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
225 {
226         VkShaderModule object = 0;
227         VK_CHECK(vk.createShaderModule(device, pCreateInfo, pAllocator, &object));
228         return Move<VkShaderModule>(check<VkShaderModule>(object), Deleter<VkShaderModule>(vk, device, pAllocator));
229 }
230
231 Move<VkPipelineCache> createPipelineCache (const DeviceInterface& vk, VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
232 {
233         VkPipelineCache object = 0;
234         VK_CHECK(vk.createPipelineCache(device, pCreateInfo, pAllocator, &object));
235         return Move<VkPipelineCache>(check<VkPipelineCache>(object), Deleter<VkPipelineCache>(vk, device, pAllocator));
236 }
237
238 Move<VkPipelineLayout> createPipelineLayout (const DeviceInterface& vk, VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
239 {
240         VkPipelineLayout object = 0;
241         VK_CHECK(vk.createPipelineLayout(device, pCreateInfo, pAllocator, &object));
242         return Move<VkPipelineLayout>(check<VkPipelineLayout>(object), Deleter<VkPipelineLayout>(vk, device, pAllocator));
243 }
244
245 Move<VkSampler> createSampler (const DeviceInterface& vk, VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
246 {
247         VkSampler object = 0;
248         VK_CHECK(vk.createSampler(device, pCreateInfo, pAllocator, &object));
249         return Move<VkSampler>(check<VkSampler>(object), Deleter<VkSampler>(vk, device, pAllocator));
250 }
251
252 Move<VkDescriptorSetLayout> createDescriptorSetLayout (const DeviceInterface& vk, VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
253 {
254         VkDescriptorSetLayout object = 0;
255         VK_CHECK(vk.createDescriptorSetLayout(device, pCreateInfo, pAllocator, &object));
256         return Move<VkDescriptorSetLayout>(check<VkDescriptorSetLayout>(object), Deleter<VkDescriptorSetLayout>(vk, device, pAllocator));
257 }
258
259 Move<VkDescriptorPool> createDescriptorPool (const DeviceInterface& vk, VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
260 {
261         VkDescriptorPool object = 0;
262         VK_CHECK(vk.createDescriptorPool(device, pCreateInfo, pAllocator, &object));
263         return Move<VkDescriptorPool>(check<VkDescriptorPool>(object), Deleter<VkDescriptorPool>(vk, device, pAllocator));
264 }
265
266 Move<VkFramebuffer> createFramebuffer (const DeviceInterface& vk, VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
267 {
268         VkFramebuffer object = 0;
269         VK_CHECK(vk.createFramebuffer(device, pCreateInfo, pAllocator, &object));
270         return Move<VkFramebuffer>(check<VkFramebuffer>(object), Deleter<VkFramebuffer>(vk, device, pAllocator));
271 }
272
273 Move<VkRenderPass> createRenderPass (const DeviceInterface& vk, VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
274 {
275         VkRenderPass object = 0;
276         VK_CHECK(vk.createRenderPass(device, pCreateInfo, pAllocator, &object));
277         return Move<VkRenderPass>(check<VkRenderPass>(object), Deleter<VkRenderPass>(vk, device, pAllocator));
278 }
279
280 Move<VkCommandPool> createCommandPool (const DeviceInterface& vk, VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
281 {
282         VkCommandPool object = 0;
283         VK_CHECK(vk.createCommandPool(device, pCreateInfo, pAllocator, &object));
284         return Move<VkCommandPool>(check<VkCommandPool>(object), Deleter<VkCommandPool>(vk, device, pAllocator));
285 }
286
287 Move<VkSwapchainKHR> createSwapchainKHR (const DeviceInterface& vk, VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
288 {
289         VkSwapchainKHR object = 0;
290         VK_CHECK(vk.createSwapchainKHR(device, pCreateInfo, pAllocator, &object));
291         return Move<VkSwapchainKHR>(check<VkSwapchainKHR>(object), Deleter<VkSwapchainKHR>(vk, device, pAllocator));
292 }
293
294 Move<VkSurfaceKHR> createDisplayPlaneSurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
295 {
296         VkSurfaceKHR object = 0;
297         VK_CHECK(vk.createDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, &object));
298         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
299 }
300
301 Move<VkSwapchainKHR> createSharedSwapchainsKHR (const DeviceInterface& vk, VkDevice device, deUint32 swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator)
302 {
303         VkSwapchainKHR object = 0;
304         VK_CHECK(vk.createSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, &object));
305         return Move<VkSwapchainKHR>(check<VkSwapchainKHR>(object), Deleter<VkSwapchainKHR>(vk, device, pAllocator));
306 }
307
308 Move<VkSurfaceKHR> createXlibSurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
309 {
310         VkSurfaceKHR object = 0;
311         VK_CHECK(vk.createXlibSurfaceKHR(instance, pCreateInfo, pAllocator, &object));
312         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
313 }
314
315 Move<VkSurfaceKHR> createXcbSurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
316 {
317         VkSurfaceKHR object = 0;
318         VK_CHECK(vk.createXcbSurfaceKHR(instance, pCreateInfo, pAllocator, &object));
319         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
320 }
321
322 Move<VkSurfaceKHR> createWaylandSurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
323 {
324         VkSurfaceKHR object = 0;
325         VK_CHECK(vk.createWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, &object));
326         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
327 }
328
329 Move<VkSurfaceKHR> createMirSurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
330 {
331         VkSurfaceKHR object = 0;
332         VK_CHECK(vk.createMirSurfaceKHR(instance, pCreateInfo, pAllocator, &object));
333         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
334 }
335
336 Move<VkSurfaceKHR> createAndroidSurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
337 {
338         VkSurfaceKHR object = 0;
339         VK_CHECK(vk.createAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, &object));
340         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
341 }
342
343 Move<VkSurfaceKHR> createWin32SurfaceKHR (const InstanceInterface& vk, VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
344 {
345         VkSurfaceKHR object = 0;
346         VK_CHECK(vk.createWin32SurfaceKHR(instance, pCreateInfo, pAllocator, &object));
347         return Move<VkSurfaceKHR>(check<VkSurfaceKHR>(object), Deleter<VkSurfaceKHR>(vk, instance, pAllocator));
348 }
349
350 Move<VkDebugReportCallbackEXT> createDebugReportCallbackEXT (const InstanceInterface& vk, VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator)
351 {
352         VkDebugReportCallbackEXT object = 0;
353         VK_CHECK(vk.createDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, &object));
354         return Move<VkDebugReportCallbackEXT>(check<VkDebugReportCallbackEXT>(object), Deleter<VkDebugReportCallbackEXT>(vk, instance, pAllocator));
355 }
356
357 Move<VkIndirectCommandsLayoutNVX> createIndirectCommandsLayoutNVX (const DeviceInterface& vk, VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator)
358 {
359         VkIndirectCommandsLayoutNVX object = 0;
360         VK_CHECK(vk.createIndirectCommandsLayoutNVX(device, pCreateInfo, pAllocator, &object));
361         return Move<VkIndirectCommandsLayoutNVX>(check<VkIndirectCommandsLayoutNVX>(object), Deleter<VkIndirectCommandsLayoutNVX>(vk, device, pAllocator));
362 }
363
364 Move<VkObjectTableNVX> createObjectTableNVX (const DeviceInterface& vk, VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator)
365 {
366         VkObjectTableNVX object = 0;
367         VK_CHECK(vk.createObjectTableNVX(device, pCreateInfo, pAllocator, &object));
368         return Move<VkObjectTableNVX>(check<VkObjectTableNVX>(object), Deleter<VkObjectTableNVX>(vk, device, pAllocator));
369 }
370
371 Move<VkDescriptorUpdateTemplateKHR> createDescriptorUpdateTemplateKHR (const DeviceInterface& vk, VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator)
372 {
373         VkDescriptorUpdateTemplateKHR object = 0;
374         VK_CHECK(vk.createDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, &object));
375         return Move<VkDescriptorUpdateTemplateKHR>(check<VkDescriptorUpdateTemplateKHR>(object), Deleter<VkDescriptorUpdateTemplateKHR>(vk, device, pAllocator));
376 }
377