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

Side by Side Diff: gpu/command_buffer/service/program_manager_unittest.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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/scoped_ptr.h" 6 #include "base/scoped_ptr.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "gpu/command_buffer/service/gl_mock.h" 9 #include "gpu/command_buffer/service/gl_mock.h"
10 10
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 ASSERT_TRUE(program_info != NULL); 409 ASSERT_TRUE(program_info != NULL);
410 program_info->Update(); 410 program_info->Update();
411 GLint value = 0; 411 GLint value = 0;
412 program_info->GetProgramiv(GL_ACTIVE_ATTRIBUTES, &value); 412 program_info->GetProgramiv(GL_ACTIVE_ATTRIBUTES, &value);
413 EXPECT_EQ(3, value); 413 EXPECT_EQ(3, value);
414 // Check that we skipped the "gl_" uniform. 414 // Check that we skipped the "gl_" uniform.
415 program_info->GetProgramiv(GL_ACTIVE_UNIFORMS, &value); 415 program_info->GetProgramiv(GL_ACTIVE_UNIFORMS, &value);
416 EXPECT_EQ(2, value); 416 EXPECT_EQ(2, value);
417 // Check that our max length adds room for the array spec and is not as long 417 // Check that our max length adds room for the array spec and is not as long
418 // as the "gl_" uniform we skipped. 418 // as the "gl_" uniform we skipped.
419 // +4u is to account for "gl_" and NULL terminator.
419 program_info->GetProgramiv(GL_ACTIVE_UNIFORM_MAX_LENGTH, &value); 420 program_info->GetProgramiv(GL_ACTIVE_UNIFORM_MAX_LENGTH, &value);
420 EXPECT_EQ(strlen(kUniform3Name) + 3u, static_cast<size_t>(value)); 421 EXPECT_EQ(strlen(kUniform3Name) + 4u, static_cast<size_t>(value));
421 } 422 }
422 423
423 } // namespace gles2 424 } // namespace gles2
424 } // namespace gpu 425 } // namespace gpu
425 426
426 427
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698