| 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 // Tests for GLES2Implementation. | 5 // Tests for GLES2Implementation. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2899 &expected_gen_cmds, commands_, sizeof(expected_gen_cmds))); | 2899 &expected_gen_cmds, commands_, sizeof(expected_gen_cmds))); |
| 2900 GLuint id1 = ids[0]; | 2900 GLuint id1 = ids[0]; |
| 2901 GLuint id2 = ids[1]; | 2901 GLuint id2 = ids[1]; |
| 2902 ClearCommands(); | 2902 ClearCommands(); |
| 2903 | 2903 |
| 2904 // Test BeginQueryEXT fails if id = 0. | 2904 // Test BeginQueryEXT fails if id = 0. |
| 2905 gl_->BeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, 0); | 2905 gl_->BeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, 0); |
| 2906 EXPECT_TRUE(NoCommandsWritten()); | 2906 EXPECT_TRUE(NoCommandsWritten()); |
| 2907 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); | 2907 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); |
| 2908 | 2908 |
| 2909 // Test BeginQueryEXT fails if id not GENed. | |
| 2910 // TODO(gman): | |
| 2911 | |
| 2912 // Test BeginQueryEXT inserts command. | 2909 // Test BeginQueryEXT inserts command. |
| 2913 struct BeginCmds { | 2910 struct BeginCmds { |
| 2914 cmds::BeginQueryEXT begin_query; | 2911 cmds::BeginQueryEXT begin_query; |
| 2915 }; | 2912 }; |
| 2916 BeginCmds expected_begin_cmds; | 2913 BeginCmds expected_begin_cmds; |
| 2917 const void* commands = GetPut(); | 2914 const void* commands = GetPut(); |
| 2918 gl_->BeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, id1); | 2915 gl_->BeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, id1); |
| 2919 QueryTracker::Query* query = GetQuery(id1); | 2916 QueryTracker::Query* query = GetQuery(id1); |
| 2920 ASSERT_TRUE(query != NULL); | 2917 ASSERT_TRUE(query != NULL); |
| 2921 expected_begin_cmds.begin_query.Init( | 2918 expected_begin_cmds.begin_query.Init( |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3182 ContextInitOptions init_options; | 3179 ContextInitOptions init_options; |
| 3183 init_options.bind_generates_resource_client = true; | 3180 init_options.bind_generates_resource_client = true; |
| 3184 init_options.bind_generates_resource_service = false; | 3181 init_options.bind_generates_resource_service = false; |
| 3185 EXPECT_FALSE(Initialize(init_options)); | 3182 EXPECT_FALSE(Initialize(init_options)); |
| 3186 } | 3183 } |
| 3187 | 3184 |
| 3188 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 3185 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 3189 | 3186 |
| 3190 } // namespace gles2 | 3187 } // namespace gles2 |
| 3191 } // namespace gpu | 3188 } // namespace gpu |
| OLD | NEW |