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

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

Issue 783543003: Update from https://crrev.com/306901 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « gpu/GLES2/OWNERS ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/shader_translator.cc
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index f719f7d99760a825b37ae1188e0e40d316c3021b..576c7c8df5b93b44785bfa5e03d67f1f2b11ca44 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -9,10 +9,12 @@
#include <algorithm>
#include "base/at_exit.h"
+#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
+#include "ui/gl/gl_switches.h"
namespace gpu {
namespace gles2 {
@@ -133,6 +135,10 @@ int ShaderTranslator::GetCompileOptions() const {
SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH |
SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGLShaderIntermOutput))
+ compile_options |= SH_INTERMEDIATE_TREE;
+
compile_options |= driver_bug_workarounds_;
return compile_options;
« no previous file with comments | « gpu/GLES2/OWNERS ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698