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

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

Issue 10812002: Bug fixes for getTranslatedShader (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: last fixes Created 8 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 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/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 attached_shaders_[1], 482 attached_shaders_[1],
483 &bind_attrib_location_map_); 483 &bind_attrib_location_map_);
484 link = success != ProgramCache::PROGRAM_LOAD_SUCCESS; 484 link = success != ProgramCache::PROGRAM_LOAD_SUCCESS;
485 } 485 }
486 486
487 if (link) { 487 if (link) {
488 // compile our shaders if they're pending 488 // compile our shaders if they're pending
489 const int kShaders = ProgramManager::ProgramInfo::kMaxAttachedShaders; 489 const int kShaders = ProgramManager::ProgramInfo::kMaxAttachedShaders;
490 for (int i = 0; i < kShaders; ++i) { 490 for (int i = 0; i < kShaders; ++i) {
491 ShaderManager::ShaderInfo* info = attached_shaders_[i].get(); 491 ShaderManager::ShaderInfo* info = attached_shaders_[i].get();
492 if (!info->source_compiled()) { 492 if (info->compilation_status() ==
493 ShaderManager::ShaderInfo::PENDING_DEFERRED_COMPILE) {
493 ShaderTranslator* translator = ShaderIndexToTranslator( 494 ShaderTranslator* translator = ShaderIndexToTranslator(
494 i, 495 i,
495 vertex_translator, 496 vertex_translator,
496 fragment_translator); 497 fragment_translator);
497 manager_->ForceCompileShader(info->deferred_compilation_source(), 498 manager_->ForceCompileShader(info->deferred_compilation_source(),
498 attached_shaders_[i], 499 attached_shaders_[i],
499 translator, 500 translator,
500 feature_info); 501 feature_info);
501 CHECK(info->IsValid()); 502 CHECK(info->IsValid());
502 } 503 }
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 } 1116 }
1116 1117
1117 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1118 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1118 return index + element * 0x10000; 1119 return index + element * 0x10000;
1119 } 1120 }
1120 1121
1121 } // namespace gles2 1122 } // namespace gles2
1122 } // namespace gpu 1123 } // namespace gpu
1123 1124
1124 1125
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.h ('k') | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698