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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 if (!IsBuiltInVarying(iter->first)) { | 1180 if (!IsBuiltInVarying(iter->first)) { |
1181 ShaderTranslator::VariableMap::const_iterator vertex_iter = | 1181 ShaderTranslator::VariableMap::const_iterator vertex_iter = |
1182 vertex_varyings->find(iter->first); | 1182 vertex_varyings->find(iter->first); |
1183 if (vertex_iter == vertex_varyings->end() || | 1183 if (vertex_iter == vertex_varyings->end() || |
1184 (!vertex_iter->second.static_use && | 1184 (!vertex_iter->second.static_use && |
1185 option == kCountOnlyStaticallyUsed)) | 1185 option == kCountOnlyStaticallyUsed)) |
1186 continue; | 1186 continue; |
1187 } | 1187 } |
1188 | 1188 |
1189 ShVariableInfo var; | 1189 ShVariableInfo var; |
1190 #if (ANGLE_SH_VERSION >= 126) | |
1191 var.type = static_cast<sh::GLenum>(iter->second.type); | 1190 var.type = static_cast<sh::GLenum>(iter->second.type); |
1192 #else | |
1193 var.type = static_cast<ShDataType>(iter->second.type); | |
1194 #endif | |
1195 var.size = iter->second.size; | 1191 var.size = iter->second.size; |
1196 combined_map[iter->first] = var; | 1192 combined_map[iter->first] = var; |
1197 } | 1193 } |
1198 | 1194 |
1199 if (combined_map.size() == 0) | 1195 if (combined_map.size() == 0) |
1200 return true; | 1196 return true; |
1201 scoped_ptr<ShVariableInfo[]> variables( | 1197 scoped_ptr<ShVariableInfo[]> variables( |
1202 new ShVariableInfo[combined_map.size()]); | 1198 new ShVariableInfo[combined_map.size()]); |
1203 size_t index = 0; | 1199 size_t index = 0; |
1204 for (std::map<std::string, ShVariableInfo>::const_iterator iter = | 1200 for (std::map<std::string, ShVariableInfo>::const_iterator iter = |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 DCHECK(program); | 1424 DCHECK(program); |
1429 program->ClearUniforms(&zero_); | 1425 program->ClearUniforms(&zero_); |
1430 } | 1426 } |
1431 | 1427 |
1432 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { | 1428 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { |
1433 return index + element * 0x10000; | 1429 return index + element * 0x10000; |
1434 } | 1430 } |
1435 | 1431 |
1436 } // namespace gles2 | 1432 } // namespace gles2 |
1437 } // namespace gpu | 1433 } // namespace gpu |
OLD | NEW |