2018-07-18 09:40:26 +00:00
|
|
|
// Copyright 2017 The Dawn Authors
|
2017-06-16 22:34:35 +00:00
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2019-08-28 23:18:10 +00:00
|
|
|
#ifndef TESTS_DAWNTEST_H_
|
|
|
|
#define TESTS_DAWNTEST_H_
|
|
|
|
|
2019-12-05 11:13:01 +00:00
|
|
|
#include "common/Log.h"
|
2019-10-15 11:44:38 +00:00
|
|
|
#include "dawn/dawn_proc_table.h"
|
2019-10-28 13:27:36 +00:00
|
|
|
#include "dawn/webgpu_cpp.h"
|
2018-09-19 00:32:52 +00:00
|
|
|
#include "dawn_native/DawnNative.h"
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2020-11-20 20:38:37 +00:00
|
|
|
#include <dawn_platform/DawnPlatform.h>
|
2017-06-16 22:34:35 +00:00
|
|
|
#include <gtest/gtest.h>
|
2019-04-26 07:52:57 +00:00
|
|
|
|
2017-07-17 13:37:08 +00:00
|
|
|
#include <memory>
|
2019-02-21 16:29:12 +00:00
|
|
|
#include <unordered_map>
|
2019-05-29 00:07:37 +00:00
|
|
|
#include <vector>
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2018-07-18 13:28:38 +00:00
|
|
|
// Getting data back from Dawn is done in an async manners so all expectations are "deferred"
|
2017-06-16 22:34:35 +00:00
|
|
|
// until the end of the test. Also expectations use a copy to a MapRead buffer to get the data
|
2019-07-08 10:05:46 +00:00
|
|
|
// so resources should have the CopySrc allowed usage bit if you want to add expectations on
|
2018-07-18 13:18:25 +00:00
|
|
|
// them.
|
2020-06-08 12:18:21 +00:00
|
|
|
|
2020-08-04 06:41:56 +00:00
|
|
|
#define EXPECT_BUFFER(buffer, offset, size, expectation) \
|
|
|
|
AddBufferExpectation(__FILE__, __LINE__, buffer, offset, size, expectation)
|
2020-06-08 12:18:21 +00:00
|
|
|
|
2020-08-04 06:41:56 +00:00
|
|
|
#define EXPECT_BUFFER_U16_EQ(expected, buffer, offset) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(uint16_t), new ::detail::ExpectEq<uint16_t>(expected))
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2020-08-04 06:41:56 +00:00
|
|
|
#define EXPECT_BUFFER_U16_RANGE_EQ(expected, buffer, offset, count) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(uint16_t) * (count), \
|
|
|
|
new ::detail::ExpectEq<uint16_t>(expected, count))
|
2017-07-04 14:53:42 +00:00
|
|
|
|
2020-08-04 06:41:56 +00:00
|
|
|
#define EXPECT_BUFFER_U32_EQ(expected, buffer, offset) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(uint32_t), new ::detail::ExpectEq<uint32_t>(expected))
|
2020-06-19 16:21:33 +00:00
|
|
|
|
2020-08-04 06:41:56 +00:00
|
|
|
#define EXPECT_BUFFER_U32_RANGE_EQ(expected, buffer, offset, count) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(uint32_t) * (count), \
|
|
|
|
new ::detail::ExpectEq<uint32_t>(expected, count))
|
|
|
|
|
2021-01-12 01:44:01 +00:00
|
|
|
#define EXPECT_BUFFER_U64_EQ(expected, buffer, offset) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(uint64_t), new ::detail::ExpectEq<uint64_t>(expected))
|
|
|
|
|
2020-08-04 06:41:56 +00:00
|
|
|
#define EXPECT_BUFFER_U64_RANGE_EQ(expected, buffer, offset, count) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(uint64_t) * (count), \
|
|
|
|
new ::detail::ExpectEq<uint64_t>(expected, count))
|
|
|
|
|
|
|
|
#define EXPECT_BUFFER_FLOAT_EQ(expected, buffer, offset) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(float), new ::detail::ExpectEq<float>(expected))
|
|
|
|
|
|
|
|
#define EXPECT_BUFFER_FLOAT_RANGE_EQ(expected, buffer, offset, count) \
|
|
|
|
EXPECT_BUFFER(buffer, offset, sizeof(float) * (count), \
|
|
|
|
new ::detail::ExpectEq<float>(expected, count))
|
2020-06-19 16:21:33 +00:00
|
|
|
|
2017-06-27 04:11:16 +00:00
|
|
|
// Test a pixel of the mip level 0 of a 2D texture.
|
2020-08-04 19:46:37 +00:00
|
|
|
#define EXPECT_PIXEL_RGBA8_EQ(expected, texture, x, y) \
|
|
|
|
AddTextureExpectation(__FILE__, __LINE__, expected, texture, x, y)
|
2017-07-17 20:16:50 +00:00
|
|
|
|
2020-08-04 19:46:37 +00:00
|
|
|
#define EXPECT_TEXTURE_RGBA8_EQ(expected, texture, x, y, width, height, level, slice) \
|
|
|
|
AddTextureExpectation(__FILE__, __LINE__, expected, texture, x, y, width, height, level, slice)
|
2017-06-27 04:11:16 +00:00
|
|
|
|
2020-08-04 19:46:37 +00:00
|
|
|
#define EXPECT_PIXEL_FLOAT_EQ(expected, texture, x, y) \
|
|
|
|
AddTextureExpectation(__FILE__, __LINE__, expected, texture, x, y)
|
2020-01-16 00:12:10 +00:00
|
|
|
|
2020-08-04 19:46:37 +00:00
|
|
|
#define EXPECT_TEXTURE_FLOAT_EQ(expected, texture, x, y, width, height, level, slice) \
|
|
|
|
AddTextureExpectation(__FILE__, __LINE__, expected, texture, x, y, width, height, level, slice)
|
|
|
|
|
2020-12-24 03:11:17 +00:00
|
|
|
#define EXPECT_PIXEL_RGBA8_BETWEEN(color0, color1, texture, x, y) \
|
|
|
|
AddTextureBetweenColorsExpectation(__FILE__, __LINE__, color0, color1, texture, x, y)
|
|
|
|
|
2020-08-04 19:46:37 +00:00
|
|
|
// TODO(enga): Migrate other texure expectation helpers to this common one.
|
|
|
|
#define EXPECT_TEXTURE_EQ(...) AddTextureExpectation(__FILE__, __LINE__, __VA_ARGS__)
|
2020-01-16 00:12:10 +00:00
|
|
|
|
2019-02-28 09:45:48 +00:00
|
|
|
// Should only be used to test validation of function that can't be tested by regular validation
|
|
|
|
// tests;
|
2020-04-16 21:36:33 +00:00
|
|
|
#define ASSERT_DEVICE_ERROR(statement) \
|
|
|
|
StartExpectDeviceError(); \
|
|
|
|
statement; \
|
|
|
|
FlushWire(); \
|
|
|
|
if (!EndExpectDeviceError()) { \
|
|
|
|
FAIL() << "Expected device error in:\n " << #statement; \
|
|
|
|
} \
|
|
|
|
do { \
|
|
|
|
} while (0)
|
2019-02-28 09:45:48 +00:00
|
|
|
|
2017-06-27 04:11:16 +00:00
|
|
|
struct RGBA8 {
|
2018-07-18 13:18:25 +00:00
|
|
|
constexpr RGBA8() : RGBA8(0, 0, 0, 0) {
|
|
|
|
}
|
|
|
|
constexpr RGBA8(uint8_t r, uint8_t g, uint8_t b, uint8_t a) : r(r), g(g), b(b), a(a) {
|
2017-06-27 04:11:16 +00:00
|
|
|
}
|
|
|
|
bool operator==(const RGBA8& other) const;
|
|
|
|
bool operator!=(const RGBA8& other) const;
|
2020-12-24 03:11:17 +00:00
|
|
|
bool operator<=(const RGBA8& other) const;
|
|
|
|
bool operator>=(const RGBA8& other) const;
|
2017-06-27 04:11:16 +00:00
|
|
|
|
|
|
|
uint8_t r, g, b, a;
|
2019-11-19 17:57:30 +00:00
|
|
|
|
|
|
|
static const RGBA8 kZero;
|
|
|
|
static const RGBA8 kBlack;
|
|
|
|
static const RGBA8 kRed;
|
|
|
|
static const RGBA8 kGreen;
|
|
|
|
static const RGBA8 kBlue;
|
|
|
|
static const RGBA8 kYellow;
|
|
|
|
static const RGBA8 kWhite;
|
2017-06-27 04:11:16 +00:00
|
|
|
};
|
2018-07-18 13:18:25 +00:00
|
|
|
std::ostream& operator<<(std::ostream& stream, const RGBA8& color);
|
2017-06-27 04:11:16 +00:00
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
struct BackendTestConfig {
|
|
|
|
BackendTestConfig(wgpu::BackendType backendType,
|
|
|
|
std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
|
|
|
|
|
|
|
wgpu::BackendType backendType;
|
|
|
|
|
|
|
|
std::vector<const char*> forceEnabledWorkarounds;
|
|
|
|
std::vector<const char*> forceDisabledWorkarounds;
|
|
|
|
};
|
|
|
|
|
2020-05-15 16:07:12 +00:00
|
|
|
struct TestAdapterProperties : wgpu::AdapterProperties {
|
|
|
|
TestAdapterProperties(const wgpu::AdapterProperties& properties, bool selected);
|
|
|
|
std::string adapterName;
|
|
|
|
bool selected;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// This may be temporary, so it is copied into |adapterName| and made private.
|
|
|
|
using wgpu::AdapterProperties::name;
|
|
|
|
};
|
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
struct AdapterTestParam {
|
|
|
|
AdapterTestParam(const BackendTestConfig& config,
|
|
|
|
const TestAdapterProperties& adapterProperties);
|
2019-04-26 07:52:57 +00:00
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
TestAdapterProperties adapterProperties;
|
2019-05-29 00:07:37 +00:00
|
|
|
std::vector<const char*> forceEnabledWorkarounds;
|
2019-06-11 18:11:05 +00:00
|
|
|
std::vector<const char*> forceDisabledWorkarounds;
|
2019-04-26 07:52:57 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
std::ostream& operator<<(std::ostream& os, const AdapterTestParam& param);
|
2019-08-27 01:44:29 +00:00
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
BackendTestConfig D3D12Backend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
2019-04-26 07:52:57 +00:00
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
BackendTestConfig MetalBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
BackendTestConfig NullBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
2020-03-20 17:07:20 +00:00
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
BackendTestConfig OpenGLBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
2020-02-25 16:23:17 +00:00
|
|
|
|
2020-11-25 16:45:04 +00:00
|
|
|
BackendTestConfig OpenGLESBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
BackendTestConfig VulkanBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
|
|
|
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
2020-02-25 16:23:17 +00:00
|
|
|
|
2020-11-25 16:45:04 +00:00
|
|
|
struct GLFWwindow;
|
|
|
|
|
2017-06-16 22:34:35 +00:00
|
|
|
namespace utils {
|
2020-08-14 21:02:12 +00:00
|
|
|
class PlatformDebugLogger;
|
2018-07-26 13:07:57 +00:00
|
|
|
class TerribleCommandBuffer;
|
2019-05-29 00:07:37 +00:00
|
|
|
} // namespace utils
|
2017-06-16 22:34:35 +00:00
|
|
|
|
|
|
|
namespace detail {
|
|
|
|
class Expectation;
|
2020-08-04 19:46:37 +00:00
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
class ExpectEq;
|
2020-12-24 03:11:17 +00:00
|
|
|
template <typename T>
|
|
|
|
class ExpectBetweenColors;
|
2019-05-29 00:07:37 +00:00
|
|
|
} // namespace detail
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2018-07-26 13:07:57 +00:00
|
|
|
namespace dawn_wire {
|
2019-12-10 23:32:48 +00:00
|
|
|
class CommandHandler;
|
2019-02-11 21:50:16 +00:00
|
|
|
class WireClient;
|
|
|
|
class WireServer;
|
2018-07-26 13:07:57 +00:00
|
|
|
} // namespace dawn_wire
|
2018-06-07 11:10:44 +00:00
|
|
|
|
2019-02-21 16:29:12 +00:00
|
|
|
void InitDawnEnd2EndTestEnvironment(int argc, char** argv);
|
|
|
|
|
|
|
|
class DawnTestEnvironment : public testing::Environment {
|
|
|
|
public:
|
|
|
|
DawnTestEnvironment(int argc, char** argv);
|
2020-08-14 21:02:12 +00:00
|
|
|
~DawnTestEnvironment() override;
|
2019-02-21 16:29:12 +00:00
|
|
|
|
2019-08-28 23:18:10 +00:00
|
|
|
static void SetEnvironment(DawnTestEnvironment* env);
|
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
std::vector<AdapterTestParam> GetAvailableAdapterTestParamsForBackends(
|
|
|
|
const BackendTestConfig* params,
|
|
|
|
size_t numParams);
|
2020-05-15 16:07:12 +00:00
|
|
|
|
2019-02-21 16:29:12 +00:00
|
|
|
void SetUp() override;
|
2019-11-20 09:45:41 +00:00
|
|
|
void TearDown() override;
|
2019-02-21 16:29:12 +00:00
|
|
|
|
2019-05-01 12:57:27 +00:00
|
|
|
bool UsesWire() const;
|
2019-06-25 00:49:56 +00:00
|
|
|
bool IsBackendValidationEnabled() const;
|
2019-02-21 16:29:12 +00:00
|
|
|
dawn_native::Instance* GetInstance() const;
|
2019-07-08 03:25:54 +00:00
|
|
|
bool HasVendorIdFilter() const;
|
|
|
|
uint32_t GetVendorIdFilter() const;
|
2019-12-10 23:32:48 +00:00
|
|
|
const char* GetWireTraceDir() const;
|
2020-11-25 16:45:04 +00:00
|
|
|
GLFWwindow* GetOpenGLWindow() const;
|
|
|
|
GLFWwindow* GetOpenGLESWindow() const;
|
2019-02-21 16:29:12 +00:00
|
|
|
|
2020-11-14 01:09:23 +00:00
|
|
|
const std::vector<std::string>& GetEnabledToggles() const;
|
|
|
|
const std::vector<std::string>& GetDisabledToggles() const;
|
|
|
|
|
2019-10-17 19:00:32 +00:00
|
|
|
protected:
|
|
|
|
std::unique_ptr<dawn_native::Instance> mInstance;
|
|
|
|
|
2019-02-21 16:29:12 +00:00
|
|
|
private:
|
2020-05-15 16:07:12 +00:00
|
|
|
void ParseArgs(int argc, char** argv);
|
2020-11-25 16:45:04 +00:00
|
|
|
std::unique_ptr<dawn_native::Instance> CreateInstanceAndDiscoverAdapters();
|
2020-05-15 20:28:05 +00:00
|
|
|
void SelectPreferredAdapterProperties(const dawn_native::Instance* instance);
|
2020-11-14 01:09:23 +00:00
|
|
|
void PrintTestConfigurationAndAdapterInfo(dawn_native::Instance* instance) const;
|
2019-02-21 16:29:12 +00:00
|
|
|
|
|
|
|
bool mUseWire = false;
|
2019-05-15 06:06:26 +00:00
|
|
|
bool mEnableBackendValidation = false;
|
2019-06-21 02:09:05 +00:00
|
|
|
bool mBeginCaptureOnStartup = false;
|
2019-07-08 03:25:54 +00:00
|
|
|
bool mHasVendorIdFilter = false;
|
|
|
|
uint32_t mVendorIdFilter = 0;
|
2019-12-10 23:32:48 +00:00
|
|
|
std::string mWireTraceDir;
|
2020-11-14 01:09:23 +00:00
|
|
|
|
|
|
|
std::vector<std::string> mEnabledToggles;
|
|
|
|
std::vector<std::string> mDisabledToggles;
|
2020-05-15 20:28:05 +00:00
|
|
|
std::vector<dawn_native::DeviceType> mDevicePreferences;
|
2020-05-15 16:07:12 +00:00
|
|
|
std::vector<TestAdapterProperties> mAdapterProperties;
|
2020-08-14 21:02:12 +00:00
|
|
|
|
|
|
|
std::unique_ptr<utils::PlatformDebugLogger> mPlatformDebugLogger;
|
2020-11-25 16:45:04 +00:00
|
|
|
GLFWwindow* mOpenGLWindow;
|
|
|
|
GLFWwindow* mOpenGLESWindow;
|
2019-02-21 16:29:12 +00:00
|
|
|
};
|
|
|
|
|
2019-08-28 23:18:10 +00:00
|
|
|
class DawnTestBase {
|
|
|
|
friend class DawnPerfTestBase;
|
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
public:
|
2020-05-15 20:28:05 +00:00
|
|
|
DawnTestBase(const AdapterTestParam& param);
|
2019-08-28 23:18:10 +00:00
|
|
|
virtual ~DawnTestBase();
|
2018-06-07 11:10:44 +00:00
|
|
|
|
2019-08-28 23:18:10 +00:00
|
|
|
void SetUp();
|
|
|
|
void TearDown();
|
2018-06-07 11:10:44 +00:00
|
|
|
|
|
|
|
bool IsD3D12() const;
|
|
|
|
bool IsMetal() const;
|
2020-03-20 17:07:20 +00:00
|
|
|
bool IsNull() const;
|
2018-06-07 11:10:44 +00:00
|
|
|
bool IsOpenGL() const;
|
2020-11-25 16:45:04 +00:00
|
|
|
bool IsOpenGLES() const;
|
2018-06-07 11:10:44 +00:00
|
|
|
bool IsVulkan() const;
|
|
|
|
|
2018-09-19 00:32:52 +00:00
|
|
|
bool IsAMD() const;
|
|
|
|
bool IsARM() const;
|
|
|
|
bool IsImgTec() const;
|
|
|
|
bool IsIntel() const;
|
|
|
|
bool IsNvidia() const;
|
|
|
|
bool IsQualcomm() const;
|
2020-04-09 08:16:30 +00:00
|
|
|
bool IsSwiftshader() const;
|
2020-07-10 22:58:48 +00:00
|
|
|
bool IsWARP() const;
|
2018-09-19 00:32:52 +00:00
|
|
|
|
|
|
|
bool IsWindows() const;
|
|
|
|
bool IsLinux() const;
|
|
|
|
bool IsMacOS() const;
|
|
|
|
|
2019-05-01 12:57:27 +00:00
|
|
|
bool UsesWire() const;
|
2019-06-25 00:49:56 +00:00
|
|
|
bool IsBackendValidationEnabled() const;
|
2020-09-09 23:11:57 +00:00
|
|
|
bool HasWGSL() const;
|
2019-05-01 12:57:27 +00:00
|
|
|
|
2020-06-19 17:35:33 +00:00
|
|
|
bool IsAsan() const;
|
|
|
|
|
2020-11-05 18:52:49 +00:00
|
|
|
bool HasToggleEnabled(const char* workaround) const;
|
|
|
|
|
2019-02-28 09:45:48 +00:00
|
|
|
void StartExpectDeviceError();
|
|
|
|
bool EndExpectDeviceError();
|
|
|
|
|
2019-07-08 03:25:54 +00:00
|
|
|
bool HasVendorIdFilter() const;
|
|
|
|
uint32_t GetVendorIdFilter() const;
|
|
|
|
|
2020-03-20 17:07:20 +00:00
|
|
|
wgpu::Instance GetInstance() const;
|
|
|
|
dawn_native::Adapter GetAdapter() const;
|
|
|
|
|
2020-11-20 20:38:37 +00:00
|
|
|
virtual std::unique_ptr<dawn_platform::Platform> CreateTestPlatform();
|
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
protected:
|
2019-10-28 13:27:36 +00:00
|
|
|
wgpu::Device device;
|
|
|
|
wgpu::Queue queue;
|
2018-06-07 11:10:44 +00:00
|
|
|
|
2019-05-24 22:31:36 +00:00
|
|
|
DawnProcTable backendProcs = {};
|
2019-10-28 13:27:36 +00:00
|
|
|
WGPUDevice backendDevice = nullptr;
|
2019-05-24 22:31:36 +00:00
|
|
|
|
2020-10-28 21:23:45 +00:00
|
|
|
size_t mLastWarningCount = 0;
|
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
// Helper methods to implement the EXPECT_ macros
|
|
|
|
std::ostringstream& AddBufferExpectation(const char* file,
|
|
|
|
int line,
|
2019-10-28 13:27:36 +00:00
|
|
|
const wgpu::Buffer& buffer,
|
2019-04-05 20:51:29 +00:00
|
|
|
uint64_t offset,
|
|
|
|
uint64_t size,
|
2018-06-07 11:10:44 +00:00
|
|
|
detail::Expectation* expectation);
|
2020-08-04 19:46:37 +00:00
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
std::ostringstream& AddTextureExpectation(const char* file,
|
|
|
|
int line,
|
|
|
|
const T* expectedData,
|
|
|
|
const wgpu::Texture& texture,
|
|
|
|
uint32_t x,
|
|
|
|
uint32_t y,
|
|
|
|
uint32_t width = 1,
|
|
|
|
uint32_t height = 1,
|
|
|
|
uint32_t level = 0,
|
|
|
|
uint32_t slice = 0,
|
|
|
|
wgpu::TextureAspect aspect = wgpu::TextureAspect::All,
|
|
|
|
uint32_t bytesPerRow = 0) {
|
|
|
|
return AddTextureExpectationImpl(
|
|
|
|
file, line, new detail::ExpectEq<T>(expectedData, width * height), texture, x, y, width,
|
|
|
|
height, level, slice, aspect, sizeof(T), bytesPerRow);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
2018-06-07 11:10:44 +00:00
|
|
|
std::ostringstream& AddTextureExpectation(const char* file,
|
|
|
|
int line,
|
2020-08-04 19:46:37 +00:00
|
|
|
const T& expectedData,
|
2019-10-28 13:27:36 +00:00
|
|
|
const wgpu::Texture& texture,
|
2018-06-07 11:10:44 +00:00
|
|
|
uint32_t x,
|
|
|
|
uint32_t y,
|
2020-08-04 19:46:37 +00:00
|
|
|
uint32_t level = 0,
|
|
|
|
uint32_t slice = 0,
|
|
|
|
wgpu::TextureAspect aspect = wgpu::TextureAspect::All,
|
|
|
|
uint32_t bytesPerRow = 0) {
|
|
|
|
return AddTextureExpectationImpl(file, line, new detail::ExpectEq<T>(expectedData), texture,
|
|
|
|
x, y, 1, 1, level, slice, aspect, sizeof(T), bytesPerRow);
|
|
|
|
}
|
2018-06-07 11:10:44 +00:00
|
|
|
|
2020-12-24 03:11:17 +00:00
|
|
|
template <typename T>
|
|
|
|
std::ostringstream& AddTextureBetweenColorsExpectation(
|
|
|
|
const char* file,
|
|
|
|
int line,
|
|
|
|
const T& color0,
|
|
|
|
const T& color1,
|
|
|
|
const wgpu::Texture& texture,
|
|
|
|
uint32_t x,
|
|
|
|
uint32_t y,
|
|
|
|
uint32_t level = 0,
|
|
|
|
uint32_t slice = 0,
|
|
|
|
wgpu::TextureAspect aspect = wgpu::TextureAspect::All,
|
|
|
|
uint32_t bytesPerRow = 0) {
|
|
|
|
return AddTextureExpectationImpl(
|
|
|
|
file, line, new detail::ExpectBetweenColors<T>(color0, color1), texture, x, y, 1, 1,
|
|
|
|
level, slice, aspect, sizeof(T), bytesPerRow);
|
|
|
|
}
|
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
void WaitABit();
|
2019-05-01 12:07:37 +00:00
|
|
|
void FlushWire();
|
2020-10-12 22:32:33 +00:00
|
|
|
void WaitForAllOperations();
|
2018-06-07 11:10:44 +00:00
|
|
|
|
2019-08-02 00:06:38 +00:00
|
|
|
bool SupportsExtensions(const std::vector<const char*>& extensions);
|
|
|
|
|
|
|
|
// Called in SetUp() to get the extensions required to be enabled in the tests. The tests must
|
|
|
|
// check if the required extensions are supported by the adapter in this function and guarantee
|
|
|
|
// the returned extensions are all supported by the adapter. The tests may provide different
|
|
|
|
// code path to handle the situation when not all extensions are supported.
|
|
|
|
virtual std::vector<const char*> GetRequiredExtensions();
|
|
|
|
|
2020-01-10 13:28:18 +00:00
|
|
|
const wgpu::AdapterProperties& GetAdapterProperties() const;
|
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
private:
|
2020-05-15 20:28:05 +00:00
|
|
|
AdapterTestParam mParam;
|
2019-08-28 23:18:10 +00:00
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
// Things used to set up testing through the Wire.
|
2019-02-11 21:50:16 +00:00
|
|
|
std::unique_ptr<dawn_wire::WireServer> mWireServer;
|
|
|
|
std::unique_ptr<dawn_wire::WireClient> mWireClient;
|
2018-09-06 13:26:48 +00:00
|
|
|
std::unique_ptr<utils::TerribleCommandBuffer> mC2sBuf;
|
|
|
|
std::unique_ptr<utils::TerribleCommandBuffer> mS2cBuf;
|
2018-06-07 11:10:44 +00:00
|
|
|
|
2019-12-10 23:32:48 +00:00
|
|
|
std::unique_ptr<dawn_wire::CommandHandler> mWireServerTraceLayer;
|
|
|
|
|
2019-02-28 09:45:48 +00:00
|
|
|
// Tracking for validation errors
|
2019-10-28 13:27:36 +00:00
|
|
|
static void OnDeviceError(WGPUErrorType type, const char* message, void* userdata);
|
2020-01-15 19:02:13 +00:00
|
|
|
static void OnDeviceLost(const char* message, void* userdata);
|
2019-02-28 09:45:48 +00:00
|
|
|
bool mExpectError = false;
|
|
|
|
bool mError = false;
|
|
|
|
|
2020-08-04 19:46:37 +00:00
|
|
|
std::ostringstream& AddTextureExpectationImpl(const char* file,
|
|
|
|
int line,
|
|
|
|
detail::Expectation* expectation,
|
|
|
|
const wgpu::Texture& texture,
|
|
|
|
uint32_t x,
|
|
|
|
uint32_t y,
|
|
|
|
uint32_t width,
|
|
|
|
uint32_t height,
|
|
|
|
uint32_t level,
|
|
|
|
uint32_t slice,
|
|
|
|
wgpu::TextureAspect aspect,
|
|
|
|
uint32_t dataSize,
|
|
|
|
uint32_t bytesPerRow);
|
|
|
|
|
2018-06-07 11:10:44 +00:00
|
|
|
// MapRead buffers used to get data for the expectations
|
|
|
|
struct ReadbackSlot {
|
2019-10-28 13:27:36 +00:00
|
|
|
wgpu::Buffer buffer;
|
2019-04-05 20:51:29 +00:00
|
|
|
uint64_t bufferSize;
|
2018-06-07 11:10:44 +00:00
|
|
|
const void* mappedData = nullptr;
|
|
|
|
};
|
|
|
|
std::vector<ReadbackSlot> mReadbackSlots;
|
|
|
|
|
|
|
|
// Maps all the buffers and fill ReadbackSlot::mappedData
|
|
|
|
void MapSlotsSynchronously();
|
2020-07-16 16:35:40 +00:00
|
|
|
static void SlotMapCallback(WGPUBufferMapAsyncStatus status, void* userdata);
|
2018-06-07 11:10:44 +00:00
|
|
|
size_t mNumPendingMapOperations = 0;
|
|
|
|
|
|
|
|
// Reserve space where the data for an expectation can be copied
|
|
|
|
struct ReadbackReservation {
|
2019-10-28 13:27:36 +00:00
|
|
|
wgpu::Buffer buffer;
|
2018-06-07 11:10:44 +00:00
|
|
|
size_t slot;
|
2019-04-05 20:51:29 +00:00
|
|
|
uint64_t offset;
|
2018-06-07 11:10:44 +00:00
|
|
|
};
|
2019-04-05 20:51:29 +00:00
|
|
|
ReadbackReservation ReserveReadback(uint64_t readbackSize);
|
2018-06-07 11:10:44 +00:00
|
|
|
|
|
|
|
struct DeferredExpectation {
|
|
|
|
const char* file;
|
|
|
|
int line;
|
|
|
|
size_t readbackSlot;
|
2019-04-05 20:51:29 +00:00
|
|
|
uint64_t readbackOffset;
|
|
|
|
uint64_t size;
|
2018-06-07 11:10:44 +00:00
|
|
|
uint32_t rowBytes;
|
2020-04-24 10:02:43 +00:00
|
|
|
uint32_t bytesPerRow;
|
2018-09-06 13:26:48 +00:00
|
|
|
std::unique_ptr<detail::Expectation> expectation;
|
2018-06-07 11:10:44 +00:00
|
|
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
|
|
|
|
// Use unique_ptr because of missing move/copy constructors on std::basic_ostringstream
|
|
|
|
std::unique_ptr<std::ostringstream> message;
|
|
|
|
};
|
|
|
|
std::vector<DeferredExpectation> mDeferredExpectations;
|
|
|
|
|
|
|
|
// Assuming the data is mapped, checks all expectations
|
|
|
|
void ResolveExpectations();
|
|
|
|
|
2019-08-02 00:06:38 +00:00
|
|
|
dawn_native::Adapter mBackendAdapter;
|
2020-11-20 20:38:37 +00:00
|
|
|
|
|
|
|
std::unique_ptr<dawn_platform::Platform> mTestPlatform;
|
2017-06-16 22:34:35 +00:00
|
|
|
};
|
|
|
|
|
2019-10-09 16:23:22 +00:00
|
|
|
// Skip a test when the given condition is satisfied.
|
2020-04-11 03:22:33 +00:00
|
|
|
#define DAWN_SKIP_TEST_IF(condition) \
|
|
|
|
do { \
|
|
|
|
if (condition) { \
|
|
|
|
dawn::InfoLog() << "Test skipped: " #condition "."; \
|
|
|
|
GTEST_SKIP(); \
|
|
|
|
return; \
|
|
|
|
} \
|
|
|
|
} while (0)
|
2019-10-09 16:23:22 +00:00
|
|
|
|
2020-10-28 21:23:45 +00:00
|
|
|
#define EXPECT_DEPRECATION_WARNING(statement) \
|
|
|
|
do { \
|
|
|
|
if (UsesWire()) { \
|
|
|
|
statement; \
|
|
|
|
} else { \
|
|
|
|
size_t warningsBefore = \
|
|
|
|
dawn_native::GetDeprecationWarningCountForTesting(device.Get()); \
|
|
|
|
statement; \
|
|
|
|
size_t warningsAfter = \
|
|
|
|
dawn_native::GetDeprecationWarningCountForTesting(device.Get()); \
|
|
|
|
EXPECT_EQ(mLastWarningCount, warningsBefore); \
|
2020-11-14 01:09:23 +00:00
|
|
|
if (!HasToggleEnabled("skip_validation")) { \
|
2020-10-28 21:23:45 +00:00
|
|
|
EXPECT_EQ(warningsAfter, warningsBefore + 1); \
|
|
|
|
} \
|
|
|
|
mLastWarningCount = warningsAfter; \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2020-05-15 20:28:05 +00:00
|
|
|
template <typename Params = AdapterTestParam>
|
2019-08-28 23:18:10 +00:00
|
|
|
class DawnTestWithParams : public DawnTestBase, public ::testing::TestWithParam<Params> {
|
|
|
|
protected:
|
|
|
|
DawnTestWithParams();
|
|
|
|
~DawnTestWithParams() override = default;
|
|
|
|
|
2020-05-15 22:06:35 +00:00
|
|
|
void SetUp() override {
|
|
|
|
DawnTestBase::SetUp();
|
2019-08-28 23:18:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void TearDown() override {
|
|
|
|
DawnTestBase::TearDown();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename Params>
|
|
|
|
DawnTestWithParams<Params>::DawnTestWithParams() : DawnTestBase(this->GetParam()) {
|
|
|
|
}
|
|
|
|
|
|
|
|
using DawnTest = DawnTestWithParams<>;
|
|
|
|
|
2020-05-13 08:01:55 +00:00
|
|
|
// Helpers to get the first element of a __VA_ARGS__ without triggering empty __VA_ARGS__ warnings.
|
|
|
|
#define DAWN_INTERNAL_PP_GET_HEAD(firstParam, ...) firstParam
|
|
|
|
#define DAWN_PP_GET_HEAD(...) DAWN_INTERNAL_PP_GET_HEAD(__VA_ARGS__, dummyArg)
|
|
|
|
|
2017-06-16 22:34:35 +00:00
|
|
|
// Instantiate the test once for each backend provided after the first argument. Use it like this:
|
2018-07-18 13:16:37 +00:00
|
|
|
// DAWN_INSTANTIATE_TEST(MyTestFixture, MetalBackend, OpenGLBackend)
|
2020-05-13 08:01:55 +00:00
|
|
|
#define DAWN_INSTANTIATE_TEST(testName, ...) \
|
|
|
|
const decltype(DAWN_PP_GET_HEAD(__VA_ARGS__)) testName##params[] = {__VA_ARGS__}; \
|
|
|
|
INSTANTIATE_TEST_SUITE_P( \
|
|
|
|
, testName, \
|
2020-05-15 20:28:05 +00:00
|
|
|
testing::ValuesIn(::detail::GetAvailableAdapterTestParamsForBackends( \
|
2020-05-13 08:01:55 +00:00
|
|
|
testName##params, sizeof(testName##params) / sizeof(testName##params[0]))), \
|
Rolling 7 dependencies
Roll build/ c10077be5..787a783b9 (444 commits)
https://chromium.googlesource.com/chromium/src/build/+log/c10077be589b..787a783b9651
$ git log c10077be5..787a783b9 --date=short --no-merges --format='%ad %ae %s'
2020-11-02 sdefresne [ios] Add Swift compatibility library directory to lib_dirs
2020-11-02 chromium-autoroll Roll Fuchsia SDK from 0.20201101.3.1 to 0.20201102.1.1
2020-11-02 benmason Revert "Android: Enable use_debug_fission for official builds"
2020-11-02 chromium-autoroll Roll Fuchsia SDK from 0.20201101.2.1 to 0.20201101.3.1
2020-11-01 chromium-autoroll Roll Fuchsia SDK from 0.20201101.1.1 to 0.20201101.2.1
2020-11-01 chromium-autoroll Roll Fuchsia SDK from 0.20201031.3.1 to 0.20201101.1.1
2020-11-01 chromium-autoroll Roll Fuchsia SDK from 0.20201031.2.1 to 0.20201031.3.1
2020-10-31 chromium-autoroll Roll Fuchsia SDK from 0.20201031.0.1 to 0.20201031.2.1
2020-10-31 dpranke Win tooling fixes for Python 3 compatibility.
2020-10-31 chromium-autoroll Roll Fuchsia SDK from 0.20201030.2.1 to 0.20201031.0.1
2020-10-31 bjoyce Run junit tests on multiple threads.
2020-10-31 chromium-autoroll Roll Fuchsia SDK from 0.20201030.1.1 to 0.20201030.2.1
2020-10-30 dpranke Fix incorrect path in python2 GN templates.
2020-10-30 wenbinzhang Revert "Re-enabling aar .info file checker"
2020-10-30 thakis android+chromeos: Make sure 32-bit android arm builds use -mfloat-abi=softfp.
2020-10-30 agrieve Android: Add logging to proguard.py build step
2020-10-30 smaier Re-enabling aar .info file checker
2020-10-30 bjoyce Add option to print classpath to script.
2020-10-30 thakis ios: Pass -Wextra-semi to ObjC files with Xcode clang too.
2020-10-30 thakis ios: Disable -Wgnu-folding-constant for .m files.
2020-10-30 chromium-autoroll Roll Fuchsia SDK from 0.20201029.3.1 to 0.20201030.1.1
2020-10-30 agrieve Android: Enable use_debug_fission for official builds
2020-10-30 chromium-autoroll Roll Fuchsia SDK from 0.20201029.2.1 to 0.20201029.3.1
2020-10-30 agrieve Android: Fix use_debug_fission logic.
2020-10-30 agrieve Reland "Android: Enable vertical class merging in R8"
2020-10-29 chromium-autoroll Roll Fuchsia SDK from 0.20201029.0.1 to 0.20201029.2.1
2020-10-29 smaier Using R8's built-in -checkdiscard ignoring
2020-10-29 agrieve Revert "Reland "Enable JDK library desugaring by default""
2020-10-29 sdefresne [ios] Fix a typo in variable name
2020-10-29 sdefresne [ios] Add support for toolchain using 14.0 deployment target
2020-10-29 chromium-autoroll Roll Fuchsia SDK from 0.20201028.4.1 to 0.20201029.0.1
2020-10-29 dpranke Have Android bin/run_ wrappers call test_env.py directly.
2020-10-29 bjoyce Fix comment.
2020-10-29 dpranke Have ChromeOS bin/run wrappers call test_env.py directly
2020-10-29 chromium-autoroll Roll Fuchsia SDK from 0.20201028.1.1 to 0.20201028.4.1
2020-10-28 dpranke Have fuchsia bin/run wrappers call test_env.py directly
2020-10-28 bpastene chromeos: Add basic RDB integration for all Tast results.
2020-10-28 sdefresne [ios] Update packaging rules to support "catalyst" environment
2020-10-28 dpranke Change test wrapper script arg handling.
2020-10-28 bpastene android: Allow custom artifacts to be passed to result_sink.Post().
2020-10-28 sdefresne [ios] Fix compiler and linker flags for "catalyst" environment
2020-10-28 sdefresne [ios] Remove ios_sdk_platform_abs_path gn variable
2020-10-28 ythjkt Lacros: Define BUILDFLAG(IS_CHROMSOS_ASH|LACROS).
2020-10-28 chromium-autoroll Roll Fuchsia SDK from 0.20201027.3.1 to 0.20201028.1.1
2020-10-28 thakis build: Disallow explicitly setting concurrent_links in lto builds.
2020-10-28 ganesh midl.py remove legacy |dynamic_guid|, replace with new |dynamic_guids|.
2020-10-28 chromium-autoroll Roll Fuchsia SDK from 0.20201027.1.1 to 0.20201027.3.1
2020-10-27 ganesh midl.py multiple guid substitution enhancements.
2020-10-27 chonggu [Fuchsia] Change result and filter file locations
2020-10-27 harringtond Allow -check directives that R8 ignores
(...)
2020-09-11 dpranke Reland "Rename wrapper_scripts for generated_script tests in MB."
2020-09-11 svenzheng [lacros] Runner retry for gsutil copy
2020-09-11 chromium-autoroll Roll Fuchsia SDK from 0.20200911.0.1 to 0.20200911.1.1
2020-09-11 chromium-autoroll Roll Fuchsia SDK from 0.20200910.2.2 to 0.20200911.0.1
2020-09-10 chromium-autoroll Roll Fuchsia SDK from 0.20200910.1.1 to 0.20200910.2.2
2020-09-10 svenzheng Adds android_sync_integration_tests to CI
2020-09-10 daniel.l Improve support for Python3 in Mac, iOS build
2020-09-10 chromium-autoroll Roll Fuchsia SDK from 0.20200910.0.1 to 0.20200910.1.1
2020-09-10 chromium-autoroll Roll Fuchsia SDK from 0.20200909.2.1 to 0.20200910.0.1
2020-09-10 agrieve Add GN assert for enable_resource_allowlist_generation
2020-09-09 chromium-autoroll Roll Fuchsia SDK from 0.20200909.1.1 to 0.20200909.2.1
2020-09-09 agrieve Revert "Increase android32_ndk_api_level 16 -> 21"
2020-09-09 liaoyuke [lacros] Retry starting ash-chrome
2020-09-09 chromium-autoroll Roll Fuchsia SDK from 0.20200909.0.1 to 0.20200909.1.1
2020-09-09 chromium-autoroll Roll Fuchsia SDK from 0.20200908.2.1 to 0.20200909.0.1
2020-09-09 pkotwicz [Build] Make remaining targets compatible with 'enforce_resource_overlays'
2020-09-08 benmason Fix build_vars.txt
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200908.1.1 to 0.20200908.2.1
2020-09-08 sokcevic Update codesearch links
2020-09-08 mheikal android_resources targets can no longer create srcjars
2020-09-08 agrieve Increase android32_ndk_api_level 16 -> 21
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200908.0.1 to 0.20200908.1.1
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200907.2.1 to 0.20200908.0.1
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200907.1.1 to 0.20200907.2.1
2020-09-07 chromium-autoroll Roll Fuchsia SDK from 0.20200907.0.1 to 0.20200907.1.1
2020-09-07 chromium-autoroll Roll Fuchsia SDK from 0.20200906.3.1 to 0.20200907.0.1
2020-09-07 chromium-autoroll Roll Fuchsia SDK from 0.20200906.2.1 to 0.20200906.3.1
2020-09-06 chromium-autoroll Roll Fuchsia SDK from 0.20200902.0.1 to 0.20200906.2.1
2020-09-04 agrieve Roll bundletool 0.13.3 -> 1.2.0
2020-09-03 hidehiko lacros: Migrate chromeos/chromeos_buildflags.h to build/chromeos_buildflags.h
2020-09-03 agrieve Grit: whitelist -> allowlist
2020-09-03 hidehiko lacros: Renamed build/lacros_buildflags.h to build/chromeos_buildflags.h
2020-09-03 aeubanks Re-enable -Wstring-concatenation
2020-09-03 bsheedy Fix handling of missing Gold links
2020-09-02 huangs [Lacros] Size dashboard: Track total and total compressed sizes.
2020-09-02 bjoyce Add summary html to test results.
2020-09-02 benmason Allow "optimize_for" param for bundletool.
2020-09-02 sdefresne [ios] Fix build/config/ios/hardlink.py when output exists
2020-09-02 huangs [Lacros] Suppress ignored params in lacros_resource_sizes.py.
2020-09-02 chromium-autoroll Roll Fuchsia SDK from 0.20200901.3.1 to 0.20200902.0.1
2020-09-02 pkotwicz [Android] Make build style more strict about resource overriding
2020-09-01 chromium-autoroll Roll Fuchsia SDK from 0.20200901.1.1 to 0.20200901.3.1
2020-09-01 yngve Specify GN not_needed() for lint deps
2020-09-01 jbudorick Use denylist throughout //build/android.
2020-09-01 chromium-autoroll Roll Fuchsia SDK from 0.20200831.3.1 to 0.20200901.1.1
2020-09-01 msisov Reland "Reland "Reland "X11 and Ozone: enable use_x11 and use_ozone"""
2020-09-01 chromium-autoroll Roll Fuchsia SDK from 0.20200831.2.1 to 0.20200831.3.1
2020-08-31 mikenichols install-build-deps: Remove redundant dev_list
2020-08-31 bjoyce Remove need for flag option.
2020-08-31 chromium-autoroll Roll Fuchsia SDK from 0.20200831.1.1 to 0.20200831.2.1
Roll buildtools/ ff93f3ea1..98881a129 (5 commits)
https://chromium.googlesource.com/chromium/src/buildtools/+log/ff93f3ea1a7f..98881a129786
$ git log ff93f3ea1..98881a129 --date=short --no-merges --format='%ad %ae %s'
2020-10-26 pnoland Revert "Roll GN from e002e68a..f5f465b5"
2020-10-26 rjascani Roll GN from e002e68a..f5f465b5
2020-09-29 normando [buildtools] Add DIR_METADATA files.
2020-09-14 sdefresne [apple] Use `!is_apple` gn variable when appropriate
2020-09-09 sdefresne Roll GN from 6f13aaac..e002e68a
Roll testing/ e5ced5141..3e2640a32 (1534 commits)
https://chromium.googlesource.com/chromium/src/testing/+log/e5ced5141379..3e2640a325dc
$ git log e5ced5141..3e2640a32 --date=short --no-merges --format='%ad %ae %s'
2020-11-02 yekuang Translate '--swarming' Py arg to '--server' Go arg in trigger scripts
2020-11-01 javierrobles [iOS][Biometric-Auth] Enable by default
2020-11-01 caitlinfischer Remove Windows occlusion studies from the testing config.
2020-11-01 le.hoang.q Use multiple shards for dEQP GLES3 tests on Metal
2020-10-31 ynovikov Start running tests on "Mac FYI Release (Intel UHD 630)"
2020-10-31 enga Run WebGL conformance with V8 FastCalls enabled
2020-10-30 wenbinzhang [benchmarking] Add similar time log for gtests
2020-10-30 rmhasan weblayer, skew tests: Add pie tester that runs skew tests
2020-10-30 bsheedy Retry minidump tests
2020-10-30 kdillon Remove field trial config for PrioritizeCompositingUntilBeginMainFrame.
2020-10-30 ssilkin Disable CanSetupH264VideoCallOnSupportedDevice on Android WebRTC FYI dbg.
2020-10-30 jonahr Test dEQP GLES3 on ANGLE's Metal backend
2020-10-30 andzaytsev Privacy elevated on Android: cleaned up the flag and the codepath since this the feature fully launched
2020-10-30 snijhara Delete all users through update required screen
2020-10-30 blundell [Android] Add support for overriding user data dir in Java browsertests
2020-10-30 thakis Add more test binaries to the memory bots.
2020-10-30 yekuang Reland "Add --use-swarming-go to the custom trigger scripts"
2020-10-29 lpz Make it possible to have a default --isolated-script-test-output arg.
2020-10-29 bdea Create a fieldtrial for EnhancedProtectionPromoCard.
2020-10-29 holte MetricsDownsampleConsistently trial config
2020-10-29 rockot Remove Storage Service test suites from bots
2020-10-29 meacer [Lookalikes] Fully launch punycode interstitial
2020-10-29 michaelbai ContentCapture: Implement constant streaming
2020-10-29 manukh [omnibox] [rich-autocompletion] Add fieldtrial_testing_config.json entry
2020-10-29 svenzheng [lacros] Remove all experimental flags from lacros FYI builder
2020-10-29 ynovikov Add Windows and Linux AMD RX 5500 XT GPU.FYI CI and try bots
2020-10-29 jdeblasio [Lookalikes] Enable target embedding by default on ToT.
2020-10-28 dpranke Have fuchsia bin/run wrappers call test_env.py directly
2020-10-28 wenbinzhang [benchmarking] remove shading environment variables before running gtests
2020-10-28 wanderview URLPattern: Add BUILD.gn and initial unittest.
2020-10-28 chonggu Add --isolate-map-file Flag to generate_buildbot_json.py script.
2020-10-28 dpranke Change test wrapper script arg handling.
2020-10-28 drott Revert "Add --use-swarming-go to the custom trigger scripts"
2020-10-28 tasak Added "Enabled_V3" to PartitionAllocGigaCage.
2020-10-28 yekuang Add --use-swarming-go to the custom trigger scripts
2020-10-28 hypan Add LUCI+mb+test configs for the CI and trybot win10-inverse-fieldtrials-fyi-rel
2020-10-28 jomag Revert "Custom builder for EA SWA"
2020-10-28 zhaoyangli [iOS] Roll iOS14 beta bots to Xcode 12.2 beta 3 (12b5035g)
2020-10-28 ynovikov Add "Mac FYI Release (Intel UHD 630)" GPU.FYI CI bot and trybot
2020-10-28 cassew Update field trial config for TurnOffStreamingMediaCaching experiment
2020-10-27 leszeks [v8] Add off-thread finalization field trial
2020-10-27 zhaoyangli [code coverage] Add 2 coverage try builders mirroring iOS CQ builders
2020-10-27 kmilka Add share features to testing config
2020-10-27 johnchen Roll Catapult from 4f6c1bb4191b to a01dd2af4292 (1 revision)
2020-10-27 harrisonsean [iOS][Safety Check] Add fieldtrial for safety check ios
2020-10-27 smcgruer [wptrunner] Enable status=test features for run_wpt_tests.py
2020-10-27 rushans Add the experiment to fieldtrial_testing_config
2020-10-27 caitlinfischer Remove DialMediaRouteProvider from testing config.
2020-10-27 thestig Fix field trial testing config for PDFViewerUpdate.
2020-10-27 shaktisahu Query Tiles : Updated finch config to match the launch group
(...)
2020-04-23 svenzheng Revert "Re-enable TwoClientDictionarySyncTest.Sanity_E2ETest test"
2020-04-23 agable Use linux hosts for all mac triggered testers
2020-04-22 xinghuilu [Android] Add real time check for all devices in field trial config.
2020-04-22 hypan android: add an alternative dimension for kitkat mixins
2020-04-22 lindsayw [ios] Add optional dimensions for MacOS10.15 in ios upstream waterfall
2020-04-22 steveroe [fuchsia] Save the fuchsia system log by default.
2020-04-22 msramek Add the PasswordCheck study to fieldtrial_testing_config.json
2020-04-22 agable Don't restrict Mac10.15 Tests to non-gpu testers
2020-04-22 xiaochengh Add field trial entry for FontPreloadingDelaysRendering
2020-04-22 bsheedy Make Win Intel Exp mixin have 2 GPUs
2020-04-22 bsheedy Switch service account for -dev swarming
2020-04-22 anastasiian Add fieldtrial testing config for EduCoexistence
2020-04-22 agable Only run Mac non-isolated scripts in compile tasks
2020-04-22 eseckler infra: Add CI+trybot configuration for linux-perfetto-rel
2020-04-22 pmarko sheriff: Add two shards to browser_tests on Linux ChromiumOS MSan Tests bot
2020-04-22 svenzheng Re-enable TwoClientDictionarySyncTest.Sanity_E2ETest test
2020-04-22 rogerta Create a field trial testing config for Webprotect alpha.
2020-04-22 chonggu [Fuchsia] Enable media_blink and gin unittests on Fuchsia FYI bots.
2020-04-22 agable Run FYI Mac non-isolated scripts in compile task
2020-04-21 agable Don't run non-isolated scripts on Mac10.15 Tests
2020-04-21 bpastene Add a note to //testing/buildbot/OWNERS regarding CQ changes.
2020-04-21 liaoyuke Set up win64-chrome official ci and try bots
2020-04-21 wez Revert "[Fuchsia] Enable cc_unittests on Fuchsia x64 CI bot."
2020-04-21 boliu Add weblayer_unittests to main ci/cq
2020-04-20 jeffyoon [pgo] system_health.common_desktop benchmark for PGO builders
2020-04-20 chonggu [Fuchsia] Add stable unittests to Fuchsia CI bots.
2020-04-20 mvanouwerkerk Add RemoteCopy to testing config.
2020-04-20 chonggu [Fuchsia] Enable cc_unittests on Fuchsia x64 CI bot.
2020-04-20 bsheedy Switch Win10 Intel Exp builder to single pool
2020-04-20 guidou [AudioService] Update field trial config.
2020-04-19 hypan Revert "android: Add AR test to android-10-arm64-rel builder"
2020-04-18 hypan android: Add AR test to android-10-arm64-rel builder
2020-04-18 bpastene Strip chrome before deploying it when running disk-usage Tast test.
2020-04-17 mmenke Update PartitionConnectionsByNetworkIsolationKey field trial config.
2020-04-17 chouinard Disable RenderTests on Android CFI bot
2020-04-17 bsheedy Switch Win10 Intel Exp to 2 pools
2020-04-17 xinghuilu Add SafeBrowsingRealTimeUrlLookupEnabledWithToken in field trial config.
2020-04-17 caitlinfischer Enable demographics features by default on iOS.
2020-04-17 olivierrobin Add PRODUCT_BUNDLE_IDENTIFIER in xcode attributes
2020-04-17 michaelbai Add components_junit_tests target
2020-04-17 sophiechang Add fieldtrial testing config for Client-Side Reactive Preconnect
2020-04-16 estaab Add weblayer skew tests to android-weblayer-pie-x86-fyi-rel.
2020-04-16 jessemckenna Add SlowDCTimerInterruptsWin field-trial config
2020-04-16 bsheedy Remove Gold service account from -dev bots
2020-04-16 treib Add "ios" to fieldtrial testing config for SyncInstanceIDTokenTTL
2020-04-15 jeffreycohen [ShareButtonInTopToolbar] match finch experiment params.
2020-04-15 bsheedy Allow Skia Gold Use In Android Tests
2020-04-15 jeffreycohen [ShareButtonInToolbar] add field trial for android experiment
2020-04-15 jeffyoon [ios/infra] ios13-sdk-simulator missed an iPhone X 13.3->13.4
2020-04-15 lpz Copy wpt output to full_results.json, which allows hooking into legacy results viewer.
Roll third_party/googletest/ a09ea700d..282877317 (132 commits)
https://chromium.googlesource.com/external/github.com/google/googletest/+log/a09ea700d32b..2828773179fa
$ git log a09ea700d..282877317 --date=short --no-merges --format='%ad %ae %s'
2020-10-27 absl-team Googletest export
2020-10-26 absl-team Googletest export
2020-10-20 sonzogniarthur Fix typo "definedin in" => "defined in"
2020-10-15 absl-team Googletest export
2020-10-15 absl-team Googletest export
2020-10-15 dmauro Googletest export
2020-10-14 absl-team Googletest export
2020-10-14 dmauro Googletest export
2020-10-14 dmauro Googletest export
2020-10-14 absl-team Googletest export
2020-10-14 dmauro Googletest export
2020-10-14 absl-team Googletest export
2020-10-13 dmauro Googletest export
2020-10-13 dmauro Googletest export
2020-10-13 absl-team Googletest export
2020-10-13 absl-team Googletest export
2020-10-09 ofats Googletest export
2020-10-09 absl-team Googletest export
2020-10-08 absl-team Googletest export
2020-10-12 peternewman Fix a typo
2020-10-07 manavrion Improve FilePath::Normalize method
2020-10-07 pravin1992 Issue 2135: Change template args in NiceMock, NaggyMock and StrictMock from A1, A2, ... to TArg1, TArg2,... to avoid clash with legacy header files
2020-09-29 absl-team Googletest export
2020-10-01 63450189+ranodeepbanerjee A slight Gramatical change.
2020-09-29 dmauro Googletest export
2020-09-29 absl-team Googletest export
2020-09-25 absl-team Googletest export
2020-09-27 56075233+keshavgbpecdelhi Update cook_book.md
2020-09-23 absl-team Googletest export
2020-09-23 absl-team Googletest export
2020-09-21 absl-team Googletest export
2020-09-24 thomas.barbier Fix warning maybe-uninitialized
2020-09-18 absl-team Googletest export
2020-09-17 absl-team Googletest export
2020-09-18 63900998+JethroSama Update README.md, added missing 'a'
2020-09-08 absl-team Googletest export
2020-09-02 dmauro Googletest export
2020-09-01 absl-team Googletest export
2020-09-01 absl-team Googletest export
2020-08-26 absl-team Googletest export
2020-08-25 27jf Add timestamp to in old method mock macro guide
2020-08-20 absl-team Googletest export
2020-08-17 absl-team Googletest export
2020-08-12 krzysio Googletest export
2020-08-12 robert.earhart Export LICENSE
2020-08-11 absl-team Googletest export
2020-08-11 dmauro Googletest export
2020-08-10 absl-team Googletest export
2020-08-05 absl-team Googletest export
2020-08-03 absl-team Googletest export
(...)
2020-06-19 amatanhead Make EXPECT_THROW and EXPECT_NO_THROW macros more informative
2020-06-19 mayur.shingote Updated googletest issue tracker url.
2020-06-17 absl-team Googletest export
2020-06-15 absl-team Googletest export
2018-05-01 lantw44 Avoid using environ on FreeBSD
2020-06-12 dmauro Googletest export
2020-06-10 absl-team Googletest export
2020-06-08 absl-team Googletest export
2020-06-08 absl-team Googletest export
2020-06-05 dmauro Googletest export
2020-06-10 rharrison Fix build issue for MinGW
2020-06-04 dmauro Googletest export
2020-06-03 absl-team Googletest export
2020-06-02 absl-team Googletest export
2020-06-01 absl-team Googletest export
2020-05-30 eli fix compilation on OpenBSD 6.7
2020-03-07 krystian.kuzniarek make UniversalPrinter<std::any> support RTTI
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::any (without support for RTTI)
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::optional
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::variant
2020-05-28 dmauro Googletest export
2020-05-28 dmauro Googletest export
2020-05-27 absl-team Googletest export
2020-05-27 dmauro Googletest export
2020-05-19 absl-team Googletest export
2020-05-18 absl-team Googletest export
2020-05-18 durandal Googletest export
2020-05-18 absl-team Googletest export
2020-05-14 absl-team Googletest export
2020-05-25 invalid_ms_user Use count function instead of handwritten loop
2020-05-10 mate.pek README.dm: Renamed related open source project name: Catch2 and Google Test Explorer -> C++ TestMate
2020-05-13 absl-team Googletest export
2020-05-13 absl-team Googletest export
2020-05-11 absl-team Googletest export
2020-05-08 martin Remove an explicit include of debugapi.h
2020-05-08 martin Revert "Googletest export"
2020-05-05 igor.n.nazarenko Detect proto messages based on presense of DebugString.
2020-03-26 mvoorsluys Fix test with stack.
2020-03-29 verdoialaurent Fix --gtest_print_time coloring
2020-03-26 mvoorsluys Fixed xml unit-tests and added extra tests
2020-03-26 mvoorsluys Fix multiple \n characters in xml file when using GTEST_SKIP.
2020-03-26 mvoorsluys Only write ">\n" once when there is failure and skipped tests.
2020-03-26 mvoorsluys Output skipped information in the xml file.
2020-03-21 ngompa13 Set the version for the libraries
2020-02-21 nini16041988-gitbucket Add missing call for gtest_list_output_unittest_ unitTest. Add unitTest for fixed TEST_P line number. Use CodeLocation TestInfo struct.
2020-02-18 nini16041988-gitbucket Fix: shadow member
2020-02-18 nini16041988-gitbucket Add correct line number to TEST_P test cases for gtest_output.
2020-02-06 59134746+aribibek fix a link to documentation
2020-01-17 hgsilverman Fix always false condition and clean function body
2020-01-22 mjvk Fixes extensions missing for QNX
Roll third_party/jinja2/ b41863e42..a82a4944a (4 commits)
https://chromium.googlesource.com/chromium/src/third_party/jinja2/+log/b41863e42637..a82a4944a7f2
$ git log b41863e42..a82a4944a --date=short --no-merges --format='%ad %ae %s'
2020-09-18 keishi Update COMPONENT for jinja2 and mako
2020-04-03 adetaylor remove copybara initialization artifacts
2020-04-03 adetaylor Copybara Service Migration Initialization.
2020-04-03 adetaylor Adding CPEPrefixes for more dependencies.
Roll third_party/markupsafe/ 8f45f5cfa..0944e71f4 (3 commits)
https://chromium.googlesource.com/chromium/src/third_party/markupsafe/+log/8f45f5cfa000..0944e71f4b2c
$ git log 8f45f5cfa..0944e71f4 --date=short --no-merges --format='%ad %ae %s'
2020-10-22 ehmaldonado Add DIR_METADATA files to directories under //third_party
2017-01-19 ymzhang remove copybara initialization artifacts
2017-01-19 ymzhang Copybara Service Migration Initialization.
Roll tools/clang/ fcef86e30..eb065289a (42 commits)
https://chromium.googlesource.com/chromium/src/tools/clang/+log/fcef86e30a0a..eb065289a4d9
$ git log fcef86e30..eb065289a --date=short --no-merges --format='%ad %ae %s'
2020-11-02 bartekn Update class name for ClassPropertyValueSetter::property_
2020-11-02 bartekn Add SockaddrStorage::addr to ignore list
2020-10-31 bartekn Ignore iovec::iov_base that requires .get() in a different repository
2020-10-31 bartekn Update manual-paths-to-ignore.txt
2020-10-31 bartekn Remove no longer needed fields
2020-10-30 bartekn Un-ignore UnretainedWrapper::ptr_
2020-10-30 lukasza Go back to unconditionally skipping fields in generated files.
2020-10-30 bartekn Add to and fix TRACE_EVENT/EXPECT_THAT section
2020-10-30 thakis clang upload script: Try again to not run tricium.
2020-10-29 thakis Tell tricium to not run clang-tidy on clang rolls.
2020-10-27 lukasza Remove automatically covered cases from manual-fields-to-ignore.txt
2020-10-27 lukasza Delete "const-char" filtering rule (redundant with "global-scope" rule).
2020-10-26 lukasza "union" filtering rule should recurse into nested structs.
2020-10-26 lukasza Improve "global-destructor" filtering rule: multiple fields, arrays, ...
2020-10-26 lukasza Emit constexpr-initialized fields as candidates for exclusion.
2020-10-26 thakis clang build scripts: Explicitly disable memprof.
2020-10-23 lukasza Appending .get() to arguments of implicitly invoked constructors.
2020-10-22 davidvc blink: Add absl::variant to the blink symbol allowlist
2020-10-21 lukasza Skip more scenarios via blocklist, rather than unconditionally.
2020-10-20 hans Clang plugin build fixes after upstream https://reviews.llvm.org/D84362
2020-10-19 lukasza Add --target_os=... support to run_tool.py and generate_compdb.py
2020-10-19 omerkatz heap: Use fullpaths in clang plugin ignored/allowed directories
2020-10-16 keishi Add fields to ignore for rewrite_raw_ptr_fields
2020-10-13 keishi Add chrome/chrome_cleaner to rewrite_raw_ptr_fields manual ignore paths
2020-10-06 ehmaldonado Add DIR_METADATA files to //tools
2020-10-06 bartekn Add android_webview/public/ to manual-paths-to-ignore
2020-10-06 bartekn Fix pointer paths (missing subclass)
2020-10-05 gbiv goma_link: parse `,` from `-mllvm` args appropriately
2020-10-04 aeubanks Use downloaded gcc toolchain in compiler-rt tests
2020-10-02 thakis Re-roll clang llvmorg-12-init-5035-gd0abc757-3 : llvmorg-12-init-5627-gf086e85e-1.
2020-09-30 aeubanks Revert "Clang build.py, set shell=True in GetCommitDescription"
2020-09-30 bartekn Update manual ignore-list based on recent rewrites
2020-09-29 hans Clang build.py: Remove debug line from 69f5d9865577
2020-09-29 hans Clang build.py, set shell=True in GetCommitDescription
2020-09-22 lukasza Exclude from the rewrite directories only used in renderer processes.
2020-09-22 thakis Revert "Roll clang llvmorg-12-init-5035-gd0abc757-2 : llvmorg-12-init-5627-gf086e85e-1."
2020-09-17 lukasza Emitting union fields into a blocklist.
2020-09-16 hans Clang build script: link against rpmalloc on Windows
2020-09-14 thakis Roll clang llvmorg-12-init-5035-gd0abc757-2 : llvmorg-12-init-5627-gf086e85e-1.
2020-09-11 akhuang clang build.py: set -DLLVM_ENABLE_DIA_SDK=OFF to use the native symbolizer, and also remove DIA dependencies.
2020-09-08 thakis Roll clang llvmorg-12-init-4187-g33ce275f-1 : llvmorg-12-init-5035-gd0abc757-1.
2020-09-01 bartekn Add pointers that cause run-time issues to manual-fields-to-ignore
Created with:
roll-dep build buildtools testing third_party/googletest third_party/jinja2 third_party/markupsafe tools/clang
Change-Id: I93e18255bc2468eb467a267d22025646d80ec0a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31567
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-04 09:44:47 +00:00
|
|
|
testing::PrintToStringParamName()); \
|
|
|
|
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(testName)
|
2017-06-16 22:34:35 +00:00
|
|
|
|
|
|
|
namespace detail {
|
2018-07-18 13:16:37 +00:00
|
|
|
// Helper functions used for DAWN_INSTANTIATE_TEST
|
2020-01-10 13:28:18 +00:00
|
|
|
bool IsBackendAvailable(wgpu::BackendType type);
|
2020-05-15 20:28:05 +00:00
|
|
|
std::vector<AdapterTestParam> GetAvailableAdapterTestParamsForBackends(
|
|
|
|
const BackendTestConfig* params,
|
|
|
|
size_t numParams);
|
2017-06-16 22:34:35 +00:00
|
|
|
|
|
|
|
// All classes used to implement the deferred expectations should inherit from this.
|
|
|
|
class Expectation {
|
2018-07-18 13:18:25 +00:00
|
|
|
public:
|
|
|
|
virtual ~Expectation() = default;
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2018-07-18 13:18:25 +00:00
|
|
|
// Will be called with the buffer or texture data the expectation should check.
|
|
|
|
virtual testing::AssertionResult Check(const void* data, size_t size) = 0;
|
2017-06-16 22:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Expectation that checks the data is equal to some expected values.
|
2018-07-18 13:18:25 +00:00
|
|
|
template <typename T>
|
2017-06-16 22:34:35 +00:00
|
|
|
class ExpectEq : public Expectation {
|
2018-07-18 13:18:25 +00:00
|
|
|
public:
|
|
|
|
ExpectEq(T singleValue);
|
|
|
|
ExpectEq(const T* values, const unsigned int count);
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2018-07-18 13:18:25 +00:00
|
|
|
testing::AssertionResult Check(const void* data, size_t size) override;
|
2017-06-16 22:34:35 +00:00
|
|
|
|
2018-07-18 13:18:25 +00:00
|
|
|
private:
|
|
|
|
std::vector<T> mExpected;
|
2017-06-16 22:34:35 +00:00
|
|
|
};
|
2018-02-04 16:07:02 +00:00
|
|
|
extern template class ExpectEq<uint8_t>;
|
2020-06-08 12:18:21 +00:00
|
|
|
extern template class ExpectEq<int16_t>;
|
2017-06-16 22:34:35 +00:00
|
|
|
extern template class ExpectEq<uint32_t>;
|
2020-08-04 06:41:56 +00:00
|
|
|
extern template class ExpectEq<uint64_t>;
|
2017-06-27 04:11:16 +00:00
|
|
|
extern template class ExpectEq<RGBA8>;
|
2020-01-16 00:12:10 +00:00
|
|
|
extern template class ExpectEq<float>;
|
2020-12-24 03:11:17 +00:00
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
class ExpectBetweenColors : public Expectation {
|
|
|
|
public:
|
|
|
|
// Inclusive for now
|
|
|
|
ExpectBetweenColors(T value0, T value1);
|
|
|
|
testing::AssertionResult Check(const void* data, size_t size) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<T> mLowerColorChannels;
|
|
|
|
std::vector<T> mHigherColorChannels;
|
|
|
|
|
|
|
|
// used for printing error
|
|
|
|
std::vector<T> mValues0;
|
|
|
|
std::vector<T> mValues1;
|
|
|
|
};
|
|
|
|
// A color is considered between color0 and color1 when all channel values are within range of
|
|
|
|
// each counterparts. It doesn't matter which value is higher or lower. Essentially color =
|
|
|
|
// lerp(color0, color1, t) where t is [0,1]. But I don't want to be too strict here.
|
|
|
|
extern template class ExpectBetweenColors<RGBA8>;
|
2018-07-18 13:18:25 +00:00
|
|
|
} // namespace detail
|
2019-08-28 23:18:10 +00:00
|
|
|
|
|
|
|
#endif // TESTS_DAWNTEST_H_
|