mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Vulkan: Fix a bug in the impl of T2T copy with 2D array textures
This patch fixes a bug in the implementation of the toggle UseTemporaryBufferInCompressedTextureToTextureCopy on Vulkan backend. The previous implementation only considered the T2T one-layer copies, which will cause the validation error by Vulkan validation layer. This patch fixes this issue by adding the missing support of multi-layer copies. This patch also fixes the failures in the WebGPU CTS tests color_textures,compressed,array,* on the Linux/Vulkan backends with Vulkan validation layer enabled. BUG=dawn:42, chromium:1161355 TEST=dawn_end2end_tests Change-Id: Ic437919a843b8439d267b8d75b27ade3a9e7bcae Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36260 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
da2d927bb1
commit
4110684aa0
@@ -414,7 +414,8 @@ namespace dawn_native { namespace vulkan {
|
||||
|
||||
// Create the temporary buffer. Note that We don't need to respect WebGPU's 256 alignment
|
||||
// because it isn't a hard constraint in Vulkan.
|
||||
uint64_t tempBufferSize = widthInBlocks * heightInBlocks * blockInfo.byteSize;
|
||||
uint64_t tempBufferSize =
|
||||
widthInBlocks * heightInBlocks * copySize.depth * blockInfo.byteSize;
|
||||
BufferDescriptor tempBufferDescriptor;
|
||||
tempBufferDescriptor.size = tempBufferSize;
|
||||
tempBufferDescriptor.usage = wgpu::BufferUsage::CopySrc | wgpu::BufferUsage::CopyDst;
|
||||
|
||||
Reference in New Issue
Block a user