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

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

Issue 1309743005: command_buffer: Implement EXT_blend_func_extended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: rebase Created 5 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
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 92c7f9d39085b39d59ca31be572a54a02dec265d..255caffc691d95efea9cb22c4cae85d0991ea263 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -71,6 +71,11 @@ void GetVaryings(ShHandle compiler, VaryingMap* var_map) {
(*var_map)[(*varyings)[ii].mappedName] = (*varyings)[ii];
}
}
+void GetOutputVariables(ShHandle compiler, OutputVariableList* var_list) {
+ if (!var_list)
+ return;
+ *var_list = *ShGetOutputVariables(compiler);
+}
void GetInterfaceBlocks(ShHandle compiler, InterfaceBlockMap* var_map) {
if (!var_map)
@@ -206,6 +211,7 @@ bool ShaderTranslator::Translate(const std::string& shader_source,
UniformMap* uniform_map,
VaryingMap* varying_map,
InterfaceBlockMap* interface_block_map,
+ OutputVariableList* output_variable_list,
NameMap* name_map) const {
// Make sure this instance is initialized.
DCHECK(compiler_ != NULL);
@@ -224,11 +230,12 @@ bool ShaderTranslator::Translate(const std::string& shader_source,
}
// Get shader version.
*shader_version = ShGetShaderVersion(compiler_);
- // Get info for attribs, uniforms, and varyings.
+ // Get info for attribs, uniforms, varyings and output variables.
GetAttributes(compiler_, attrib_map);
GetUniforms(compiler_, uniform_map);
GetVaryings(compiler_, varying_map);
GetInterfaceBlocks(compiler_, interface_block_map);
+ GetOutputVariables(compiler_, output_variable_list);
// Get info for name hashing.
GetNameHashingInfo(compiler_, name_map);
}
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | gpu/command_buffer/service/shader_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698