Skip to content

Commit

Permalink
Fix a minor issue introduced in previous stencil test fix (#3086)
Browse files Browse the repository at this point in the history
  • Loading branch information
toji authored Oct 24, 2023
1 parent 73bcf42 commit 7991cc7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/webgpu/api/operation/command_buffer/image_copy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,20 +1088,19 @@ class ImageCopyTest extends TextureTestMixin(GPUTest) {

// Check the valid data in outputStagingBuffer once per row.
for (let y = 0; y < copyFromOutputTextureLayout.mipSize[1]; ++y) {
const rowOffset = expectedStencilTextureDataBytesPerRow * y;
const dataStart =
expectedStencilTextureDataOffset +
expectedStencilTextureDataBytesPerRow *
expectedStencilTextureDataRowsPerImage *
stencilTextureLayer +
rowOffset;
expectedStencilTextureDataBytesPerRow * y;
this.expectGPUBufferValuesEqual(
outputStagingBuffer,
expectedStencilTextureData.slice(
dataStart,
dataStart + copyFromOutputTextureLayout.mipSize[0]
),
rowOffset
copyFromOutputTextureLayout.bytesPerRow * y
);
}
}
Expand Down

0 comments on commit 7991cc7

Please sign in to comment.