Use __VA_ARGS__ for texture expectation helpers/macros

After we applied __VA_ARGS__  in macros and use {x, y} and {w, h}
to replace (x, y) and (w, h) in EXPECT_TEXTURE_RGBA8_EQ and
EXPECT_TEXTURE_FLOAT_EQ, we can use the more general macro
EXPECT_TEXTURE_EQ. Then these two macros can be removed. Austin
has already put a TODO for this change but didn't do that.

utils::MakeOrigin and utils::MakeExtent are removed because they
are not needed.

In addition, this change removes 0 in callers for parameter level,
because level's default values is 0 in helpers implementation.

BUG: dawn:748

Change-Id: Iece4db7a8ed1d47b57988412f1c897205e7403d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Yunchao He
2021-04-08 14:58:42 +00:00
committed by Commit Bot service account
parent 47b6b680e1
commit 0da94c3d66
14 changed files with 98 additions and 120 deletions

View File

@@ -359,11 +359,4 @@ 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,8 +176,6 @@ 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_