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

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

Issue 2250803002: Work around MacOSX driver bug related with glGetFragDataLocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.cc
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index b00a6cefa84fdf50a7e10b2deba4fc2b65a3699b..a14a986cdbbd28c1f727df4fc24a31040537b2e8 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -1027,6 +1027,19 @@ void Program::UpdateProgramOutputs() {
continue;
program_output_infos_.push_back(
ProgramOutputInfo(color_name, index, client_name));
+ } else if (feature_info().workarounds().get_frag_data_info_bug) {
+ DCHECK(!feature_info().feature_flags().ext_blend_func_extended);
+ GLint color_name =
+ glGetFragDataLocation(service_id_, service_name.c_str());
+ if (color_name >= 0) {
+ GLint index = 0;
+ for (size_t ii = 0; ii < output_var.arraySize; ++ii) {
+ std::string array_spec(
+ std::string("[") + base::IntToString(ii) + "]");
+ program_output_infos_.push_back(ProgramOutputInfo(
+ color_name + ii, index, client_name + array_spec));
+ }
+ }
} else {
for (size_t ii = 0; ii < output_var.arraySize; ++ii) {
std::string array_spec(std::string("[") + base::IntToString(ii) + "]");
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698