| 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 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3429 // TODO(gman): Check that ids were inserted; | 3429 // TODO(gman): Check that ids were inserted; |
| 3430 } | 3430 } |
| 3431 | 3431 |
| 3432 TEST_F(GLES2FormatTest, BeginQueryEXT) { | 3432 TEST_F(GLES2FormatTest, BeginQueryEXT) { |
| 3433 cmds::BeginQueryEXT& cmd = *GetBufferAs<cmds::BeginQueryEXT>(); | 3433 cmds::BeginQueryEXT& cmd = *GetBufferAs<cmds::BeginQueryEXT>(); |
| 3434 void* next_cmd = cmd.Set( | 3434 void* next_cmd = cmd.Set( |
| 3435 &cmd, | 3435 &cmd, |
| 3436 static_cast<GLenum>(11), | 3436 static_cast<GLenum>(11), |
| 3437 static_cast<GLuint>(12), | 3437 static_cast<GLuint>(12), |
| 3438 static_cast<uint32>(13), | 3438 static_cast<uint32>(13), |
| 3439 static_cast<uint32>(14)); | 3439 static_cast<uint32>(14), |
| 3440 static_cast<uint32>(15)); |
| 3440 EXPECT_EQ(static_cast<uint32>(cmds::BeginQueryEXT::kCmdId), | 3441 EXPECT_EQ(static_cast<uint32>(cmds::BeginQueryEXT::kCmdId), |
| 3441 cmd.header.command); | 3442 cmd.header.command); |
| 3442 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3443 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3443 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 3444 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 3444 EXPECT_EQ(static_cast<GLuint>(12), cmd.id); | 3445 EXPECT_EQ(static_cast<GLuint>(12), cmd.id); |
| 3445 EXPECT_EQ(static_cast<uint32>(13), cmd.sync_data_shm_id); | 3446 EXPECT_EQ(static_cast<uint32>(13), cmd.serial); |
| 3446 EXPECT_EQ(static_cast<uint32>(14), cmd.sync_data_shm_offset); | 3447 EXPECT_EQ(static_cast<uint32>(14), cmd.sync_data_shm_id); |
| 3448 EXPECT_EQ(static_cast<uint32>(15), cmd.sync_data_shm_offset); |
| 3447 CheckBytesWrittenMatchesExpectedSize( | 3449 CheckBytesWrittenMatchesExpectedSize( |
| 3448 next_cmd, sizeof(cmd)); | 3450 next_cmd, sizeof(cmd)); |
| 3449 } | 3451 } |
| 3450 | 3452 |
| 3451 TEST_F(GLES2FormatTest, EndQueryEXT) { | 3453 TEST_F(GLES2FormatTest, EndQueryEXT) { |
| 3452 cmds::EndQueryEXT& cmd = *GetBufferAs<cmds::EndQueryEXT>(); | 3454 cmds::EndQueryEXT& cmd = *GetBufferAs<cmds::EndQueryEXT>(); |
| 3453 void* next_cmd = cmd.Set( | 3455 void* next_cmd = cmd.Set( |
| 3454 &cmd, | 3456 &cmd, |
| 3455 static_cast<GLenum>(11), | 3457 static_cast<GLenum>(11), |
| 3456 static_cast<GLuint>(12)); | 3458 static_cast<uint32>(12), |
| 3459 static_cast<GLuint>(13)); |
| 3457 EXPECT_EQ(static_cast<uint32>(cmds::EndQueryEXT::kCmdId), | 3460 EXPECT_EQ(static_cast<uint32>(cmds::EndQueryEXT::kCmdId), |
| 3458 cmd.header.command); | 3461 cmd.header.command); |
| 3459 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3462 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3460 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 3463 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 3461 EXPECT_EQ(static_cast<GLuint>(12), cmd.submit_count); | 3464 EXPECT_EQ(static_cast<uint32>(12), cmd.serial); |
| 3465 EXPECT_EQ(static_cast<GLuint>(13), cmd.submit_count); |
| 3462 CheckBytesWrittenMatchesExpectedSize( | 3466 CheckBytesWrittenMatchesExpectedSize( |
| 3463 next_cmd, sizeof(cmd)); | 3467 next_cmd, sizeof(cmd)); |
| 3464 } | 3468 } |
| 3465 | 3469 |
| 3466 TEST_F(GLES2FormatTest, InsertEventMarkerEXT) { | 3470 TEST_F(GLES2FormatTest, InsertEventMarkerEXT) { |
| 3467 cmds::InsertEventMarkerEXT& cmd = *GetBufferAs<cmds::InsertEventMarkerEXT>(); | 3471 cmds::InsertEventMarkerEXT& cmd = *GetBufferAs<cmds::InsertEventMarkerEXT>(); |
| 3468 void* next_cmd = cmd.Set( | 3472 void* next_cmd = cmd.Set( |
| 3469 &cmd, | 3473 &cmd, |
| 3470 static_cast<GLuint>(11)); | 3474 static_cast<GLuint>(11)); |
| 3471 EXPECT_EQ(static_cast<uint32>(cmds::InsertEventMarkerEXT::kCmdId), | 3475 EXPECT_EQ(static_cast<uint32>(cmds::InsertEventMarkerEXT::kCmdId), |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4481 &cmd); | 4485 &cmd); |
| 4482 EXPECT_EQ(static_cast<uint32>(cmds::DiscardBackbufferCHROMIUM::kCmdId), | 4486 EXPECT_EQ(static_cast<uint32>(cmds::DiscardBackbufferCHROMIUM::kCmdId), |
| 4483 cmd.header.command); | 4487 cmd.header.command); |
| 4484 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 4488 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 4485 CheckBytesWrittenMatchesExpectedSize( | 4489 CheckBytesWrittenMatchesExpectedSize( |
| 4486 next_cmd, sizeof(cmd)); | 4490 next_cmd, sizeof(cmd)); |
| 4487 } | 4491 } |
| 4488 | 4492 |
| 4489 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 4493 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
| 4490 | 4494 |
| OLD | NEW |