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

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

Issue 224233003: Move vertex and fragment shader uniform vector workarounds to gpu driver bug list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting.. Created 6 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 | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index fb97dafa506fbafe1e5338f8e66913beca93ccfd..ba0437bfd4e389158b767c2c1398b41c33eb4d55 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -223,18 +223,24 @@ bool ContextGroup::Initialize(
return false;
}
- // TODO(gman): Use workarounds similar to max_texture_size above to implement.
- if (gfx::GetGLImplementation() == gfx::kGLImplementationOSMesaGL) {
- // Some shaders in Skia needed more than the min.
- max_fragment_uniform_vectors_ =
- std::min(static_cast<uint32>(kMinFragmentUniformVectors * 2),
- max_fragment_uniform_vectors_);
- max_varying_vectors_ =
- std::min(static_cast<uint32>(kMinVaryingVectors * 2),
- max_varying_vectors_);
+ // Some shaders in Skia need more than the min available vertex and
+ // fragment shader uniform vectors in case of OSMesa GL Implementation
+ if (feature_info_->workarounds().max_fragment_uniform_vectors) {
+ max_fragment_uniform_vectors_ = std::min(
+ max_fragment_uniform_vectors_,
+ static_cast<uint32>(
+ feature_info_->workarounds().max_fragment_uniform_vectors));
+ }
+ if (feature_info_->workarounds().max_varying_vectors) {
+ max_varying_vectors_ = std::min(
+ max_varying_vectors_,
+ static_cast<uint32>(feature_info_->workarounds().max_varying_vectors));
+ }
+ if (feature_info_->workarounds().max_vertex_uniform_vectors) {
max_vertex_uniform_vectors_ =
- std::min(static_cast<uint32>(kMinVertexUniformVectors * 2),
- max_vertex_uniform_vectors_);
+ std::min(max_vertex_uniform_vectors_,
+ static_cast<uint32>(
+ feature_info_->workarounds().max_vertex_uniform_vectors));
}
program_manager_.reset(new ProgramManager(
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698