Format: Move the TexelBlockInfo inside an AspectInfo.

In follow up CLs additional will be added to the AspectInfo, like the
supported component types.

Also simplify the logic for GetTexelInfo since all aspects are the first
aspects, except stencil which is always stencil8.

Bug: dawn:517
Change-Id: Iebbcb8a7f8fa2c4b7b06f65d6e4e8917c0a85366
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/src/dawn_native/vulkan/UtilsVulkan.cpp b/src/dawn_native/vulkan/UtilsVulkan.cpp
index 967d2a7..a78bfef 100644
--- a/src/dawn_native/vulkan/UtilsVulkan.cpp
+++ b/src/dawn_native/vulkan/UtilsVulkan.cpp
@@ -108,11 +108,10 @@
         region.bufferOffset = dataLayout.offset;
         // In Vulkan the row length is in texels while it is in bytes for Dawn
         const TexelBlockInfo& blockInfo =
-            texture->GetFormat().GetTexelBlockInfo(textureCopy.aspect);
-        ASSERT(dataLayout.bytesPerRow % blockInfo.blockByteSize == 0);
-        region.bufferRowLength =
-            dataLayout.bytesPerRow / blockInfo.blockByteSize * blockInfo.blockWidth;
-        region.bufferImageHeight = dataLayout.rowsPerImage * blockInfo.blockHeight;
+            texture->GetFormat().GetAspectInfo(textureCopy.aspect).block;
+        ASSERT(dataLayout.bytesPerRow % blockInfo.byteSize == 0);
+        region.bufferRowLength = dataLayout.bytesPerRow / blockInfo.byteSize * blockInfo.width;
+        region.bufferImageHeight = dataLayout.rowsPerImage * blockInfo.height;
 
         region.imageSubresource.aspectMask = VulkanAspectMask(textureCopy.aspect);
         region.imageSubresource.mipLevel = textureCopy.mipLevel;