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

Unified Diff: src/gpu/vk/GrVkBackendContext.cpp

Issue 1834953003: got Vulkan compiling on Linux again (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fixed indentation Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/vk/GrVkExtensions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkBackendContext.cpp
diff --git a/src/gpu/vk/GrVkBackendContext.cpp b/src/gpu/vk/GrVkBackendContext.cpp
index ccc834788f603aade7a3a3f0ca87ad87a154de35..bc2e247cecb2c5e28f5e7e1da48046cdf95f1d82 100644
--- a/src/gpu/vk/GrVkBackendContext.cpp
+++ b/src/gpu/vk/GrVkBackendContext.cpp
@@ -59,7 +59,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
SkTArray<const char*> instanceExtensionNames;
uint32_t extensionFlags = 0;
#ifdef ENABLE_VK_LAYERS
- for (int i = 0; i < SK_ARRAY_COUNT(kDebugLayerNames); ++i) {
+ for (size_t i = 0; i < SK_ARRAY_COUNT(kDebugLayerNames); ++i) {
if (extensions.hasInstanceLayer(kDebugLayerNames[i])) {
instanceLayerNames.push_back(kDebugLayerNames[i]);
}
@@ -71,14 +71,14 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
#endif
const VkInstanceCreateInfo instance_create = {
- VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, // sType
- nullptr, // pNext
- 0, // flags
- &app_info, // pApplicationInfo
- instanceLayerNames.count(), // enabledLayerNameCount
- instanceLayerNames.begin(), // ppEnabledLayerNames
- instanceExtensionNames.count(), // enabledExtensionNameCount
- instanceExtensionNames.begin(), // ppEnabledExtensionNames
+ VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, // sType
+ nullptr, // pNext
+ 0, // flags
+ &app_info, // pApplicationInfo
+ (uint32_t) instanceLayerNames.count(), // enabledLayerNameCount
+ instanceLayerNames.begin(), // ppEnabledLayerNames
+ (uint32_t) instanceExtensionNames.count(), // enabledExtensionNameCount
+ instanceExtensionNames.begin(), // ppEnabledExtensionNames
};
err = vkCreateInstance(&instance_create, nullptr, &inst);
@@ -129,7 +129,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
SkTArray<const char*> deviceLayerNames;
SkTArray<const char*> deviceExtensionNames;
#ifdef ENABLE_VK_LAYERS
- for (int i = 0; i < SK_ARRAY_COUNT(kDebugLayerNames); ++i) {
+ for (size_t i = 0; i < SK_ARRAY_COUNT(kDebugLayerNames); ++i) {
if (extensions.hasDeviceLayer(kDebugLayerNames[i])) {
deviceLayerNames.push_back(kDebugLayerNames[i]);
}
@@ -170,16 +170,16 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
queuePriorities, // pQueuePriorities
};
const VkDeviceCreateInfo deviceInfo = {
- VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, // sType
- nullptr, // pNext
- 0, // VkDeviceCreateFlags
- 1, // queueCreateInfoCount
- &queueInfo, // pQueueCreateInfos
- deviceLayerNames.count(), // layerCount
- deviceLayerNames.begin(), // ppEnabledLayerNames
- deviceExtensionNames.count(), // extensionCount
- deviceExtensionNames.begin(), // ppEnabledExtensionNames
- &deviceFeatures // ppEnabledFeatures
+ VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, // sType
+ nullptr, // pNext
+ 0, // VkDeviceCreateFlags
+ 1, // queueCreateInfoCount
+ &queueInfo, // pQueueCreateInfos
+ (uint32_t) deviceLayerNames.count(), // layerCount
+ deviceLayerNames.begin(), // ppEnabledLayerNames
+ (uint32_t) deviceExtensionNames.count(), // extensionCount
+ deviceExtensionNames.begin(), // ppEnabledExtensionNames
+ &deviceFeatures // ppEnabledFeatures
};
err = vkCreateDevice(physDev, &deviceInfo, nullptr, &device);
« no previous file with comments | « no previous file | src/gpu/vk/GrVkExtensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698