blob: 78a952abf362f4de797da8adad60b809468520e9 [file] [log] [blame]
Chia-I Wueb7db122016-03-24 09:11:06 +08001/*
2 * Copyright 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// WARNING: This file is generated. See ../README.md for instructions.
18
19#include <string.h>
20#include <algorithm>
21#include <log/log.h>
22
23#include "driver.h"
24#include "loader.h"
25
26namespace vulkan {
27namespace driver {
28
29namespace {
30
31// clang-format off
32
33VKAPI_ATTR void disabledDestroySurfaceKHR(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks*) {
34 ALOGE("VK_KHR_surface not enabled. vkDestroySurfaceKHR not executed.");
35}
36
37VKAPI_ATTR VkResult disabledGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32*) {
38 ALOGE("VK_KHR_surface not enabled. vkGetPhysicalDeviceSurfaceSupportKHR not executed.");
39 return VK_SUCCESS;
40}
41
42VKAPI_ATTR VkResult disabledGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR*) {
43 ALOGE("VK_KHR_surface not enabled. vkGetPhysicalDeviceSurfaceCapabilitiesKHR not executed.");
44 return VK_SUCCESS;
45}
46
47VKAPI_ATTR VkResult disabledGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice, VkSurfaceKHR, uint32_t*, VkSurfaceFormatKHR*) {
48 ALOGE("VK_KHR_surface not enabled. vkGetPhysicalDeviceSurfaceFormatsKHR not executed.");
49 return VK_SUCCESS;
50}
51
52VKAPI_ATTR VkResult disabledGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice, VkSurfaceKHR, uint32_t*, VkPresentModeKHR*) {
53 ALOGE("VK_KHR_surface not enabled. vkGetPhysicalDeviceSurfacePresentModesKHR not executed.");
54 return VK_SUCCESS;
55}
56
57VKAPI_ATTR VkResult disabledCreateSwapchainKHR(VkDevice, const VkSwapchainCreateInfoKHR*, const VkAllocationCallbacks*, VkSwapchainKHR*) {
58 ALOGE("VK_KHR_swapchain not enabled. vkCreateSwapchainKHR not executed.");
59 return VK_SUCCESS;
60}
61
62VKAPI_ATTR VkResult checkedCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) {
Chia-I Wu62262232016-03-26 07:06:44 +080063 return (GetData(device).hook_extensions[ProcHook::KHR_swapchain]) ? CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain) : disabledCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain);
Chia-I Wueb7db122016-03-24 09:11:06 +080064}
65
66VKAPI_ATTR void disabledDestroySwapchainKHR(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks*) {
67 ALOGE("VK_KHR_swapchain not enabled. vkDestroySwapchainKHR not executed.");
68}
69
70VKAPI_ATTR void checkedDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) {
Chia-I Wu62262232016-03-26 07:06:44 +080071 (GetData(device).hook_extensions[ProcHook::KHR_swapchain]) ? DestroySwapchainKHR(device, swapchain, pAllocator) : disabledDestroySwapchainKHR(device, swapchain, pAllocator);
Chia-I Wueb7db122016-03-24 09:11:06 +080072}
73
74VKAPI_ATTR VkResult disabledGetSwapchainImagesKHR(VkDevice, VkSwapchainKHR, uint32_t*, VkImage*) {
75 ALOGE("VK_KHR_swapchain not enabled. vkGetSwapchainImagesKHR not executed.");
76 return VK_SUCCESS;
77}
78
79VKAPI_ATTR VkResult checkedGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) {
Chia-I Wu62262232016-03-26 07:06:44 +080080 return (GetData(device).hook_extensions[ProcHook::KHR_swapchain]) ? GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages) : disabledGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages);
Chia-I Wueb7db122016-03-24 09:11:06 +080081}
82
83VKAPI_ATTR VkResult disabledAcquireNextImageKHR(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t*) {
84 ALOGE("VK_KHR_swapchain not enabled. vkAcquireNextImageKHR not executed.");
85 return VK_SUCCESS;
86}
87
88VKAPI_ATTR VkResult checkedAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) {
Chia-I Wu62262232016-03-26 07:06:44 +080089 return (GetData(device).hook_extensions[ProcHook::KHR_swapchain]) ? AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex) : disabledAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex);
Chia-I Wueb7db122016-03-24 09:11:06 +080090}
91
92VKAPI_ATTR VkResult disabledQueuePresentKHR(VkQueue, const VkPresentInfoKHR*) {
93 ALOGE("VK_KHR_swapchain not enabled. vkQueuePresentKHR not executed.");
94 return VK_SUCCESS;
95}
96
97VKAPI_ATTR VkResult checkedQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) {
Chia-I Wu62262232016-03-26 07:06:44 +080098 return (GetData(queue).hook_extensions[ProcHook::KHR_swapchain]) ? QueuePresentKHR(queue, pPresentInfo) : disabledQueuePresentKHR(queue, pPresentInfo);
Chia-I Wueb7db122016-03-24 09:11:06 +080099}
100
101VKAPI_ATTR VkResult disabledCreateAndroidSurfaceKHR(VkInstance, const VkAndroidSurfaceCreateInfoKHR*, const VkAllocationCallbacks*, VkSurfaceKHR*) {
102 ALOGE("VK_KHR_android_surface not enabled. vkCreateAndroidSurfaceKHR not executed.");
103 return VK_SUCCESS;
104}
105
106VKAPI_ATTR VkResult disabledCreateDebugReportCallbackEXT(VkInstance, const VkDebugReportCallbackCreateInfoEXT*, const VkAllocationCallbacks*, VkDebugReportCallbackEXT*) {
107 ALOGE("VK_EXT_debug_report not enabled. vkCreateDebugReportCallbackEXT not executed.");
108 return VK_SUCCESS;
109}
110
111VKAPI_ATTR void disabledDestroyDebugReportCallbackEXT(VkInstance, VkDebugReportCallbackEXT, const VkAllocationCallbacks*) {
112 ALOGE("VK_EXT_debug_report not enabled. vkDestroyDebugReportCallbackEXT not executed.");
113}
114
115VKAPI_ATTR void disabledDebugReportMessageEXT(VkInstance, VkDebugReportFlagsEXT, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char*, const char*) {
116 ALOGE("VK_EXT_debug_report not enabled. vkDebugReportMessageEXT not executed.");
117}
118
119// clang-format on
120
121const ProcHook g_proc_hooks[] = {
122 // clang-format off
123 {
124 "vkAcquireImageANDROID",
125 ProcHook::DEVICE,
126 ProcHook::ANDROID_native_buffer,
127 nullptr,
128 nullptr,
129 nullptr,
130 },
131 {
132 "vkAcquireNextImageKHR",
133 ProcHook::DEVICE,
134 ProcHook::KHR_swapchain,
Chia-I Wu62262232016-03-26 07:06:44 +0800135 reinterpret_cast<PFN_vkVoidFunction>(AcquireNextImageKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800136 reinterpret_cast<PFN_vkVoidFunction>(disabledAcquireNextImageKHR),
137 reinterpret_cast<PFN_vkVoidFunction>(checkedAcquireNextImageKHR),
138 },
139 {
140 "vkAllocateCommandBuffers",
141 ProcHook::DEVICE,
142 ProcHook::EXTENSION_CORE,
Chia-I Wu6a58a8a2016-03-24 16:29:51 +0800143 reinterpret_cast<PFN_vkVoidFunction>(AllocateCommandBuffers),
Chia-I Wueb7db122016-03-24 09:11:06 +0800144 nullptr,
145 nullptr,
146 },
147 {
148 "vkCreateAndroidSurfaceKHR",
149 ProcHook::INSTANCE,
150 ProcHook::KHR_android_surface,
Chia-I Wu62262232016-03-26 07:06:44 +0800151 reinterpret_cast<PFN_vkVoidFunction>(CreateAndroidSurfaceKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800152 reinterpret_cast<PFN_vkVoidFunction>(disabledCreateAndroidSurfaceKHR),
153 nullptr,
154 },
155 {
156 "vkCreateDebugReportCallbackEXT",
157 ProcHook::INSTANCE,
158 ProcHook::EXT_debug_report,
Chia-I Wu62262232016-03-26 07:06:44 +0800159 reinterpret_cast<PFN_vkVoidFunction>(CreateDebugReportCallbackEXT),
Chia-I Wueb7db122016-03-24 09:11:06 +0800160 reinterpret_cast<PFN_vkVoidFunction>(disabledCreateDebugReportCallbackEXT),
161 nullptr,
162 },
163 {
164 "vkCreateDevice",
165 ProcHook::INSTANCE,
166 ProcHook::EXTENSION_CORE,
Chia-I Wu4901db72016-03-24 16:38:58 +0800167 reinterpret_cast<PFN_vkVoidFunction>(CreateDevice),
Chia-I Wueb7db122016-03-24 09:11:06 +0800168 nullptr,
169 nullptr,
170 },
171 {
172 "vkCreateInstance",
173 ProcHook::GLOBAL,
174 ProcHook::EXTENSION_CORE,
Chia-I Wuff4a6c72016-03-24 16:05:56 +0800175 reinterpret_cast<PFN_vkVoidFunction>(CreateInstance),
Chia-I Wueb7db122016-03-24 09:11:06 +0800176 nullptr,
177 nullptr,
178 },
179 {
180 "vkCreateSwapchainKHR",
181 ProcHook::DEVICE,
182 ProcHook::KHR_swapchain,
Chia-I Wu62262232016-03-26 07:06:44 +0800183 reinterpret_cast<PFN_vkVoidFunction>(CreateSwapchainKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800184 reinterpret_cast<PFN_vkVoidFunction>(disabledCreateSwapchainKHR),
185 reinterpret_cast<PFN_vkVoidFunction>(checkedCreateSwapchainKHR),
186 },
187 {
188 "vkDebugReportMessageEXT",
189 ProcHook::INSTANCE,
190 ProcHook::EXT_debug_report,
Chia-I Wu62262232016-03-26 07:06:44 +0800191 reinterpret_cast<PFN_vkVoidFunction>(DebugReportMessageEXT),
Chia-I Wueb7db122016-03-24 09:11:06 +0800192 reinterpret_cast<PFN_vkVoidFunction>(disabledDebugReportMessageEXT),
193 nullptr,
194 },
195 {
196 "vkDestroyDebugReportCallbackEXT",
197 ProcHook::INSTANCE,
198 ProcHook::EXT_debug_report,
Chia-I Wu62262232016-03-26 07:06:44 +0800199 reinterpret_cast<PFN_vkVoidFunction>(DestroyDebugReportCallbackEXT),
Chia-I Wueb7db122016-03-24 09:11:06 +0800200 reinterpret_cast<PFN_vkVoidFunction>(disabledDestroyDebugReportCallbackEXT),
201 nullptr,
202 },
203 {
204 "vkDestroyDevice",
205 ProcHook::DEVICE,
206 ProcHook::EXTENSION_CORE,
Chia-I Wu4901db72016-03-24 16:38:58 +0800207 reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice),
Chia-I Wueb7db122016-03-24 09:11:06 +0800208 nullptr,
209 nullptr,
210 },
211 {
212 "vkDestroyInstance",
213 ProcHook::INSTANCE,
214 ProcHook::EXTENSION_CORE,
Chia-I Wuff4a6c72016-03-24 16:05:56 +0800215 reinterpret_cast<PFN_vkVoidFunction>(DestroyInstance),
Chia-I Wueb7db122016-03-24 09:11:06 +0800216 nullptr,
217 nullptr,
218 },
219 {
220 "vkDestroySurfaceKHR",
221 ProcHook::INSTANCE,
222 ProcHook::KHR_surface,
Chia-I Wu62262232016-03-26 07:06:44 +0800223 reinterpret_cast<PFN_vkVoidFunction>(DestroySurfaceKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800224 reinterpret_cast<PFN_vkVoidFunction>(disabledDestroySurfaceKHR),
225 nullptr,
226 },
227 {
228 "vkDestroySwapchainKHR",
229 ProcHook::DEVICE,
230 ProcHook::KHR_swapchain,
Chia-I Wu62262232016-03-26 07:06:44 +0800231 reinterpret_cast<PFN_vkVoidFunction>(DestroySwapchainKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800232 reinterpret_cast<PFN_vkVoidFunction>(disabledDestroySwapchainKHR),
233 reinterpret_cast<PFN_vkVoidFunction>(checkedDestroySwapchainKHR),
234 },
235 {
236 "vkEnumerateDeviceExtensionProperties",
237 ProcHook::INSTANCE,
238 ProcHook::EXTENSION_CORE,
Chia-I Wu01cf3052016-03-24 16:16:21 +0800239 reinterpret_cast<PFN_vkVoidFunction>(EnumerateDeviceExtensionProperties),
Chia-I Wueb7db122016-03-24 09:11:06 +0800240 nullptr,
241 nullptr,
242 },
243 {
244 "vkEnumerateInstanceExtensionProperties",
245 ProcHook::GLOBAL,
246 ProcHook::EXTENSION_CORE,
247 reinterpret_cast<PFN_vkVoidFunction>(EnumerateInstanceExtensionProperties),
248 nullptr,
249 nullptr,
250 },
251 {
252 "vkEnumeratePhysicalDevices",
253 ProcHook::INSTANCE,
254 ProcHook::EXTENSION_CORE,
Chia-I Wuff4a6c72016-03-24 16:05:56 +0800255 reinterpret_cast<PFN_vkVoidFunction>(EnumeratePhysicalDevices),
Chia-I Wueb7db122016-03-24 09:11:06 +0800256 nullptr,
257 nullptr,
258 },
259 {
260 "vkGetDeviceProcAddr",
261 ProcHook::DEVICE,
262 ProcHook::EXTENSION_CORE,
263 reinterpret_cast<PFN_vkVoidFunction>(GetDeviceProcAddr),
264 nullptr,
265 nullptr,
266 },
267 {
268 "vkGetDeviceQueue",
269 ProcHook::DEVICE,
270 ProcHook::EXTENSION_CORE,
Chia-I Wuba0be412016-03-24 16:24:40 +0800271 reinterpret_cast<PFN_vkVoidFunction>(GetDeviceQueue),
Chia-I Wueb7db122016-03-24 09:11:06 +0800272 nullptr,
273 nullptr,
274 },
275 {
276 "vkGetInstanceProcAddr",
277 ProcHook::INSTANCE,
278 ProcHook::EXTENSION_CORE,
279 reinterpret_cast<PFN_vkVoidFunction>(GetInstanceProcAddr),
280 nullptr,
281 nullptr,
282 },
283 {
284 "vkGetPhysicalDeviceSurfaceCapabilitiesKHR",
285 ProcHook::INSTANCE,
286 ProcHook::KHR_surface,
Chia-I Wu62262232016-03-26 07:06:44 +0800287 reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfaceCapabilitiesKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800288 reinterpret_cast<PFN_vkVoidFunction>(disabledGetPhysicalDeviceSurfaceCapabilitiesKHR),
289 nullptr,
290 },
291 {
292 "vkGetPhysicalDeviceSurfaceFormatsKHR",
293 ProcHook::INSTANCE,
294 ProcHook::KHR_surface,
Chia-I Wu62262232016-03-26 07:06:44 +0800295 reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfaceFormatsKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800296 reinterpret_cast<PFN_vkVoidFunction>(disabledGetPhysicalDeviceSurfaceFormatsKHR),
297 nullptr,
298 },
299 {
300 "vkGetPhysicalDeviceSurfacePresentModesKHR",
301 ProcHook::INSTANCE,
302 ProcHook::KHR_surface,
Chia-I Wu62262232016-03-26 07:06:44 +0800303 reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfacePresentModesKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800304 reinterpret_cast<PFN_vkVoidFunction>(disabledGetPhysicalDeviceSurfacePresentModesKHR),
305 nullptr,
306 },
307 {
308 "vkGetPhysicalDeviceSurfaceSupportKHR",
309 ProcHook::INSTANCE,
310 ProcHook::KHR_surface,
Chia-I Wu62262232016-03-26 07:06:44 +0800311 reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfaceSupportKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800312 reinterpret_cast<PFN_vkVoidFunction>(disabledGetPhysicalDeviceSurfaceSupportKHR),
313 nullptr,
314 },
315 {
316 "vkGetSwapchainGrallocUsageANDROID",
317 ProcHook::DEVICE,
318 ProcHook::ANDROID_native_buffer,
319 nullptr,
320 nullptr,
321 nullptr,
322 },
323 {
324 "vkGetSwapchainImagesKHR",
325 ProcHook::DEVICE,
326 ProcHook::KHR_swapchain,
Chia-I Wu62262232016-03-26 07:06:44 +0800327 reinterpret_cast<PFN_vkVoidFunction>(GetSwapchainImagesKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800328 reinterpret_cast<PFN_vkVoidFunction>(disabledGetSwapchainImagesKHR),
329 reinterpret_cast<PFN_vkVoidFunction>(checkedGetSwapchainImagesKHR),
330 },
331 {
332 "vkQueuePresentKHR",
333 ProcHook::DEVICE,
334 ProcHook::KHR_swapchain,
Chia-I Wu62262232016-03-26 07:06:44 +0800335 reinterpret_cast<PFN_vkVoidFunction>(QueuePresentKHR),
Chia-I Wueb7db122016-03-24 09:11:06 +0800336 reinterpret_cast<PFN_vkVoidFunction>(disabledQueuePresentKHR),
337 reinterpret_cast<PFN_vkVoidFunction>(checkedQueuePresentKHR),
338 },
339 {
340 "vkQueueSignalReleaseImageANDROID",
341 ProcHook::DEVICE,
342 ProcHook::ANDROID_native_buffer,
343 nullptr,
344 nullptr,
345 nullptr,
346 },
347 // clang-format on
348};
349
350} // anonymous
351
352const ProcHook* GetProcHook(const char* name) {
353 const auto& begin = g_proc_hooks;
354 const auto& end =
355 g_proc_hooks + sizeof(g_proc_hooks) / sizeof(g_proc_hooks[0]);
356 const auto hook = std::lower_bound(
357 begin, end, name,
358 [](const ProcHook& e, const char* n) { return strcmp(e.name, n) < 0; });
359 return (hook < end && strcmp(hook->name, name) == 0) ? hook : nullptr;
360}
361
362ProcHook::Extension GetProcHookExtension(const char* name) {
363 // clang-format off
364 if (strcmp(name, "VK_ANDROID_native_buffer") == 0) return ProcHook::ANDROID_native_buffer;
365 if (strcmp(name, "VK_EXT_debug_report") == 0) return ProcHook::EXT_debug_report;
366 if (strcmp(name, "VK_KHR_android_surface") == 0) return ProcHook::KHR_android_surface;
367 if (strcmp(name, "VK_KHR_surface") == 0) return ProcHook::KHR_surface;
368 if (strcmp(name, "VK_KHR_swapchain") == 0) return ProcHook::KHR_swapchain;
369 // clang-format on
370 return ProcHook::EXTENSION_UNKNOWN;
371}
372
Chia-I Wucc5e2762016-03-24 13:01:16 +0800373#define UNLIKELY(expr) __builtin_expect((expr), 0)
374
375#define INIT_PROC(obj, proc) \
376 do { \
377 data.driver.proc = \
378 reinterpret_cast<PFN_vk##proc>(get_proc(obj, "vk" #proc)); \
379 if (UNLIKELY(!data.driver.proc)) { \
380 ALOGE("missing " #obj " proc: vk" #proc); \
381 success = false; \
382 } \
383 } while (0)
384
385#define INIT_PROC_EXT(ext, obj, proc) \
386 do { \
387 if (data.hal_extensions[ProcHook::ext]) \
388 INIT_PROC(obj, proc); \
389 } while (0)
390
391bool InitDriverTable(VkInstance instance, PFN_vkGetInstanceProcAddr get_proc) {
392 auto& data = GetData(instance);
393 bool success = true;
394
395 // clang-format off
396 INIT_PROC(instance, DestroyInstance);
397 INIT_PROC(instance, EnumeratePhysicalDevices);
398 INIT_PROC(instance, GetInstanceProcAddr);
399 INIT_PROC(instance, CreateDevice);
Chia-I Wu4901db72016-03-24 16:38:58 +0800400 INIT_PROC(instance, EnumerateDeviceLayerProperties);
Chia-I Wucc5e2762016-03-24 13:01:16 +0800401 INIT_PROC(instance, EnumerateDeviceExtensionProperties);
402 INIT_PROC_EXT(EXT_debug_report, instance, CreateDebugReportCallbackEXT);
403 INIT_PROC_EXT(EXT_debug_report, instance, DestroyDebugReportCallbackEXT);
404 INIT_PROC_EXT(EXT_debug_report, instance, DebugReportMessageEXT);
405 // clang-format on
406
407 return success;
408}
409
410bool InitDriverTable(VkDevice dev, PFN_vkGetDeviceProcAddr get_proc) {
411 auto& data = GetData(dev);
412 bool success = true;
413
414 // clang-format off
415 INIT_PROC(dev, GetDeviceProcAddr);
416 INIT_PROC(dev, DestroyDevice);
417 INIT_PROC(dev, GetDeviceQueue);
418 INIT_PROC(dev, CreateImage);
419 INIT_PROC(dev, DestroyImage);
420 INIT_PROC(dev, AllocateCommandBuffers);
421 INIT_PROC_EXT(ANDROID_native_buffer, dev, GetSwapchainGrallocUsageANDROID);
422 INIT_PROC_EXT(ANDROID_native_buffer, dev, AcquireImageANDROID);
423 INIT_PROC_EXT(ANDROID_native_buffer, dev, QueueSignalReleaseImageANDROID);
424 // clang-format on
425
426 return success;
427}
428
Chia-I Wueb7db122016-03-24 09:11:06 +0800429} // namespace driver
430} // namespace vulkan
431
432// clang-format on