Implement 3D texture copy: preparation

This is a preparation CL for 3D texture copy. It refactors texture
result comparison MACROs and their implementations, in order to
add texture result comparison for 3D texture. Prior to this change,
texture result comparison supports 1D/2D texture only.

BUG: dawn:547
Change-Id: Ia242356e05f4762e33a8278ec0d038b8580f7aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Yunchao He
2021-03-31 22:15:53 +00:00
committed by Commit Bot service account
parent dca3f4fbbc
commit 4eb40c1849
19 changed files with 182 additions and 172 deletions

View File

@@ -359,4 +359,11 @@ namespace utils {
return device.CreateBindGroup(&descriptor);
}
wgpu::Origin3D MakeOrigin(uint32_t x, uint32_t y, uint32_t z) {
return {x, y, z};
}
wgpu::Extent3D MakeExtent(uint32_t w, uint32_t h, uint32_t d) {
return {w, h, d};
}
} // namespace utils

View File

@@ -176,6 +176,8 @@ namespace utils {
const wgpu::BindGroupLayout& layout,
std::initializer_list<BindingInitializationHelper> entriesInitializer);
wgpu::Origin3D MakeOrigin(uint32_t x = 0, uint32_t y = 0, uint32_t z = 0);
wgpu::Extent3D MakeExtent(uint32_t w = 1, uint32_t h = 1, uint32_t d = 1);
} // namespace utils
#endif // UTILS_DAWNHELPERS_H_