Fix a bug in the generation of expected data in CopyTests
This patch fixes a bug in the generation of expected data in CopyTests. In function GetExpectedTextureData() we intend to initialize every byte of the expected texture data, so we need to calculate the index of the expected texture data with "bytesPerRow" instead of "texelBlocksPerRow". BUG=chromium:1161355 TEST=dawn_end2end_tests Change-Id: I05bcab629fc961c7425c10fcd534c451af199712 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/69600 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
parent
ca646ab4fb
commit
8ce15b3ce9
|
@ -50,7 +50,7 @@ class CopyTests {
|
|||
const uint32_t byteOffsetPerSlice = layout.bytesPerImage * layer;
|
||||
for (uint32_t y = 0; y < layout.mipSize.height; ++y) {
|
||||
for (uint32_t x = 0; x < layout.mipSize.width * bytesPerTexelBlock; ++x) {
|
||||
uint32_t i = x + y * layout.texelBlocksPerRow;
|
||||
uint32_t i = x + y * layout.bytesPerRow;
|
||||
textureData[byteOffsetPerSlice + i] =
|
||||
static_cast<uint8_t>((x + 1 + (layer + 1) * y) % 256);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue