Chromium Code Reviews

Unified Diff: gpu/command_buffer/service/program_manager.cc

Issue 1750015: glGetProgramiv was returning incorrect values for GL_ACTIVE_UNIFORM_MAX_LENGT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.cc
===================================================================
--- gpu/command_buffer/service/program_manager.cc (revision 45593)
+++ gpu/command_buffer/service/program_manager.cc (working copy)
@@ -213,13 +213,15 @@
*params = attrib_infos_.size();
break;
case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH:
- *params = max_attrib_name_length_;
+ // Notice +1 to accomodate NULL terminator.
+ *params = max_attrib_name_length_ + 1;
break;
case GL_ACTIVE_UNIFORMS:
*params = uniform_infos_.size();
break;
case GL_ACTIVE_UNIFORM_MAX_LENGTH:
- *params = max_uniform_name_length_;
+ // Notice +1 to accomodate NULL terminator.
+ *params = max_uniform_name_length_ + 1;
break;
default:
glGetProgramiv(program_id_, pname, params);
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine