#include <algorithm>
#include <vector>
#include "dawn/common/Math.h"
#include "dawn/tests/DawnTest.h"
#include "dawn/utils/ComboRenderPipelineDescriptor.h"
#include "dawn/utils/WGPUHelpers.h"
namespace dawn {
namespace {
enum class WriteType { … };
constexpr wgpu::TextureFormat kDefaultFormat = …;
constexpr uint32_t kDefaultHeight = …;
constexpr uint32_t kDefaultArrayLayerCount = …;
constexpr uint32_t kDefaultMipLevelCount = …;
constexpr uint32_t kDefaultSampleCount = …;
constexpr WriteType kDefaultWriteType = …;
std::ostream& operator<<(std::ostream& o, WriteType writeType) { … }
TextureFormat;
TextureWidth;
TextureHeight;
ArrayLayerCount;
MipLevelCount;
SampleCount;
DAWN_TEST_PARAM_STRUCT(TextureCorruptionTestsParams,
TextureFormat,
TextureWidth,
TextureHeight,
ArrayLayerCount,
MipLevelCount,
SampleCount,
WriteType);
class TextureCorruptionTests : public DawnTestWithParams<TextureCorruptionTestsParams> { … };
class TextureCorruptionTests_Format : public TextureCorruptionTests { … };
TEST_P(TextureCorruptionTests_Format, Tests) { … }
DAWN_INSTANTIATE_TEST_P(…);
class TextureCorruptionTests_WidthAndHeight : public TextureCorruptionTests { … };
TEST_P(TextureCorruptionTests_WidthAndHeight, Tests) { … }
DAWN_INSTANTIATE_TEST_P(…);
class TextureCorruptionTests_ArrayLayer : public TextureCorruptionTests { … };
TEST_P(TextureCorruptionTests_ArrayLayer, Tests) { … }
DAWN_INSTANTIATE_TEST_P(…);
class TextureCorruptionTests_Mipmap : public TextureCorruptionTests { … };
TEST_P(TextureCorruptionTests_Mipmap, Tests) { … }
DAWN_INSTANTIATE_TEST_P(…);
class TextureCorruptionTests_Multisample : public TextureCorruptionTests { … };
TEST_P(TextureCorruptionTests_Multisample, Tests) { … }
DAWN_INSTANTIATE_TEST_P(…);
class TextureCorruptionTests_WriteType : public TextureCorruptionTests { … };
TEST_P(TextureCorruptionTests_WriteType, Tests) { … }
DAWN_INSTANTIATE_TEST_P(…);
}
}