diff --git a/src/dawn/tests/end2end/CopyExternalTextureForBrowserTests.cpp b/src/dawn/tests/end2end/CopyExternalTextureForBrowserTests.cpp index 66024c324b..07ccb93dc6 100644 --- a/src/dawn/tests/end2end/CopyExternalTextureForBrowserTests.cpp +++ b/src/dawn/tests/end2end/CopyExternalTextureForBrowserTests.cpp @@ -77,7 +77,8 @@ class CopyExternalTextureForBrowserTests : public Parent { wgpu::TextureDataLayout externalTexturePlane0DataLayout = {}; externalTexturePlane0DataLayout.bytesPerRow = 4; - this->queue.WriteTexture(&plane0, yPlaneData.data(), yPlaneData.size() * sizeof(float), + this->queue.WriteTexture(&plane0, yPlaneData.data(), + yPlaneData.size() * sizeof(yPlaneData[0]), &externalTexturePlane0DataLayout, &externalTexturePlane0Desc.size); // uv plane @@ -99,7 +100,8 @@ class CopyExternalTextureForBrowserTests : public Parent { wgpu::TextureDataLayout externalTexturePlane1DataLayout = {}; externalTexturePlane1DataLayout.bytesPerRow = 4; - this->queue.WriteTexture(&plane1, uvPlaneData.data(), uvPlaneData.size() * sizeof(float), + this->queue.WriteTexture(&plane1, uvPlaneData.data(), + uvPlaneData.size() * sizeof(uvPlaneData[0]), &externalTexturePlane1DataLayout, &externalTexturePlane1Desc.size); // Create an ExternalTextureDescriptor from the texture views