From af0d98bf1d239df7f044275439e75800f81eebc4 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 3 Oct 2025 10:34:49 +0200 Subject: [PATCH] Fix #147254: Vulkan: Text Rendering artifacts b2eaf812b1 made sure that the min offset alignment for text rendering was used to calculate the correct offset. However the change didn't update the region to be uploaded to the GPU. The artifacts are caused by reading from allocated, but uninitialized memory. This PR fixes this by calculating the correct region to copy to the GPU. The artifact didn't appear on AMD/NVIDIA GPUs as their alignment are 4 bytes. Intel GPU is 64 bytes. Pull Request: https://projects.blender.org/blender/blender/pulls/147265 --- source/blender/gpu/vulkan/vk_streaming_buffer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/gpu/vulkan/vk_streaming_buffer.cc b/source/blender/gpu/vulkan/vk_streaming_buffer.cc index 7eace712fa2..33ba1800a9c 100644 --- a/source/blender/gpu/vulkan/vk_streaming_buffer.cc +++ b/source/blender/gpu/vulkan/vk_streaming_buffer.cc @@ -60,9 +60,10 @@ VkDeviceSize VKStreamingBuffer::update(VKContext &context, const void *data, siz data, data_size); + /* Increace the region size to copy to include the min offset alignment. */ render_graph::VKCopyBufferNode::Data ©_buffer_data = render_graph.get_node_data( copy_buffer_handle_); - copy_buffer_data.region.size += data_size; + copy_buffer_data.region.size += offset_ - start_offset; return start_offset; }