| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |