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

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

Issue 619723008: Switch to use ANGLE's new APIs to query shader variables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 GLenum type; 72 GLenum type;
73 uint32 accepts_api_type; 73 uint32 accepts_api_type;
74 GLint fake_location_base; 74 GLint fake_location_base;
75 bool is_array; 75 bool is_array;
76 std::string name; 76 std::string name;
77 std::vector<GLint> element_locations; 77 std::vector<GLint> element_locations;
78 std::vector<GLuint> texture_units; 78 std::vector<GLuint> texture_units;
79 }; 79 };
80 struct VertexAttrib { 80 struct VertexAttrib {
81 VertexAttrib(GLsizei _size, GLenum _type, const std::string& _name, 81 VertexAttrib(GLsizei _size, GLenum _type, const std::string& _name,
82 GLint _location) 82 GLint _location)
83 : size(_size), 83 : size(_size),
84 type(_type), 84 type(_type),
85 location(_location), 85 location(_location),
86 name(_name) { 86 name(_name) {
87 } 87 }
88 GLsizei size; 88 GLsizei size;
89 GLenum type; 89 GLenum type;
90 GLint location; 90 GLint location;
91 std::string name; 91 std::string name;
92 }; 92 };
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // glBindAttribLocation() again with the mapped names. 274 // glBindAttribLocation() again with the mapped names.
275 // This is called right before the glLink() call, but after shaders are 275 // This is called right before the glLink() call, but after shaders are
276 // translated. 276 // translated.
277 void ExecuteBindAttribLocationCalls(); 277 void ExecuteBindAttribLocationCalls();
278 278
279 bool AddUniformInfo( 279 bool AddUniformInfo(
280 GLsizei size, GLenum type, GLint location, GLint fake_base_location, 280 GLsizei size, GLenum type, GLint location, GLint fake_base_location,
281 const std::string& name, const std::string& original_name, 281 const std::string& name, const std::string& original_name,
282 size_t* next_available_index); 282 size_t* next_available_index);
283 283
284 void GetCorrectedVariableInfo( 284 void GetCorrectedUniformData(
Ken Russell (switch to Gerrit) 2014/10/07 03:35:26 "Corrected" how? Could you please describe in more
Zhenyao Mo 2014/10/07 18:23:41 Done.
285 bool use_uniforms, const std::string& name, std::string* corrected_name, 285 const std::string& name,
286 std::string* original_name, GLsizei* size, GLenum* type) const; 286 std::string* corrected_name, std::string* original_name,
287 GLsizei* size, GLenum* type) const;
288
289 void GetCorrectedVertexAttrib(
290 const std::string& name, std::string* original_name, GLenum* type) const;
287 291
288 void DetachShaders(ShaderManager* manager); 292 void DetachShaders(ShaderManager* manager);
289 293
290 static inline GLint GetUniformInfoIndexFromFakeLocation( 294 static inline GLint GetUniformInfoIndexFromFakeLocation(
291 GLint fake_location) { 295 GLint fake_location) {
292 return fake_location & 0xFFFF; 296 return fake_location & 0xFFFF;
293 } 297 }
294 298
295 static inline GLint GetArrayElementIndexFromFakeLocation( 299 static inline GLint GetArrayElementIndexFromFakeLocation(
296 GLint fake_location) { 300 GLint fake_location) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 430
427 uint32 max_varying_vectors_; 431 uint32 max_varying_vectors_;
428 432
429 DISALLOW_COPY_AND_ASSIGN(ProgramManager); 433 DISALLOW_COPY_AND_ASSIGN(ProgramManager);
430 }; 434 };
431 435
432 } // namespace gles2 436 } // namespace gles2
433 } // namespace gpu 437 } // namespace gpu
434 438
435 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 439 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698