Add regression test for the Intel D3D12 driver bug about T2T copy

This patch adds a regression test to dawn_end2end_tests for an
Intel D3D12 driver bug about the T2T copies with specific texture
formats when the source mipmap level is greater than 0.

This patch also does several clean-ups in CopyTests.cpp to support
testing arbitrary texture formats:
1. Initialize the source textures with device.WriteTexture().
2. Set default values for TextureSpec.copyLevel (0),
   TextureSpec.levelCount (1) and TextureSpec.copyOrigin ({0, 0, 0}).
3. Add TextureSpec.format and set the default value for it (RGBA8Unorm).
4. Support initializing and comparing the texture data with arbitrary
   texture format instead of RGBA8Unorm only in CopyTests_T2T.
5. Check all the texels in the related destination texture subresources
   instead of only the copied texels.

BUG=chromium:1161355
TEST=dawn_end2end_tests

Change-Id: Ib32aac57dc7bdc9a4c2edc96093afa945aa08a5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42240
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Jiawei Shao 2021-03-01 01:23:30 +00:00 committed by Commit Bot service account
parent 9c3aefa4bd
commit 60d6d0acd6
1 changed files with 232 additions and 205 deletions

File diff suppressed because it is too large Load Diff