Commit 95bba6e5 by Geoff Lang Committed by Commit Bot

Vulkan: Use automatic row length and image height for texture copies.

CopyTextureChromium sometimes failed because of incorrect image dimensions being used in the image copy command. Simply use 0, the images are all tightly packed. BUG=angleproject:2723 Change-Id: I2332561bdc9ee70ba07101bcf2db7ea9f2355844 Reviewed-on: https://chromium-review.googlesource.com/1194907 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent a883dd06
......@@ -772,8 +772,6 @@ angle::Result TextureVk::copyImageDataToBuffer(ContextVk *contextVk,
ANGLE_TRY(ensureImageInitialized(contextVk));
const angle::Format &angleFormat = getImage().getFormat().textureFormat();
const gl::Extents imageSize =
mState.getImageDesc(NonCubeTextureTypeToTarget(mState.getType()), sourceLevel).size;
size_t sourceCopyAllocationSize = sourceArea.width * sourceArea.height * angleFormat.pixelBytes;
vk::CommandBuffer *commandBuffer = nullptr;
......@@ -794,8 +792,8 @@ angle::Result TextureVk::copyImageDataToBuffer(ContextVk *contextVk,
VkBufferImageCopy region;
region.bufferOffset = sourceCopyOffset;
region.bufferRowLength = imageSize.width;
region.bufferImageHeight = imageSize.height;
region.bufferRowLength = 0;
region.bufferImageHeight = 0;
region.imageExtent.width = sourceArea.width;
region.imageExtent.height = sourceArea.height;
region.imageExtent.depth = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment