Ver código fonte

Fix Vulkan texture update

(cherry picked from commit 3daa19dd957727b4cd2ddb2637cbafaf57f5aed9)
bitsawer 2 anos atrás
pai
commit
904582b4a8
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/vulkan/rendering_device_vulkan.cpp

+ 1 - 1
drivers/vulkan/rendering_device_vulkan.cpp

@@ -2607,7 +2607,7 @@ Error RenderingDeviceVulkan::_texture_update(RID p_texture, uint32_t p_layer, co
 
 					vkCmdCopyBufferToImage(command_buffer, staging_buffer_blocks[staging_buffer_current].buffer, texture->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &buffer_image_copy);
 
-					staging_buffer_blocks.write[staging_buffer_current].fill_amount += alloc_size;
+					staging_buffer_blocks.write[staging_buffer_current].fill_amount = alloc_offset + alloc_size;
 				}
 			}
 		}