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 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3694 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3694 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3695 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 3695 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
3696 EXPECT_EQ(static_cast<GLsizei>(12), cmd.width); | 3696 EXPECT_EQ(static_cast<GLsizei>(12), cmd.width); |
3697 EXPECT_EQ(static_cast<GLsizei>(13), cmd.height); | 3697 EXPECT_EQ(static_cast<GLsizei>(13), cmd.height); |
3698 EXPECT_EQ(static_cast<GLuint>(14), cmd.ioSurfaceId); | 3698 EXPECT_EQ(static_cast<GLuint>(14), cmd.ioSurfaceId); |
3699 EXPECT_EQ(static_cast<GLuint>(15), cmd.plane); | 3699 EXPECT_EQ(static_cast<GLuint>(15), cmd.plane); |
3700 CheckBytesWrittenMatchesExpectedSize( | 3700 CheckBytesWrittenMatchesExpectedSize( |
3701 next_cmd, sizeof(cmd)); | 3701 next_cmd, sizeof(cmd)); |
3702 } | 3702 } |
3703 | 3703 |
3704 TEST_F(GLES2FormatTest, CopyTextureCHROMIUM) { | |
3705 CopyTextureCHROMIUM& cmd = *GetBufferAs<CopyTextureCHROMIUM>(); | |
3706 void* next_cmd = cmd.Set( | |
3707 &cmd, | |
3708 static_cast<GLenum>(11), | |
3709 static_cast<GLenum>(12), | |
3710 static_cast<GLenum>(13), | |
3711 static_cast<GLint>(14)); | |
3712 EXPECT_EQ(static_cast<uint32>(CopyTextureCHROMIUM::kCmdId), | |
3713 cmd.header.command); | |
3714 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | |
3715 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | |
3716 EXPECT_EQ(static_cast<GLenum>(12), cmd.source_id); | |
3717 EXPECT_EQ(static_cast<GLenum>(13), cmd.dest_id); | |
3718 EXPECT_EQ(static_cast<GLint>(14), cmd.level); | |
3719 CheckBytesWrittenMatchesExpectedSize( | |
3720 next_cmd, sizeof(cmd)); | |
3721 } | |
3722 | |
3723 TEST_F(GLES2FormatTest, DrawArraysInstancedANGLE) { | 3704 TEST_F(GLES2FormatTest, DrawArraysInstancedANGLE) { |
3724 DrawArraysInstancedANGLE& cmd = *GetBufferAs<DrawArraysInstancedANGLE>(); | 3705 DrawArraysInstancedANGLE& cmd = *GetBufferAs<DrawArraysInstancedANGLE>(); |
3725 void* next_cmd = cmd.Set( | 3706 void* next_cmd = cmd.Set( |
3726 &cmd, | 3707 &cmd, |
3727 static_cast<GLenum>(11), | 3708 static_cast<GLenum>(11), |
3728 static_cast<GLint>(12), | 3709 static_cast<GLint>(12), |
3729 static_cast<GLsizei>(13), | 3710 static_cast<GLsizei>(13), |
3730 static_cast<GLsizei>(14)); | 3711 static_cast<GLsizei>(14)); |
3731 EXPECT_EQ(static_cast<uint32>(DrawArraysInstancedANGLE::kCmdId), | 3712 EXPECT_EQ(static_cast<uint32>(DrawArraysInstancedANGLE::kCmdId), |
3732 cmd.header.command); | 3713 cmd.header.command); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3770 cmd.header.command); | 3751 cmd.header.command); |
3771 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3752 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3772 EXPECT_EQ(static_cast<GLuint>(11), cmd.index); | 3753 EXPECT_EQ(static_cast<GLuint>(11), cmd.index); |
3773 EXPECT_EQ(static_cast<GLuint>(12), cmd.divisor); | 3754 EXPECT_EQ(static_cast<GLuint>(12), cmd.divisor); |
3774 CheckBytesWrittenMatchesExpectedSize( | 3755 CheckBytesWrittenMatchesExpectedSize( |
3775 next_cmd, sizeof(cmd)); | 3756 next_cmd, sizeof(cmd)); |
3776 } | 3757 } |
3777 | 3758 |
3778 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 3759 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
3779 | 3760 |
OLD | NEW |