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

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

Issue 2863773002: Don't expose EXT_color_buffer_half_float to GL 2.x (Closed)
Patch Set: Add ES check Created 3 years, 7 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/command_buffer/service/test_helper.cc » ('j') | 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..1ddb033789c3a15bedfb1b0dd9f1510c9ded1596 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1506,8 +1506,10 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
}
enable_ext_color_buffer_float = full_float_support;
}
- // Likewise for EXT_color_buffer_half_float on ES2 contexts.
- if (IsWebGL1OrES2Context() && !enable_ext_color_buffer_half_float) {
+ // Likewise for EXT_color_buffer_half_float on ES2 contexts. On desktop,
+ // require at least GL 3.0, to ensure that all formats are defined.
+ if (IsWebGL1OrES2Context() && !enable_ext_color_buffer_half_float &&
+ (gl_version_info_->is_es || gl_version_info_->IsAtLeastGL(3, 0))) {
bool full_half_float_support = true;
GLenum internal_formats[] = {
GL_R16F, GL_RG16F, GL_RGBA16F,
« no previous file with comments | « no previous file | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698