got Vulkan compiling on Linux again
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834953003
Review URL: https://codereview.chromium.org/1834953003
diff --git a/src/gpu/vk/GrVkBackendContext.cpp b/src/gpu/vk/GrVkBackendContext.cpp
index ccc8347..bc2e247 100644
--- a/src/gpu/vk/GrVkBackendContext.cpp
+++ b/src/gpu/vk/GrVkBackendContext.cpp
@@ -59,7 +59,7 @@
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 @@
#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 @@
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 @@
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);
diff --git a/src/gpu/vk/GrVkExtensions.h b/src/gpu/vk/GrVkExtensions.h
index cc56076..f02d15d 100644
--- a/src/gpu/vk/GrVkExtensions.h
+++ b/src/gpu/vk/GrVkExtensions.h
@@ -8,7 +8,7 @@
#ifndef GrVkExtensions_DEFINED
#define GrVkExtensions_DEFINED
-#include "../../private/SkTArray.h"
+#include "../private/SkTArray.h"
#include "SkString.h"
#include "vulkan/vulkan.h"
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index f9046b7..bfa9597 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -706,7 +706,7 @@
0, // VkImageCreateFlags
VK_IMAGE_TYPE_2D, // VkImageType
pixelFormat, // VkFormat
- { w, h, 1 }, // VkExtent3D
+ { (uint32_t) w, (uint32_t) h, 1 }, // VkExtent3D
1, // mipLevels
1, // arrayLayers
vkSamples, // samples