diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 05db1de37..e6cc43033 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -534,12 +534,13 @@ void PipelineCache::LoadDiskCache() { instance.GetVendorID(), instance.GetDeviceID()); vk::PipelineCacheCreateInfo cache_info = {.initialDataSize = 0, .pInitialData = nullptr}; + std::vector cache_data; FileUtil::IOFile cache_file{cache_file_path, "r"}; if (cache_file.IsOpen()) { LOG_INFO(Render_Vulkan, "Loading pipeline cache"); const u32 cache_file_size = cache_file.GetSize(); - auto cache_data = std::vector(cache_file_size); + cache_data.resize(cache_file_size); if (cache_file.ReadBytes(cache_data.data(), cache_file_size)) { if (!IsCacheValid(cache_data.data(), cache_file_size)) { LOG_WARNING(Render_Vulkan, "Pipeline cache provided invalid, deleting"); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index e31f7c3bf..edb8fd42e 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -439,7 +439,7 @@ void RasterizerVulkan::SetupVertexArray(u32 vs_input_size, u32 vs_input_index_mi // Loop one more time to find unused attributes and assign them to the default one // This needs to happen because i = 2 might be assigned to location = 3 so the loop // above would skip setting it - for (std::size_t i = 0; i < 16; i++) { + for (u32 i = 0; i < 16; i++) { // If the attribute is just disabled, shove the default attribute to avoid // errors if the shader ever decides to use it. The pipeline cache can discard // this if needed since it has access to the usage mask from the code generator