From 80eedff9e12d820060f1ebbb3f35c0148c8d9046 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 25 Jul 2020 03:46:20 -0400 Subject: vulkan: Resolve -Wmissing-field-initializer warnings --- src/video_core/renderer_vulkan/vk_swapchain.cpp | 2 ++ src/video_core/renderer_vulkan/vk_texture_cache.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index c25e312b6..6bfd2abae 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -156,6 +156,7 @@ void VKSwapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, .minImageCount = requested_image_count, .imageFormat = surface_format.format, .imageColorSpace = surface_format.colorSpace, + .imageExtent = {}, .imageArrayLayers = 1, .imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, .imageSharingMode = VK_SHARING_MODE_EXCLUSIVE, @@ -204,6 +205,7 @@ void VKSwapchain::CreateImageViews() { .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .pNext = nullptr, .flags = 0, + .image = {}, .viewType = VK_IMAGE_VIEW_TYPE_2D, .format = image_format, .components = diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index d102e6d27..efd4bb13b 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -138,6 +138,7 @@ VkImageCreateInfo GenerateImageCreateInfo(const VKDevice& device, const SurfaceP .flags = 0, .imageType = SurfaceTargetToImage(params.target), .format = format, + .extent = {}, .mipLevels = params.num_levels, .arrayLayers = static_cast(params.GetNumLayers()), .samples = VK_SAMPLE_COUNT_1_BIT, @@ -458,6 +459,7 @@ VkImageView CachedSurfaceView::GetAttachment() { .pNext = nullptr, .flags = 0, .image = surface.GetImageHandle(), + .viewType = VK_IMAGE_VIEW_TYPE_1D, .format = surface.GetImage().GetFormat(), .components = { -- cgit v1.2.3