| 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 // This file is auto-generated from | 5 // This file is auto-generated from |
| 6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
| 7 // DO NOT EDIT! | 7 // DO NOT EDIT! |
| 8 | 8 |
| 9 // This file contains unit tests for gles2 commmands | 9 // This file contains unit tests for gles2 commmands |
| 10 // It is included by gles2_cmd_format_test.cc | 10 // It is included by gles2_cmd_format_test.cc |
| (...skipping 3402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3413 static_cast<GLuint>(12)); | 3413 static_cast<GLuint>(12)); |
| 3414 EXPECT_EQ(static_cast<uint32>(EndQueryEXT::kCmdId), | 3414 EXPECT_EQ(static_cast<uint32>(EndQueryEXT::kCmdId), |
| 3415 cmd.header.command); | 3415 cmd.header.command); |
| 3416 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3416 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3417 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 3417 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 3418 EXPECT_EQ(static_cast<GLuint>(12), cmd.submit_count); | 3418 EXPECT_EQ(static_cast<GLuint>(12), cmd.submit_count); |
| 3419 CheckBytesWrittenMatchesExpectedSize( | 3419 CheckBytesWrittenMatchesExpectedSize( |
| 3420 next_cmd, sizeof(cmd)); | 3420 next_cmd, sizeof(cmd)); |
| 3421 } | 3421 } |
| 3422 | 3422 |
| 3423 TEST_F(GLES2FormatTest, InsertEventMarkerEXT) { |
| 3424 InsertEventMarkerEXT& cmd = *GetBufferAs<InsertEventMarkerEXT>(); |
| 3425 void* next_cmd = cmd.Set( |
| 3426 &cmd, |
| 3427 static_cast<GLuint>(11)); |
| 3428 EXPECT_EQ(static_cast<uint32>(InsertEventMarkerEXT::kCmdId), |
| 3429 cmd.header.command); |
| 3430 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3431 EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); |
| 3432 CheckBytesWrittenMatchesExpectedSize( |
| 3433 next_cmd, sizeof(cmd)); |
| 3434 } |
| 3435 |
| 3436 TEST_F(GLES2FormatTest, PushGroupMarkerEXT) { |
| 3437 PushGroupMarkerEXT& cmd = *GetBufferAs<PushGroupMarkerEXT>(); |
| 3438 void* next_cmd = cmd.Set( |
| 3439 &cmd, |
| 3440 static_cast<GLuint>(11)); |
| 3441 EXPECT_EQ(static_cast<uint32>(PushGroupMarkerEXT::kCmdId), |
| 3442 cmd.header.command); |
| 3443 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3444 EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); |
| 3445 CheckBytesWrittenMatchesExpectedSize( |
| 3446 next_cmd, sizeof(cmd)); |
| 3447 } |
| 3448 |
| 3449 TEST_F(GLES2FormatTest, PopGroupMarkerEXT) { |
| 3450 PopGroupMarkerEXT& cmd = *GetBufferAs<PopGroupMarkerEXT>(); |
| 3451 void* next_cmd = cmd.Set( |
| 3452 &cmd); |
| 3453 EXPECT_EQ(static_cast<uint32>(PopGroupMarkerEXT::kCmdId), |
| 3454 cmd.header.command); |
| 3455 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3456 CheckBytesWrittenMatchesExpectedSize( |
| 3457 next_cmd, sizeof(cmd)); |
| 3458 } |
| 3459 |
| 3423 TEST_F(GLES2FormatTest, SwapBuffers) { | 3460 TEST_F(GLES2FormatTest, SwapBuffers) { |
| 3424 SwapBuffers& cmd = *GetBufferAs<SwapBuffers>(); | 3461 SwapBuffers& cmd = *GetBufferAs<SwapBuffers>(); |
| 3425 void* next_cmd = cmd.Set( | 3462 void* next_cmd = cmd.Set( |
| 3426 &cmd); | 3463 &cmd); |
| 3427 EXPECT_EQ(static_cast<uint32>(SwapBuffers::kCmdId), | 3464 EXPECT_EQ(static_cast<uint32>(SwapBuffers::kCmdId), |
| 3428 cmd.header.command); | 3465 cmd.header.command); |
| 3429 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3466 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3430 CheckBytesWrittenMatchesExpectedSize( | 3467 CheckBytesWrittenMatchesExpectedSize( |
| 3431 next_cmd, sizeof(cmd)); | 3468 next_cmd, sizeof(cmd)); |
| 3432 } | 3469 } |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4060 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 4097 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 4061 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); | 4098 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); |
| 4062 EXPECT_EQ(static_cast<GLint>(12), cmd.location); | 4099 EXPECT_EQ(static_cast<GLint>(12), cmd.location); |
| 4063 EXPECT_EQ(static_cast<uint32>(13), cmd.name_bucket_id); | 4100 EXPECT_EQ(static_cast<uint32>(13), cmd.name_bucket_id); |
| 4064 CheckBytesWrittenMatchesExpectedSize( | 4101 CheckBytesWrittenMatchesExpectedSize( |
| 4065 next_cmd, sizeof(cmd)); | 4102 next_cmd, sizeof(cmd)); |
| 4066 } | 4103 } |
| 4067 | 4104 |
| 4068 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 4105 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
| 4069 | 4106 |
| OLD | NEW |