| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 size_t client_location = client_location_indices[i]; | 823 size_t client_location = client_location_indices[i]; |
| 824 // Before linking, we already validated that no two statically used fragment | 824 // Before linking, we already validated that no two statically used fragment |
| 825 // inputs are bound to the same location. | 825 // inputs are bound to the same location. |
| 826 DCHECK(!fragment_input_locations_[client_location].IsActive()); | 826 DCHECK(!fragment_input_locations_[client_location].IsActive()); |
| 827 fragment_input_locations_[client_location].SetActive( | 827 fragment_input_locations_[client_location].SetActive( |
| 828 &fragment_input_infos_[i]); | 828 &fragment_input_infos_[i]); |
| 829 } | 829 } |
| 830 } | 830 } |
| 831 | 831 |
| 832 void Program::UpdateProgramOutputs() { | 832 void Program::UpdateProgramOutputs() { |
| 833 if (!feature_info().gl_version_info().IsES3Capable() || | 833 if (!feature_info().gl_version_info().is_es3_capable || |
| 834 feature_info().disable_shader_translator()) | 834 feature_info().disable_shader_translator()) |
| 835 return; | 835 return; |
| 836 | 836 |
| 837 Shader* fragment_shader = | 837 Shader* fragment_shader = |
| 838 attached_shaders_[ShaderTypeToIndex(GL_FRAGMENT_SHADER)].get(); | 838 attached_shaders_[ShaderTypeToIndex(GL_FRAGMENT_SHADER)].get(); |
| 839 | 839 |
| 840 for (auto const& output_var : fragment_shader->output_variable_list()) { | 840 for (auto const& output_var : fragment_shader->output_variable_list()) { |
| 841 const std::string& service_name = output_var.mappedName; | 841 const std::string& service_name = output_var.mappedName; |
| 842 // A fragment shader can have gl_FragColor, gl_SecondaryFragColor, etc | 842 // A fragment shader can have gl_FragColor, gl_SecondaryFragColor, etc |
| 843 // built-ins as its output, as well as custom varyings. We are interested | 843 // built-ins as its output, as well as custom varyings. We are interested |
| (...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 DCHECK(program); | 2367 DCHECK(program); |
| 2368 program->ClearUniforms(&zero_); | 2368 program->ClearUniforms(&zero_); |
| 2369 } | 2369 } |
| 2370 | 2370 |
| 2371 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { | 2371 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { |
| 2372 return index + element * 0x10000; | 2372 return index + element * 0x10000; |
| 2373 } | 2373 } |
| 2374 | 2374 |
| 2375 } // namespace gles2 | 2375 } // namespace gles2 |
| 2376 } // namespace gpu | 2376 } // namespace gpu |
| OLD | NEW |