Move EXPECT_LAZY_CLEAR to TextureZeroInitTests.cpp

This macro is used only for testing texture zero initialization so it
didn't need to be in DawnTest.h

Bug:
Change-Id: Ifb7ed06d93ae1bc275c9fd4650858c9b27117b5e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15360
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2020-01-22 15:55:46 +00:00 committed by Commit Bot service account
parent 6b66b67f69
commit 8ffd3f2333
2 changed files with 10 additions and 10 deletions

View File

@ -57,16 +57,6 @@
sizeof(float), \
new detail::ExpectEq<float>(expected, (width) * (height)))
#define EXPECT_LAZY_CLEAR(N, statement) \
if (UsesWire()) { \
statement; \
} else { \
size_t lazyClearsBefore = dawn_native::GetLazyClearCountForTesting(device.Get()); \
statement; \
size_t lazyClearsAfter = dawn_native::GetLazyClearCountForTesting(device.Get()); \
EXPECT_EQ(N, lazyClearsAfter - lazyClearsBefore); \
}
// Should only be used to test validation of function that can't be tested by regular validation
// tests;
#define ASSERT_DEVICE_ERROR(statement) \

View File

@ -18,6 +18,16 @@
#include "utils/ComboRenderPipelineDescriptor.h"
#include "utils/WGPUHelpers.h"
#define EXPECT_LAZY_CLEAR(N, statement) \
if (UsesWire()) { \
statement; \
} else { \
size_t lazyClearsBefore = dawn_native::GetLazyClearCountForTesting(device.Get()); \
statement; \
size_t lazyClearsAfter = dawn_native::GetLazyClearCountForTesting(device.Get()); \
EXPECT_EQ(N, lazyClearsAfter - lazyClearsBefore); \
}
class TextureZeroInitTest : public DawnTest {
protected:
void TestSetUp() override {