diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 3f2195d7..8f438020 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -429,8 +429,10 @@ void GraphicsPipeline::BindVertexBuffers(StreamBuffer& staging) const { for (u32 i = 0; i < num_buffers; ++i) { const auto& buffer = guest_buffers[i]; const auto& host_buffer = std::ranges::find_if( - ranges_merged.cbegin(), ranges_merged.cend(), - [&](const BufferRange& range) { return (buffer.base_address >= range.base_address); }); + ranges_merged.cbegin(), ranges_merged.cend(), [&](const BufferRange& range) { + return (buffer.base_address >= range.base_address && + buffer.base_address < range.end_address); + }); assert(host_buffer != ranges_merged.cend()); host_buffers[i] = staging.Handle(); diff --git a/src/video_core/renderer_vulkan/vk_stream_buffer.cpp b/src/video_core/renderer_vulkan/vk_stream_buffer.cpp index 86a03a03..116f7896 100644 --- a/src/video_core/renderer_vulkan/vk_stream_buffer.cpp +++ b/src/video_core/renderer_vulkan/vk_stream_buffer.cpp @@ -232,8 +232,7 @@ void StreamBuffer::WaitPendingOperations(u64 requested_upper_bound) { } u64 StreamBuffer::Copy(VAddr src, size_t size, size_t alignment /*= 0*/) { - static const u64 MinUniformAlignment = instance.UniformMinAlignment(); - const auto [data, offset, _] = Map(size, MinUniformAlignment); + const auto [data, offset, _] = Map(size, alignment); std::memcpy(data, reinterpret_cast(src), size); Commit(size); return offset;