| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2016 Google Inc. | 3 * Copyright 2016 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "../VulkanWindowContext.h" | 9 #include "../VulkanWindowContext.h" |
| 10 #include "Window_win.h" | 10 #include "Window_win.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 VkResult res = createWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr,
&surface); | 40 VkResult res = createWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr,
&surface); |
| 41 if (VK_SUCCESS != res) { | 41 if (VK_SUCCESS != res) { |
| 42 return VK_NULL_HANDLE; | 42 return VK_NULL_HANDLE; |
| 43 } | 43 } |
| 44 | 44 |
| 45 return surface; | 45 return surface; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // Platform dependant call | 48 // Platform dependant call |
| 49 bool VulkanWindowContext::canPresent(VkInstance instance, VkPhysicalDevice physD
ev, | 49 bool VulkanWindowContext::canPresent(VkInstance instance, VkPhysicalDevice physD
ev, |
| 50 uint32_t queueFamilyIndex) { | 50 uint32_t queueFamilyIndex, void*) { |
| 51 static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR | 51 static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR |
| 52 getPhysicalDeviceWin32PresentationSu
pportKHR = nullptr; | 52 getPhysicalDeviceWin32PresentationSu
pportKHR = nullptr; |
| 53 if (!getPhysicalDeviceWin32PresentationSupportKHR) { | 53 if (!getPhysicalDeviceWin32PresentationSupportKHR) { |
| 54 getPhysicalDeviceWin32PresentationSupportKHR = | 54 getPhysicalDeviceWin32PresentationSupportKHR = |
| 55 (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) vkGetInstancePr
ocAddr(instance, | 55 (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) vkGetInstancePr
ocAddr(instance, |
| 56 "vkGetPhysicalDeviceWin32Presen
tationSupportKHR"); | 56 "vkGetPhysicalDeviceWin32Presen
tationSupportKHR"); |
| 57 } | 57 } |
| 58 | 58 |
| 59 VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queue
FamilyIndex); | 59 VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queue
FamilyIndex); |
| 60 return (VK_FALSE != check); | 60 return (VK_FALSE != check); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace sk_app | 63 } // namespace sk_app |
| OLD | NEW |