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

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: 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..e7c85f9e3e2c63c6b67922afc3750165b94f069d 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1506,8 +1506,11 @@ 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 (ES
+ // queries the extension directly).
+ if (IsWebGL1OrES2Context() && !enable_ext_color_buffer_half_float &&
+ gl_version_info_->IsAtLeastGL(3, 0)) {
Zhenyao Mo 2017/05/04 22:07:23 Sorry, just realized this. gl_version_info_->IsAt
ccameron 2017/05/04 22:18:27 I think there is an implicit gl_version_info_->is_
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