#include "gpu/config/gpu_driver_bug_list.h"
#include <vector>
#include "base/command_line.h"
#include "build/build_config.h"
#include "gpu/config/gpu_driver_bug_workaround_type.h"
#include "gpu/config/gpu_info.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gpu {
class GpuDriverBugListTest : public testing::Test { … };
#if BUILDFLAG(IS_ANDROID)
TEST_F(GpuDriverBugListTest, CurrentListForARM) {
std::unique_ptr<GpuDriverBugList> list = GpuDriverBugList::Create();
GPUInfo gpu_info;
gpu_info.gl_vendor = "ARM";
gpu_info.gl_renderer = "MALi_T604";
gpu_info.gl_version = "OpenGL ES 2.0";
std::set<int> bugs = list->MakeDecision(
GpuControlList::kOsAndroid, "4.1", gpu_info);
EXPECT_EQ(1u, bugs.count(USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS));
}
TEST_F(GpuDriverBugListTest, CurrentListForImagination) {
std::unique_ptr<GpuDriverBugList> list = GpuDriverBugList::Create();
GPUInfo gpu_info;
gpu_info.gl_vendor = "Imagination Technologies";
gpu_info.gl_renderer = "PowerVR SGX 540";
gpu_info.gl_version = "OpenGL ES 2.0";
std::set<int> bugs = list->MakeDecision(
GpuControlList::kOsAndroid, "4.1", gpu_info);
EXPECT_EQ(1u, bugs.count(USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS));
}
#endif
TEST_F(GpuDriverBugListTest, AppendSingleWorkaround) { … }
TEST_F(GpuDriverBugListTest, AppendForceGPUWorkaround) { … }
TEST_F(GpuDriverBugListTest, TestBlocklistIsValid) { … }
}