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

Side by Side Diff: gpu/command_buffer/service/shader_translator.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/shader_translator.h" 5 #include "gpu/command_buffer/service/shader_translator.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 driver_bug_workarounds_ = driver_bug_workarounds; 128 driver_bug_workarounds_ = driver_bug_workarounds;
129 return compiler_ != NULL; 129 return compiler_ != NULL;
130 } 130 }
131 131
132 int ShaderTranslator::GetCompileOptions() const { 132 int ShaderTranslator::GetCompileOptions() const {
133 int compile_options = 133 int compile_options =
134 SH_OBJECT_CODE | SH_VARIABLES | SH_ENFORCE_PACKING_RESTRICTIONS | 134 SH_OBJECT_CODE | SH_VARIABLES | SH_ENFORCE_PACKING_RESTRICTIONS |
135 SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH | 135 SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH |
136 SH_CLAMP_INDIRECT_ARRAY_BOUNDS; 136 SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
137 137
138 if (CommandLine::ForCurrentProcess()->HasSwitch( 138 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
139 switches::kGLShaderIntermOutput)) 139 switches::kGLShaderIntermOutput))
140 compile_options |= SH_INTERMEDIATE_TREE; 140 compile_options |= SH_INTERMEDIATE_TREE;
141 141
142 compile_options |= driver_bug_workarounds_; 142 compile_options |= driver_bug_workarounds_;
143 143
144 return compile_options; 144 return compile_options;
145 } 145 }
146 146
147 bool ShaderTranslator::Translate(const std::string& shader_source, 147 bool ShaderTranslator::Translate(const std::string& shader_source,
148 std::string* info_log, 148 std::string* info_log,
149 std::string* translated_source, 149 std::string* translated_source,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 destruction_observers_, 205 destruction_observers_,
206 OnDestruct(this)); 206 OnDestruct(this));
207 207
208 if (compiler_ != NULL) 208 if (compiler_ != NULL)
209 ShDestruct(compiler_); 209 ShDestruct(compiler_);
210 } 210 }
211 211
212 } // namespace gles2 212 } // namespace gles2
213 } // namespace gpu 213 } // namespace gpu
214 214
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/valuebuffer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698