Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Issue 1301053002: gpu: introduce DISABLE_TEXTURE_STORAGE workaround for mesa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: match CommandLine pattern to other gl_tests Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list_json.cc » ('j') | gpu/config/gpu_driver_bug_workaround_type.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_texture_storage_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
index 3006888aa6be6eb6ea13e02bd0c21cf9d061cca5..257fd7eb6f75881fd3441abb2dc81482d6d81729 100644
--- a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
+++ b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
@@ -5,8 +5,11 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include "base/command_line.h"
+#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/tests/gl_manager.h"
#include "gpu/command_buffer/tests/gl_test_utils.h"
+#include "gpu/config/gpu_switches.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -16,9 +19,16 @@ class TextureStorageTest : public testing::Test {
protected:
static const GLsizei kResolution = 64;
void SetUp() override {
+ base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
+ command_line.AppendSwitchASCII(
+ switches::kGpuDriverBugWorkarounds,
+ base::IntToString(gpu::DISABLE_TEXTURE_STORAGE));
+
GLManager::Options options;
options.size = gfx::Size(kResolution, kResolution);
- gl_.Initialize(options);
+
+ gl_.InitializeWithCommandLine(options, &command_line);
+ DCHECK(gl_.workarounds().disable_texture_storage);
gl_.MakeCurrent();
glGenTextures(1, &tex_);
@@ -60,6 +70,9 @@ TEST_F(TextureStorageTest, CorrectPixels) {
2, 2,
GL_RGBA, GL_UNSIGNED_BYTE,
source_pixels);
+
+ // Mesa dirvers crash without DISABLE_TEXTURE_STORAGE workaround.
+ // crbug.com/521904
EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 2, 2, 0, source_pixels));
}
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list_json.cc » ('j') | gpu/config/gpu_driver_bug_workaround_type.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698