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

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 2862693002: Add more precise DCHECKs to float feature info (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 14be4fd1628f63a875ec6bf458fbeed63d6f0531..c2eaf0188ec38e43c79ecd80f9441dd9d867f309 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1378,6 +1378,9 @@ void FeatureInfo::InitializeFeatures() {
void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
const StringSet& extensions) {
+ // No errors should be present before running this function.
+ DCHECK_EQ(glGetError(), static_cast<GLuint>(GL_NO_ERROR));
+
// Check if we should allow GL_OES_texture_float, GL_OES_texture_half_float,
// GL_OES_texture_float_linear, GL_OES_texture_half_float_linear
bool enable_texture_float = false;
@@ -1503,6 +1506,9 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
formats[i], GL_FLOAT, NULL);
full_float_support &= glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) ==
GL_FRAMEBUFFER_COMPLETE;
+ DCHECK_EQ(glGetError(), static_cast<GLuint>(GL_NO_ERROR))
+ << " with internal format " << internal_formats[i] << " and format "
+ << formats[i] << ".";
}
enable_ext_color_buffer_float = full_float_support;
}
@@ -1527,6 +1533,9 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
full_half_float_support &=
glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) ==
GL_FRAMEBUFFER_COMPLETE;
+ DCHECK_EQ(glGetError(), static_cast<GLuint>(GL_NO_ERROR))
+ << " with internal format " << internal_formats[i] << " and format "
+ << formats[i] << ".";
}
enable_ext_color_buffer_half_float = full_half_float_support;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698