Cleanup: Make TexelBlockInfo a member of Format, not superclass

Bug: dawn:439
Change-Id: I1255086d29e8b85045776f183b3fb563eec0b090
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27940
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng
2020-09-02 18:50:09 +00:00
committed by Commit Bot service account
parent 8ec8f31e3b
commit ea82272fd6
17 changed files with 121 additions and 105 deletions

View File

@@ -290,13 +290,13 @@ class CopySplitTest : public testing::Test {
Texture2DCopySplit DoTest(const TextureSpec& textureSpec, const BufferSpec& bufferSpec) {
ASSERT(textureSpec.width % textureSpec.blockWidth == 0 &&
textureSpec.height % textureSpec.blockHeight == 0);
dawn_native::Format fakeFormat = {};
fakeFormat.blockWidth = textureSpec.blockWidth;
fakeFormat.blockHeight = textureSpec.blockHeight;
fakeFormat.blockByteSize = textureSpec.texelBlockSizeInBytes;
dawn_native::TexelBlockInfo blockInfo = {};
blockInfo.blockWidth = textureSpec.blockWidth;
blockInfo.blockHeight = textureSpec.blockHeight;
blockInfo.blockByteSize = textureSpec.texelBlockSizeInBytes;
Texture2DCopySplit copySplit = ComputeTextureCopySplit(
{textureSpec.x, textureSpec.y, textureSpec.z},
{textureSpec.width, textureSpec.height, textureSpec.depth}, fakeFormat,
{textureSpec.width, textureSpec.height, textureSpec.depth}, blockInfo,
bufferSpec.offset, bufferSpec.bytesPerRow, bufferSpec.rowsPerImage);
ValidateCopySplit(textureSpec, bufferSpec, copySplit);
return copySplit;