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

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

Issue 1831833006: Turn on seamless cubemap by default on Desktop GL for ES3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 7ecd8d5f47bf07b2f1410eb945e5d1295423c7b6..0f24ab9d40f4670793f8bd9fe9274267ff873f30 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2742,6 +2742,13 @@ bool GLES2DecoderImpl::Initialize(const scoped_refptr<gfx::GLSurface>& surface,
frag_depth_explicitly_enabled_ = true;
draw_buffers_explicitly_enabled_ = true;
// TODO(zmo): Look into shader_texture_lod_explicitly_enabled_ situation.
+
+ // TEXTURE_CUBE_MAP_SEAMLESS is available on Desktop GL 3.2 or above.
+ // ES3 requires it to be always supported.
+ // We don't support ES3 on Desktop GL lower than 3.2.
+ if (!feature_info_->gl_version_info().BehavesLikeGLES()) {
+ glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+ }
piman 2016/03/25 17:01:04 Can you remove this? The code below will take care
Zhenyao Mo 2016/03/25 17:17:29 Ah, nasty. I thought I deleted already.
}
state_.attrib_values.resize(group_->max_vertex_attribs());
@@ -3018,6 +3025,15 @@ bool GLES2DecoderImpl::Initialize(const scoped_refptr<gfx::GLSurface>& surface,
glEnable(GL_PROGRAM_POINT_SIZE);
}
+ // ES3 requires seamless cubemap. ES2 does not.
+ // However, when ES2 is implemented on top of DX11, seamless cubemap is
+ // always enabled and there is no way to disable it.
+ // Therefore, it seems OK to also always enable it on top of Desktop GL for
+ // both ES2 and ES3 contexts.
+ if (feature_info_->gl_version_info().IsAtLeastGL(3, 2)) {
+ glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+ }
+
has_robustness_extension_ =
context->HasExtension("GL_ARB_robustness") ||
context->HasExtension("GL_KHR_robustness") ||
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698