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

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

Issue 2786963002: Revert of Make gl_clear_broken workaround support core profile and use it under AMD Linux Catalyst driver (Closed)
Patch Set: Created 3 years, 9 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 | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
index ee20525a2b460e3d77d9b5733b709890a6854f78..ff2ca7975be0064d1cf710b9dd5ab77c6e6c1be1 100644
--- a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
+++ b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
@@ -43,6 +43,14 @@
gl_.Initialize(GLManager::Options());
DCHECK(!gl_.workarounds().gl_clear_broken);
}
+ }
+
+ bool IsApplicable() {
+ // The workaround doesn't use VAOs which would cause a failure on a core
+ // context and the hardware for each the workaround is necessary has a buggy
+ // VAO implementation. So we skip testing the workaround on core profiles.
+ return !GetParam() ||
+ !gl_.context()->GetVersionInfo()->is_desktop_core_profile;
}
void InitDraw();
@@ -110,6 +118,10 @@
::testing::Values(true, false));
TEST_P(GLClearFramebufferTest, ClearColor) {
+ if (!IsApplicable()) {
+ return;
+ }
+
glClearColor(1.0f, 0.5f, 0.25f, 0.5f);
glClear(GL_COLOR_BUFFER_BIT);
@@ -120,6 +132,10 @@
}
TEST_P(GLClearFramebufferTest, ClearColorWithMask) {
+ if (!IsApplicable()) {
+ return;
+ }
+
glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
@@ -133,6 +149,10 @@
// crbug.com/434094
#if !defined(OS_MACOSX)
TEST_P(GLClearFramebufferTest, ClearColorWithScissor) {
+ if (!IsApplicable()) {
+ return;
+ }
+
glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
@@ -153,6 +173,10 @@
#endif
TEST_P(GLClearFramebufferTest, ClearDepthStencil) {
+ if (!IsApplicable()) {
+ return;
+ }
+
const GLuint kStencilRef = 1 << 2;
InitDraw();
SetDrawColor(1.0f, 0.0f, 0.0f, 1.0f);
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698