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

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

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } 555 }
556 if (!CheckVaryingsPacking(varyings_packing_option)) { 556 if (!CheckVaryingsPacking(varyings_packing_option)) {
557 set_log_info("Varyings over maximum register limit"); 557 set_log_info("Varyings over maximum register limit");
558 return false; 558 return false;
559 } 559 }
560 560
561 TimeTicks before_time = TimeTicks::Now(); 561 TimeTicks before_time = TimeTicks::Now();
562 bool link = true; 562 bool link = true;
563 ProgramCache* cache = manager_->program_cache_; 563 ProgramCache* cache = manager_->program_cache_;
564 if (cache) { 564 if (cache) {
565 DCHECK(!attached_shaders_[0]->signature_source().empty() && 565 DCHECK(!attached_shaders_[0]->last_compiled_source().empty() &&
566 !attached_shaders_[1]->signature_source().empty()); 566 !attached_shaders_[1]->last_compiled_source().empty());
567 ProgramCache::LinkedProgramStatus status = cache->GetLinkedProgramStatus( 567 ProgramCache::LinkedProgramStatus status = cache->GetLinkedProgramStatus(
568 attached_shaders_[0]->signature_source(), 568 attached_shaders_[0]->last_compiled_source(),
569 vertex_translator, 569 vertex_translator,
570 attached_shaders_[1]->signature_source(), 570 attached_shaders_[1]->last_compiled_source(),
571 fragment_translator, 571 fragment_translator,
572 &bind_attrib_location_map_); 572 &bind_attrib_location_map_);
573 573
574 if (status == ProgramCache::LINK_SUCCEEDED) { 574 if (status == ProgramCache::LINK_SUCCEEDED) {
575 ProgramCache::ProgramLoadResult success = 575 ProgramCache::ProgramLoadResult success =
576 cache->LoadLinkedProgram(service_id(), 576 cache->LoadLinkedProgram(service_id(),
577 attached_shaders_[0].get(), 577 attached_shaders_[0].get(),
578 vertex_translator, 578 vertex_translator,
579 attached_shaders_[1].get(), 579 attached_shaders_[1].get(),
580 fragment_translator, 580 fragment_translator,
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 DCHECK(program); 1550 DCHECK(program);
1551 program->ClearUniforms(&zero_); 1551 program->ClearUniforms(&zero_);
1552 } 1552 }
1553 1553
1554 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1554 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1555 return index + element * 0x10000; 1555 return index + element * 0x10000;
1556 } 1556 }
1557 1557
1558 } // namespace gles2 1558 } // namespace gles2
1559 } // namespace gpu 1559 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/memory_program_cache_unittest.cc ('k') | gpu/command_buffer/service/shader_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698