From c0c4db68a8453e55274691424109caefb9befb26 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Thu, 14 Apr 2022 18:06:15 +0530 Subject: [PATCH] Fix `BufferView` offset not being added in `vkCmdUpdateBuffer` The offset of the view wasn't added to the `vkCmdUpdateBuffer`, this would cause the offset to be incorrect given the buffer was a view of a larger buffer that wasn't the start of it. This commit fixes that by adding the offset of the view to the buffer update. --- app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h index d12bcccc..23597b66 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h @@ -718,7 +718,7 @@ namespace skyline::gpu::interconnect { executor.AddOutsideRpCommand([view = constantBuffer.view, data, offset](vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr &cycle, GPU &) { std::scoped_lock lock{view}; - commandBuffer.updateBuffer(view.bufferDelegate->buffer->GetBacking(), offset, vk::ArrayProxy(1, &data)); + commandBuffer.updateBuffer(view.bufferDelegate->buffer->GetBacking(), view->view->offset + offset, vk::ArrayProxy(1, &data)); }); }