mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
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:
committed by
Commit Bot service account
parent
8ec8f31e3b
commit
ea82272fd6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user