Skip to content

Commit

Permalink
Re-review initMethod = render in image_copy tests (#3319)
Browse files Browse the repository at this point in the history
* Re-review initMethod = render in image_copy tests

* add comment
  • Loading branch information
shrekshao authored Jan 25, 2024
1 parent 0e38887 commit 5cabcb6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/webgpu/api/operation/command_buffer/image_copy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export const description = `writeTexture + copyBufferToTexture + copyTextureToBu
* copy_with_no_image_or_slice_padding_and_undefined_values: test that when copying a single row we can set any bytesPerRow value and when copying a single\
slice we can set rowsPerImage to 0. Also test setting offset, rowsPerImage, mipLevel, origin, origin.{x,y,z} to undefined.
Note: more coverage of memory synchronization for different read and write texture methods are in same_subresource.spec.ts.
* TODO:
- add another initMethod which renders the texture [3]
- test copyT2B with buffer size not divisible by 4 (not done because expectContents 4-byte alignment)
- Convert the float32 values in initialData into the ones compatible to the depth aspect of
depthFormats when depth16unorm is supported by the browsers in
Expand Down Expand Up @@ -86,7 +87,7 @@ type InitMethod = 'WriteTexture' | 'CopyB2T';
* - PartialCopyT2B: do CopyT2B to check that the part of the texture we copied to with InitMethod
* matches the data we were copying and that we don't overwrite any data in the target buffer that
* we're not supposed to - that's primarily for testing CopyT2B functionality.
* - FullCopyT2B: do CopyT2B on the whole texture and check wether the part we copied to matches
* - FullCopyT2B: do CopyT2B on the whole texture and check whether the part we copied to matches
* the data we were copying and that the nothing else was modified - that's primarily for testing
* WriteTexture and CopyB2T.
*
Expand Down Expand Up @@ -1357,8 +1358,6 @@ class ImageCopyTest extends TextureTestMixin(GPUTest) {

/**
* This is a helper function used for filtering test parameters
*
* [3]: Modify this after introducing tests with rendering.
*/
function formatCanBeTested({ format }: { format: ColorTextureFormat }): boolean {
return kTextureFormatInfo[format].color.copyDst && kTextureFormatInfo[format].color.copySrc;
Expand Down

0 comments on commit 5cabcb6

Please sign in to comment.