| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "vk/GrVkInterface.h" | 8 #include "vk/GrVkInterface.h" |
| 9 #include "vk/GrVkBackendContext.h" | 9 #include "vk/GrVkBackendContext.h" |
| 10 #include "vk/GrVkUtil.h" | 10 #include "vk/GrVkUtil.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 GET_DEV_PROC(CmdBeginQuery); | 150 GET_DEV_PROC(CmdBeginQuery); |
| 151 GET_DEV_PROC(CmdEndQuery); | 151 GET_DEV_PROC(CmdEndQuery); |
| 152 GET_DEV_PROC(CmdResetQueryPool); | 152 GET_DEV_PROC(CmdResetQueryPool); |
| 153 GET_DEV_PROC(CmdWriteTimestamp); | 153 GET_DEV_PROC(CmdWriteTimestamp); |
| 154 GET_DEV_PROC(CmdCopyQueryPoolResults); | 154 GET_DEV_PROC(CmdCopyQueryPoolResults); |
| 155 GET_DEV_PROC(CmdPushConstants); | 155 GET_DEV_PROC(CmdPushConstants); |
| 156 GET_DEV_PROC(CmdBeginRenderPass); | 156 GET_DEV_PROC(CmdBeginRenderPass); |
| 157 GET_DEV_PROC(CmdNextSubpass); | 157 GET_DEV_PROC(CmdNextSubpass); |
| 158 GET_DEV_PROC(CmdEndRenderPass); | 158 GET_DEV_PROC(CmdEndRenderPass); |
| 159 GET_DEV_PROC(CmdExecuteCommands); | 159 GET_DEV_PROC(CmdExecuteCommands); |
| 160 if (extensionFlags & kKHR_surface_GrVkExtensionFlag) { | |
| 161 GET_PROC(DestroySurfaceKHR); | |
| 162 GET_PROC(GetPhysicalDeviceSurfaceSupportKHR); | |
| 163 GET_PROC(GetPhysicalDeviceSurfaceCapabilitiesKHR); | |
| 164 GET_PROC(GetPhysicalDeviceSurfaceFormatsKHR); | |
| 165 GET_PROC(GetPhysicalDeviceSurfacePresentModesKHR); | |
| 166 } | |
| 167 if (extensionFlags & kKHR_surface_GrVkExtensionFlag) { | |
| 168 GET_DEV_PROC(CreateSwapchainKHR); | |
| 169 GET_DEV_PROC(DestroySwapchainKHR); | |
| 170 GET_DEV_PROC(GetSwapchainImagesKHR); | |
| 171 GET_DEV_PROC(AcquireNextImageKHR); | |
| 172 GET_DEV_PROC(QueuePresentKHR); | |
| 173 } | |
| 174 #if defined(VK_USE_PLATFORM_WIN32_KHR) | |
| 175 if (extensionFlags & kKHR_win32_surface_GrVkExtensionFlag) { | |
| 176 GET_PROC(CreateWin32SurfaceKHR); | |
| 177 GET_PROC(GetPhysicalDeviceWin32PresentationSupportKHR); | |
| 178 } | |
| 179 #elif defined(VK_USE_PLATFORM_ANDROID_KHR) | |
| 180 if (extensionFlags & kKHR_android_surface_GrVkExtensionFlag) { | |
| 181 GET_PROC(CreateAndroidSurfaceKHR); | |
| 182 } | |
| 183 #elif defined(VK_USE_PLATFORM_XLIB_KHR) | |
| 184 if (extensionFlags & kKHR_xlib_surface_GrVkExtensionFlag) { | |
| 185 GET_PROC(CreateXlibSurfaceKHR); | |
| 186 GET_PROC(GetPhysicalDeviceXlibPresentationSupportKHR); | |
| 187 } | |
| 188 #endif | |
| 189 | |
| 190 // We probably don't care about these, they're for consoles | |
| 191 //GET_PROC(GetPhysicalDeviceDisplayPropertiesKHR); | |
| 192 //GET_PROC(GetPhysicalDeviceDisplayPlanePropertiesKHR); | |
| 193 //GET_PROC(GetDisplayPlaneSupportedDisplaysKHR); | |
| 194 //GET_PROC(GetDisplayModePropertiesKHR); | |
| 195 //GET_PROC(CreateDisplayModeKHR); | |
| 196 //GET_PROC(GetDisplayPlaneCapabilitiesKHR); | |
| 197 //GET_PROC(CreateDisplayPlaneSurfaceKHR); | |
| 198 //GET_DEV_PROC(CreateSharedSwapchainsKHR); | |
| 199 | 160 |
| 200 if (extensionFlags & kEXT_debug_report_GrVkExtensionFlag) { | 161 if (extensionFlags & kEXT_debug_report_GrVkExtensionFlag) { |
| 201 GET_PROC(CreateDebugReportCallbackEXT); | 162 GET_PROC(CreateDebugReportCallbackEXT); |
| 202 GET_PROC(DebugReportMessageEXT); | 163 GET_PROC(DebugReportMessageEXT); |
| 203 GET_PROC(DestroyDebugReportCallbackEXT); | 164 GET_PROC(DestroyDebugReportCallbackEXT); |
| 204 } | 165 } |
| 205 | 166 |
| 206 return interface; | 167 return interface; |
| 207 } | 168 } |
| 208 | 169 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 NULL == fFunctions.fCmdBeginQuery || | 301 NULL == fFunctions.fCmdBeginQuery || |
| 341 NULL == fFunctions.fCmdEndQuery || | 302 NULL == fFunctions.fCmdEndQuery || |
| 342 NULL == fFunctions.fCmdResetQueryPool || | 303 NULL == fFunctions.fCmdResetQueryPool || |
| 343 NULL == fFunctions.fCmdWriteTimestamp || | 304 NULL == fFunctions.fCmdWriteTimestamp || |
| 344 NULL == fFunctions.fCmdCopyQueryPoolResults || | 305 NULL == fFunctions.fCmdCopyQueryPoolResults || |
| 345 NULL == fFunctions.fCmdPushConstants || | 306 NULL == fFunctions.fCmdPushConstants || |
| 346 NULL == fFunctions.fCmdBeginRenderPass || | 307 NULL == fFunctions.fCmdBeginRenderPass || |
| 347 NULL == fFunctions.fCmdNextSubpass || | 308 NULL == fFunctions.fCmdNextSubpass || |
| 348 NULL == fFunctions.fCmdEndRenderPass || | 309 NULL == fFunctions.fCmdEndRenderPass || |
| 349 NULL == fFunctions.fCmdExecuteCommands || | 310 NULL == fFunctions.fCmdExecuteCommands || |
| 350 NULL == fFunctions.fDestroySurfaceKHR || | |
| 351 NULL == fFunctions.fGetPhysicalDeviceSurfaceSupportKHR || | |
| 352 NULL == fFunctions.fGetPhysicalDeviceSurfaceCapabilitiesKHR || | |
| 353 NULL == fFunctions.fGetPhysicalDeviceSurfaceFormatsKHR || | |
| 354 NULL == fFunctions.fGetPhysicalDeviceSurfacePresentModesKHR || | |
| 355 NULL == fFunctions.fCreateSwapchainKHR || | |
| 356 NULL == fFunctions.fDestroySwapchainKHR || | |
| 357 NULL == fFunctions.fGetSwapchainImagesKHR || | |
| 358 NULL == fFunctions.fAcquireNextImageKHR || | |
| 359 NULL == fFunctions.fQueuePresentKHR || | |
| 360 //NULL == fFunctions.fGetPhysicalDeviceDisplayPropertiesKHR || | |
| 361 //NULL == fFunctions.fGetPhysicalDeviceDisplayPlanePropertiesKHR || | |
| 362 //NULL == fFunctions.fGetDisplayPlaneSupportedDisplaysKHR || | |
| 363 //NULL == fFunctions.fGetDisplayModePropertiesKHR || | |
| 364 //NULL == fFunctions.fCreateDisplayModeKHR || | |
| 365 //NULL == fFunctions.fGetDisplayPlaneCapabilitiesKHR || | |
| 366 //NULL == fFunctions.fCreateDisplayPlaneSurfaceKHR || | |
| 367 //NULL == fFunctions.fCreateSharedSwapchainsKHR || | |
| 368 NULL == fFunctions.fCreateDebugReportCallbackEXT || | 311 NULL == fFunctions.fCreateDebugReportCallbackEXT || |
| 369 NULL == fFunctions.fDebugReportMessageEXT || | 312 NULL == fFunctions.fDebugReportMessageEXT || |
| 370 NULL == fFunctions.fDestroyDebugReportCallbackEXT) { | 313 NULL == fFunctions.fDestroyDebugReportCallbackEXT) { |
| 371 | 314 |
| 372 return false; | 315 return false; |
| 373 } | 316 } |
| 374 return true; | 317 return true; |
| 375 } | 318 } |
| OLD | NEW |