OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 3492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3503 &cmd, | 3503 &cmd, |
3504 static_cast<uint32>(11)); | 3504 static_cast<uint32>(11)); |
3505 EXPECT_EQ(static_cast<uint32>(RequestExtensionCHROMIUM::kCmdId), | 3505 EXPECT_EQ(static_cast<uint32>(RequestExtensionCHROMIUM::kCmdId), |
3506 cmd.header.command); | 3506 cmd.header.command); |
3507 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3507 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3508 EXPECT_EQ(static_cast<char*>(next_cmd), | 3508 EXPECT_EQ(static_cast<char*>(next_cmd), |
3509 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3509 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
3510 EXPECT_EQ(static_cast<uint32>(11), cmd.bucket_id); | 3510 EXPECT_EQ(static_cast<uint32>(11), cmd.bucket_id); |
3511 } | 3511 } |
3512 | 3512 |
3513 TEST(GLES2FormatTest, SetLatchCHROMIUM) { | |
3514 SetLatchCHROMIUM cmd = { { 0 } }; | |
3515 void* next_cmd = cmd.Set( | |
3516 &cmd, | |
3517 static_cast<GLuint>(11)); | |
3518 EXPECT_EQ(static_cast<uint32>(SetLatchCHROMIUM::kCmdId), | |
3519 cmd.header.command); | |
3520 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | |
3521 EXPECT_EQ(static_cast<char*>(next_cmd), | |
3522 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | |
3523 EXPECT_EQ(static_cast<GLuint>(11), cmd.latch_id); | |
3524 } | |
3525 | |
3526 TEST(GLES2FormatTest, WaitLatchCHROMIUM) { | |
3527 WaitLatchCHROMIUM cmd = { { 0 } }; | |
3528 void* next_cmd = cmd.Set( | |
3529 &cmd, | |
3530 static_cast<GLuint>(11)); | |
3531 EXPECT_EQ(static_cast<uint32>(WaitLatchCHROMIUM::kCmdId), | |
3532 cmd.header.command); | |
3533 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | |
3534 EXPECT_EQ(static_cast<char*>(next_cmd), | |
3535 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | |
3536 EXPECT_EQ(static_cast<GLuint>(11), cmd.latch_id); | |
3537 } | |
3538 | |
3539 TEST(GLES2FormatTest, SetSurfaceCHROMIUM) { | 3513 TEST(GLES2FormatTest, SetSurfaceCHROMIUM) { |
3540 SetSurfaceCHROMIUM cmd = { { 0 } }; | 3514 SetSurfaceCHROMIUM cmd = { { 0 } }; |
3541 void* next_cmd = cmd.Set( | 3515 void* next_cmd = cmd.Set( |
3542 &cmd, | 3516 &cmd, |
3543 static_cast<GLint>(11)); | 3517 static_cast<GLint>(11)); |
3544 EXPECT_EQ(static_cast<uint32>(SetSurfaceCHROMIUM::kCmdId), | 3518 EXPECT_EQ(static_cast<uint32>(SetSurfaceCHROMIUM::kCmdId), |
3545 cmd.header.command); | 3519 cmd.header.command); |
3546 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3520 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3547 EXPECT_EQ(static_cast<char*>(next_cmd), | 3521 EXPECT_EQ(static_cast<char*>(next_cmd), |
3548 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3522 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3582 cmd.header.command); | 3556 cmd.header.command); |
3583 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3557 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3584 EXPECT_EQ(static_cast<char*>(next_cmd), | 3558 EXPECT_EQ(static_cast<char*>(next_cmd), |
3585 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3559 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
3586 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); | 3560 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); |
3587 EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); | 3561 EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); |
3588 } | 3562 } |
3589 | 3563 |
3590 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 3564 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
3591 | 3565 |
OLD | NEW |