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

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: Created 8 years, 5 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 link = false; 489 link = false;
490 break; 490 break;
491 } 491 }
492 } 492 }
493 // no break 493 // no break
494 case ProgramCache::LINK_UNKNOWN: { 494 case ProgramCache::LINK_UNKNOWN: {
495 // compile our shaders + attach 495 // compile our shaders + attach
496 const int kShaders = ProgramManager::ProgramInfo::kMaxAttachedShaders; 496 const int kShaders = ProgramManager::ProgramInfo::kMaxAttachedShaders;
497 for (int i = 0; i < kShaders; ++i) { 497 for (int i = 0; i < kShaders; ++i) {
498 ShaderManager::ShaderInfo* info = attached_shaders_[i].get(); 498 ShaderManager::ShaderInfo* info = attached_shaders_[i].get();
499 if (!info->source_compiled()) { 499 if (info->compilation_status() ==
500 ShaderManager::ShaderInfo::PENDING_DEFERRED_COMPILE) {
500 ShaderTranslator* translator = ShaderIndexToTranslator( 501 ShaderTranslator* translator = ShaderIndexToTranslator(
501 i, 502 i,
502 vertex_translator, 503 vertex_translator,
503 fragment_translator); 504 fragment_translator);
504 manager_->ForceCompileShader(info->deferred_compilation_source(), 505 manager_->ForceCompileShader(info->deferred_compilation_source(),
505 attached_shaders_[i], 506 attached_shaders_[i],
506 translator, 507 translator,
507 feature_info); 508 feature_info);
508 CHECK(info->IsValid()); 509 CHECK(info->IsValid());
509 } 510 }
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1123 }
1123 1124
1124 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1125 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1125 return index + element * 0x10000; 1126 return index + element * 0x10000;
1126 } 1127 }
1127 1128
1128 } // namespace gles2 1129 } // namespace gles2
1129 } // namespace gpu 1130 } // namespace gpu
1130 1131
1131 1132
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698