From 5553bd3ba22f11f4b989d74ac0e3d46f0e7fb22b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 29 Oct 2020 01:48:02 -0400 Subject: [PATCH] General: Resolve a few missing initializer warnings Resolves a few -Wmissing-initializer warnings. --- src/core/arm/arm_interface.cpp | 12 ++++++++++-- src/core/hle/service/nvflinger/buffer_queue.cpp | 4 ++++ src/video_core/renderer_vulkan/vk_device.cpp | 9 +++++++-- .../renderer_vulkan/vk_graphics_pipeline.cpp | 2 ++ src/video_core/texture_cache/surface_params.cpp | 1 + 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp index d2295ed90..0951e1976 100644 --- a/src/core/arm/arm_interface.cpp +++ b/src/core/arm/arm_interface.cpp @@ -147,10 +147,18 @@ std::vector ARM_Interface::GetBacktraceFromContex auto fp = ctx.cpu_registers[29]; auto lr = ctx.cpu_registers[30]; while (true) { - out.push_back({"", 0, lr, 0}); - if (!fp) { + out.push_back({ + .module = "", + .address = 0, + .original_address = lr, + .offset = 0, + .name = {}, + }); + + if (fp == 0) { break; } + lr = memory.Read64(fp + 8) - 4; fp = memory.Read64(fp); } diff --git a/src/core/hle/service/nvflinger/buffer_queue.cpp b/src/core/hle/service/nvflinger/buffer_queue.cpp index 4f1e210b1..b89a2d41b 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue.cpp @@ -29,6 +29,10 @@ void BufferQueue::SetPreallocatedBuffer(u32 slot, const IGBPBuffer& igbp_buffer) .slot = slot, .status = Buffer::Status::Free, .igbp_buffer = igbp_buffer, + .transform = {}, + .crop_rect = {}, + .swap_interval = 0, + .multi_fence = {}, }); buffer_wait_event.writable->Signal(); diff --git a/src/video_core/renderer_vulkan/vk_device.cpp b/src/video_core/renderer_vulkan/vk_device.cpp index e1217ca83..f34ed6735 100644 --- a/src/video_core/renderer_vulkan/vk_device.cpp +++ b/src/video_core/renderer_vulkan/vk_device.cpp @@ -771,13 +771,18 @@ void VKDevice::CollectTelemetryParameters() { VkPhysicalDeviceDriverPropertiesKHR driver{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, .pNext = nullptr, + .driverID = {}, + .driverName = {}, + .driverInfo = {}, + .conformanceVersion = {}, }; - VkPhysicalDeviceProperties2KHR properties{ + VkPhysicalDeviceProperties2KHR device_properties{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR, .pNext = &driver, + .properties = {}, }; - physical.GetProperties2KHR(properties); + physical.GetProperties2KHR(device_properties); driver_id = driver.driverID; vendor_name = driver.driverName; diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 696eaeb5f..0e8f9c352 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -159,6 +159,7 @@ std::vector VKGraphicsPipeline::CreateShaderModules( .sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, .pNext = nullptr, .flags = 0, + .codeSize = 0, }; std::vector modules; @@ -388,6 +389,7 @@ vk::Pipeline VKGraphicsPipeline::CreatePipeline(const RenderPassParams& renderpa .logicOp = VK_LOGIC_OP_COPY, .attachmentCount = static_cast(num_attachments), .pAttachments = cb_attachments.data(), + .blendConstants = {}, }; std::vector dynamic_states{ diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp index e8515321b..13dd16356 100644 --- a/src/video_core/texture_cache/surface_params.cpp +++ b/src/video_core/texture_cache/surface_params.cpp @@ -240,6 +240,7 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface( .is_tiled = is_tiled, .srgb_conversion = config.format == Tegra::RenderTargetFormat::B8G8R8A8_SRGB || config.format == Tegra::RenderTargetFormat::A8B8G8R8_SRGB, + .is_layered = false, .block_width = is_tiled ? std::min(config.BlockWidth(), 5U) : 0U, .block_height = is_tiled ? std::min(config.BlockHeight(), 5U) : 0U, .block_depth = is_tiled ? std::min(config.BlockDepth(), 5U) : 0U,