mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-23 15:03:43 +00:00
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:
parent
6b66b67f69
commit
8ffd3f2333
@ -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) \
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user