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
This commit is contained in:
Jeroen Bakker
2025-10-03 10:34:49 +02:00
parent e810d74592
commit af0d98bf1d

View File

@@ -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 &copy_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;
}