Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: gpu/vulkan/vulkan_implementation.cc

Issue 1925603002: Introduce Android WSI extension for Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/vulkan/vulkan_device_queue.cc ('k') | gpu/vulkan/vulkan_platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/vulkan/vulkan_implementation.h" 5 #include "gpu/vulkan/vulkan_implementation.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 #include <vector> 8 #include <vector>
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 VkApplicationInfo app_info = {}; 53 VkApplicationInfo app_info = {};
54 app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; 54 app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
55 app_info.pApplicationName = "Chromium"; 55 app_info.pApplicationName = "Chromium";
56 app_info.apiVersion = VK_MAKE_VERSION(1, 0, 2); 56 app_info.apiVersion = VK_MAKE_VERSION(1, 0, 2);
57 57
58 std::vector<const char*> enabled_ext_names; 58 std::vector<const char*> enabled_ext_names;
59 enabled_ext_names.push_back(VK_KHR_SURFACE_EXTENSION_NAME); 59 enabled_ext_names.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
60 60
61 #if defined(VK_USE_PLATFORM_XLIB_KHR) 61 #if defined(VK_USE_PLATFORM_XLIB_KHR)
62 enabled_ext_names.push_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME); 62 enabled_ext_names.push_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
63 #elif defined(VK_USE_PLATFORM_ANDROID_KHR)
64 enabled_ext_names.push_back(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME);
63 #endif 65 #endif
64 66
65 uint32_t num_instance_exts = 0; 67 uint32_t num_instance_exts = 0;
66 result = vkEnumerateInstanceExtensionProperties(nullptr, &num_instance_exts, 68 result = vkEnumerateInstanceExtensionProperties(nullptr, &num_instance_exts,
67 nullptr); 69 nullptr);
68 if (VK_SUCCESS != result) { 70 if (VK_SUCCESS != result) {
69 DLOG(ERROR) << "vkEnumerateInstanceExtensionProperties(NULL) failed: " 71 DLOG(ERROR) << "vkEnumerateInstanceExtensionProperties(NULL) failed: "
70 << result; 72 << result;
71 return false; 73 return false;
72 } 74 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return vulkan_instance->valid; 193 return vulkan_instance->valid;
192 } 194 }
193 195
194 VkInstance GetVulkanInstance() { 196 VkInstance GetVulkanInstance() {
195 DCHECK(vulkan_instance); 197 DCHECK(vulkan_instance);
196 DCHECK(vulkan_instance->valid); 198 DCHECK(vulkan_instance->valid);
197 return vulkan_instance->vk_instance; 199 return vulkan_instance->vk_instance;
198 } 200 }
199 201
200 } // namespace gpu 202 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/vulkan/vulkan_device_queue.cc ('k') | gpu/vulkan/vulkan_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698