Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 << ", name = " << info.name; | 686 << ", name = " << info.name; |
| 687 } | 687 } |
| 688 } | 688 } |
| 689 | 689 |
| 690 UpdateFragmentInputs(); | 690 UpdateFragmentInputs(); |
| 691 UpdateProgramOutputs(); | 691 UpdateProgramOutputs(); |
| 692 UpdateFragmentOutputBaseTypes(); | 692 UpdateFragmentOutputBaseTypes(); |
| 693 UpdateVertexInputBaseTypes(); | 693 UpdateVertexInputBaseTypes(); |
| 694 UpdateUniformBlockSizeInfo(); | 694 UpdateUniformBlockSizeInfo(); |
| 695 | 695 |
| 696 effective_transform_feedback_buffer_mode_ = transform_feedback_buffer_mode_; | |
| 697 effective_transform_feedback_varyings_ = transform_feedback_varyings_; | |
|
Zhenyao Mo
2016/10/07 21:05:36
This behavior will also be tested in the webgl2 co
| |
| 698 | |
| 696 valid_ = true; | 699 valid_ = true; |
| 697 } | 700 } |
| 698 | 701 |
| 699 void Program::UpdateUniforms() { | 702 void Program::UpdateUniforms() { |
| 700 // Reserve each client-bound uniform location. This way unbound uniforms will | 703 // Reserve each client-bound uniform location. This way unbound uniforms will |
| 701 // not be allocated to locations that user expects bound uniforms to be, even | 704 // not be allocated to locations that user expects bound uniforms to be, even |
| 702 // if the expected uniforms are optimized away by the driver. | 705 // if the expected uniforms are optimized away by the driver. |
| 703 for (const auto& binding : bind_uniform_location_map_) { | 706 for (const auto& binding : bind_uniform_location_map_) { |
| 704 if (binding.second < 0) | 707 if (binding.second < 0) |
| 705 continue; | 708 continue; |
| (...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2578 DCHECK(program); | 2581 DCHECK(program); |
| 2579 program->ClearUniforms(&zero_); | 2582 program->ClearUniforms(&zero_); |
| 2580 } | 2583 } |
| 2581 | 2584 |
| 2582 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { | 2585 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { |
| 2583 return index + element * 0x10000; | 2586 return index + element * 0x10000; |
| 2584 } | 2587 } |
| 2585 | 2588 |
| 2586 } // namespace gles2 | 2589 } // namespace gles2 |
| 2587 } // namespace gpu | 2590 } // namespace gpu |
| OLD | NEW |