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

Side by Side Diff: src/gpu/vk/GrVkBackendContext.cpp

Issue 1935523002: Fix Vulkan Build in Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore 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 | « no previous file | src/gpu/vk/GrVkGpu.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 /* 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/GrVkBackendContext.h" 8 #include "vk/GrVkBackendContext.h"
9 #include "vk/GrVkExtensions.h" 9 #include "vk/GrVkExtensions.h"
10 #include "vk/GrVkInterface.h" 10 #include "vk/GrVkInterface.h"
(...skipping 14 matching lines...) Expand all
25 "VK_LAYER_LUNARG_swapchain", 25 "VK_LAYER_LUNARG_swapchain",
26 "VK_LAYER_GOOGLE_unique_objects", 26 "VK_LAYER_GOOGLE_unique_objects",
27 // not included in standard_validation 27 // not included in standard_validation
28 //"VK_LAYER_LUNARG_api_dump", 28 //"VK_LAYER_LUNARG_api_dump",
29 //"VK_LAYER_LUNARG_vktrace", 29 //"VK_LAYER_LUNARG_vktrace",
30 //"VK_LAYER_LUNARG_screenshot", 30 //"VK_LAYER_LUNARG_screenshot",
31 }; 31 };
32 #endif 32 #endif
33 33
34 // the minimum version of Vulkan supported 34 // the minimum version of Vulkan supported
35 #ifdef SK_BUILD_FOR_ANDROID
36 const uint32_t kGrVkMinimumVersion = VK_MAKE_VERSION(1, 0, 3);
37 #else
35 const uint32_t kGrVkMinimumVersion = VK_MAKE_VERSION(1, 0, 8); 38 const uint32_t kGrVkMinimumVersion = VK_MAKE_VERSION(1, 0, 8);
39 #endif
36 40
37 // Create the base Vulkan objects needed by the GrVkGpu object 41 // Create the base Vulkan objects needed by the GrVkGpu object
38 const GrVkBackendContext* GrVkBackendContext::Create(uint32_t* presentQueueIndex Ptr, 42 const GrVkBackendContext* GrVkBackendContext::Create(uint32_t* presentQueueIndex Ptr,
39 bool(*canPresent)(VkInstance, VkPhysicalDevice, uin t32_t queueIndex)) { 43 bool(*canPresent)(VkInstance, VkPhysicalDevice, uin t32_t queueIndex)) {
40 VkPhysicalDevice physDev; 44 VkPhysicalDevice physDev;
41 VkDevice device; 45 VkDevice device;
42 VkInstance inst; 46 VkInstance inst;
43 VkResult err; 47 VkResult err;
44 48
45 const VkApplicationInfo app_info = { 49 const VkApplicationInfo app_info = {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 return ctx; 266 return ctx;
263 } 267 }
264 268
265 GrVkBackendContext::~GrVkBackendContext() { 269 GrVkBackendContext::~GrVkBackendContext() {
266 vkDeviceWaitIdle(fDevice); 270 vkDeviceWaitIdle(fDevice);
267 vkDestroyDevice(fDevice, nullptr); 271 vkDestroyDevice(fDevice, nullptr);
268 fDevice = VK_NULL_HANDLE; 272 fDevice = VK_NULL_HANDLE;
269 vkDestroyInstance(fInstance, nullptr); 273 vkDestroyInstance(fInstance, nullptr);
270 fInstance = VK_NULL_HANDLE; 274 fInstance = VK_NULL_HANDLE;
271 } 275 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698