OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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. DO NOT EDIT! | 5 // This file is auto-generated. DO NOT EDIT! |
6 | 6 |
7 // This file contains unit tests for gles2 commmands | 7 // This file contains unit tests for gles2 commmands |
8 // It is included by gles2_cmd_format_test.cc | 8 // It is included by gles2_cmd_format_test.cc |
9 | 9 |
10 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 10 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
(...skipping 3270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3281 cmd.header.command); | 3281 cmd.header.command); |
3282 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3282 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3283 EXPECT_EQ(static_cast<char*>(next_cmd), | 3283 EXPECT_EQ(static_cast<char*>(next_cmd), |
3284 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3284 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
3285 EXPECT_EQ(static_cast<GLint>(11), cmd.x); | 3285 EXPECT_EQ(static_cast<GLint>(11), cmd.x); |
3286 EXPECT_EQ(static_cast<GLint>(12), cmd.y); | 3286 EXPECT_EQ(static_cast<GLint>(12), cmd.y); |
3287 EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); | 3287 EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); |
3288 EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); | 3288 EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); |
3289 } | 3289 } |
3290 | 3290 |
| 3291 TEST(GLES2FormatTest, BlitFramebufferEXT) { |
| 3292 BlitFramebufferEXT cmd = { { 0 } }; |
| 3293 void* next_cmd = cmd.Set( |
| 3294 &cmd, |
| 3295 static_cast<GLint>(11), |
| 3296 static_cast<GLint>(12), |
| 3297 static_cast<GLint>(13), |
| 3298 static_cast<GLint>(14), |
| 3299 static_cast<GLint>(15), |
| 3300 static_cast<GLint>(16), |
| 3301 static_cast<GLint>(17), |
| 3302 static_cast<GLint>(18), |
| 3303 static_cast<GLbitfield>(19), |
| 3304 static_cast<GLenum>(20)); |
| 3305 EXPECT_EQ(static_cast<uint32>(BlitFramebufferEXT::kCmdId), |
| 3306 cmd.header.command); |
| 3307 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3308 EXPECT_EQ(static_cast<char*>(next_cmd), |
| 3309 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
| 3310 EXPECT_EQ(static_cast<GLint>(11), cmd.srcX0); |
| 3311 EXPECT_EQ(static_cast<GLint>(12), cmd.srcY0); |
| 3312 EXPECT_EQ(static_cast<GLint>(13), cmd.srcX1); |
| 3313 EXPECT_EQ(static_cast<GLint>(14), cmd.srcY1); |
| 3314 EXPECT_EQ(static_cast<GLint>(15), cmd.dstX0); |
| 3315 EXPECT_EQ(static_cast<GLint>(16), cmd.dstY0); |
| 3316 EXPECT_EQ(static_cast<GLint>(17), cmd.dstX1); |
| 3317 EXPECT_EQ(static_cast<GLint>(18), cmd.dstY1); |
| 3318 EXPECT_EQ(static_cast<GLbitfield>(19), cmd.mask); |
| 3319 EXPECT_EQ(static_cast<GLenum>(20), cmd.filter); |
| 3320 } |
| 3321 |
| 3322 TEST(GLES2FormatTest, RenderbufferStorageMultisampleEXT) { |
| 3323 RenderbufferStorageMultisampleEXT cmd = { { 0 } }; |
| 3324 void* next_cmd = cmd.Set( |
| 3325 &cmd, |
| 3326 static_cast<GLenum>(11), |
| 3327 static_cast<GLsizei>(12), |
| 3328 static_cast<GLenum>(13), |
| 3329 static_cast<GLsizei>(14), |
| 3330 static_cast<GLsizei>(15)); |
| 3331 EXPECT_EQ(static_cast<uint32>(RenderbufferStorageMultisampleEXT::kCmdId), |
| 3332 cmd.header.command); |
| 3333 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3334 EXPECT_EQ(static_cast<char*>(next_cmd), |
| 3335 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
| 3336 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 3337 EXPECT_EQ(static_cast<GLsizei>(12), cmd.samples); |
| 3338 EXPECT_EQ(static_cast<GLenum>(13), cmd.internalformat); |
| 3339 EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); |
| 3340 EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); |
| 3341 } |
| 3342 |
3291 TEST(GLES2FormatTest, SwapBuffers) { | 3343 TEST(GLES2FormatTest, SwapBuffers) { |
3292 SwapBuffers cmd = { { 0 } }; | 3344 SwapBuffers cmd = { { 0 } }; |
3293 void* next_cmd = cmd.Set( | 3345 void* next_cmd = cmd.Set( |
3294 &cmd); | 3346 &cmd); |
3295 EXPECT_EQ(static_cast<uint32>(SwapBuffers::kCmdId), | 3347 EXPECT_EQ(static_cast<uint32>(SwapBuffers::kCmdId), |
3296 cmd.header.command); | 3348 cmd.header.command); |
3297 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3349 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3298 EXPECT_EQ(static_cast<char*>(next_cmd), | 3350 EXPECT_EQ(static_cast<char*>(next_cmd), |
3299 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3351 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
3300 } | 3352 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3445 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3394 EXPECT_EQ(static_cast<char*>(next_cmd), | 3446 EXPECT_EQ(static_cast<char*>(next_cmd), |
3395 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3447 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
3396 EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); | 3448 EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); |
3397 EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); | 3449 EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); |
3398 EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); | 3450 EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); |
3399 } | 3451 } |
3400 | 3452 |
3401 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 3453 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
3402 | 3454 |
OLD | NEW |