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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 Shader* shader = attached_shaders_[ii].get(); | 834 Shader* shader = attached_shaders_[ii].get(); |
835 if (!shader) | 835 if (!shader) |
836 continue; | 836 continue; |
837 const sh::ShaderVariable* info = NULL; | 837 const sh::ShaderVariable* info = NULL; |
838 const sh::Uniform* uniform = shader->GetUniformInfo(name); | 838 const sh::Uniform* uniform = shader->GetUniformInfo(name); |
839 bool found = false; | 839 bool found = false; |
840 if (uniform) | 840 if (uniform) |
841 found = uniform->findInfoByMappedName(name, &info, original_name); | 841 found = uniform->findInfoByMappedName(name, &info, original_name); |
842 if (found) { | 842 if (found) { |
843 const std::string kArraySpec("[0]"); | 843 const std::string kArraySpec("[0]"); |
844 if (info->arraySize > 0 && !base::EndsWith(name, kArraySpec, true)) { | 844 if (info->arraySize > 0 && |
| 845 !base::EndsWith(name, kArraySpec, base::CompareCase::SENSITIVE)) { |
845 *corrected_name = name + kArraySpec; | 846 *corrected_name = name + kArraySpec; |
846 *original_name += kArraySpec; | 847 *original_name += kArraySpec; |
847 } else { | 848 } else { |
848 *corrected_name = name; | 849 *corrected_name = name; |
849 } | 850 } |
850 *type = info->type; | 851 *type = info->type; |
851 *size = std::max(1u, info->arraySize); | 852 *size = std::max(1u, info->arraySize); |
852 return; | 853 return; |
853 } | 854 } |
854 } | 855 } |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 DCHECK(program); | 1823 DCHECK(program); |
1823 program->ClearUniforms(&zero_); | 1824 program->ClearUniforms(&zero_); |
1824 } | 1825 } |
1825 | 1826 |
1826 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { | 1827 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { |
1827 return index + element * 0x10000; | 1828 return index + element * 0x10000; |
1828 } | 1829 } |
1829 | 1830 |
1830 } // namespace gles2 | 1831 } // namespace gles2 |
1831 } // namespace gpu | 1832 } // namespace gpu |
OLD | NEW |