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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); | 1277 EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); |
1278 EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); | 1278 EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); |
1279 EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); | 1279 EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); |
1280 } | 1280 } |
1281 | 1281 |
1282 TEST(GLES2FormatTest, GetProgramInfoLog) { | 1282 TEST(GLES2FormatTest, GetProgramInfoLog) { |
1283 GetProgramInfoLog cmd = { { 0 } }; | 1283 GetProgramInfoLog cmd = { { 0 } }; |
1284 void* next_cmd = cmd.Set( | 1284 void* next_cmd = cmd.Set( |
1285 &cmd, | 1285 &cmd, |
1286 static_cast<GLuint>(11), | 1286 static_cast<GLuint>(11), |
1287 static_cast<uint32>(12)); | 1287 static_cast<GLsizei>(12), |
| 1288 static_cast<uint32>(13), |
| 1289 static_cast<uint32>(14), |
| 1290 static_cast<uint32>(15), |
| 1291 static_cast<uint32>(16)); |
1288 EXPECT_EQ(static_cast<uint32>(GetProgramInfoLog::kCmdId), | 1292 EXPECT_EQ(static_cast<uint32>(GetProgramInfoLog::kCmdId), |
1289 cmd.header.command); | 1293 cmd.header.command); |
1290 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 1294 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
1291 EXPECT_EQ(static_cast<char*>(next_cmd), | 1295 EXPECT_EQ(static_cast<char*>(next_cmd), |
1292 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 1296 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
1293 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); | 1297 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); |
1294 EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); | 1298 EXPECT_EQ(static_cast<GLsizei>(12), cmd.bufsize); |
| 1299 EXPECT_EQ(static_cast<uint32>(13), cmd.length_shm_id); |
| 1300 EXPECT_EQ(static_cast<uint32>(14), cmd.length_shm_offset); |
| 1301 EXPECT_EQ(static_cast<uint32>(15), cmd.infolog_shm_id); |
| 1302 EXPECT_EQ(static_cast<uint32>(16), cmd.infolog_shm_offset); |
1295 } | 1303 } |
1296 | 1304 |
1297 TEST(GLES2FormatTest, GetRenderbufferParameteriv) { | 1305 TEST(GLES2FormatTest, GetRenderbufferParameteriv) { |
1298 GetRenderbufferParameteriv cmd = { { 0 } }; | 1306 GetRenderbufferParameteriv cmd = { { 0 } }; |
1299 void* next_cmd = cmd.Set( | 1307 void* next_cmd = cmd.Set( |
1300 &cmd, | 1308 &cmd, |
1301 static_cast<GLenum>(11), | 1309 static_cast<GLenum>(11), |
1302 static_cast<GLenum>(12), | 1310 static_cast<GLenum>(12), |
1303 static_cast<uint32>(13), | 1311 static_cast<uint32>(13), |
1304 static_cast<uint32>(14)); | 1312 static_cast<uint32>(14)); |
(...skipping 25 matching lines...) Expand all Loading... |
1330 EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); | 1338 EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); |
1331 EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); | 1339 EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); |
1332 EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); | 1340 EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); |
1333 } | 1341 } |
1334 | 1342 |
1335 TEST(GLES2FormatTest, GetShaderInfoLog) { | 1343 TEST(GLES2FormatTest, GetShaderInfoLog) { |
1336 GetShaderInfoLog cmd = { { 0 } }; | 1344 GetShaderInfoLog cmd = { { 0 } }; |
1337 void* next_cmd = cmd.Set( | 1345 void* next_cmd = cmd.Set( |
1338 &cmd, | 1346 &cmd, |
1339 static_cast<GLuint>(11), | 1347 static_cast<GLuint>(11), |
1340 static_cast<uint32>(12)); | 1348 static_cast<GLsizei>(12), |
| 1349 static_cast<uint32>(13), |
| 1350 static_cast<uint32>(14), |
| 1351 static_cast<uint32>(15), |
| 1352 static_cast<uint32>(16)); |
1341 EXPECT_EQ(static_cast<uint32>(GetShaderInfoLog::kCmdId), | 1353 EXPECT_EQ(static_cast<uint32>(GetShaderInfoLog::kCmdId), |
1342 cmd.header.command); | 1354 cmd.header.command); |
1343 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 1355 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
1344 EXPECT_EQ(static_cast<char*>(next_cmd), | 1356 EXPECT_EQ(static_cast<char*>(next_cmd), |
1345 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 1357 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
1346 EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); | 1358 EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); |
1347 EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); | 1359 EXPECT_EQ(static_cast<GLsizei>(12), cmd.bufsize); |
| 1360 EXPECT_EQ(static_cast<uint32>(13), cmd.length_shm_id); |
| 1361 EXPECT_EQ(static_cast<uint32>(14), cmd.length_shm_offset); |
| 1362 EXPECT_EQ(static_cast<uint32>(15), cmd.infolog_shm_id); |
| 1363 EXPECT_EQ(static_cast<uint32>(16), cmd.infolog_shm_offset); |
1348 } | 1364 } |
1349 | 1365 |
1350 TEST(GLES2FormatTest, GetShaderPrecisionFormat) { | 1366 TEST(GLES2FormatTest, GetShaderPrecisionFormat) { |
1351 GetShaderPrecisionFormat cmd = { { 0 } }; | 1367 GetShaderPrecisionFormat cmd = { { 0 } }; |
1352 void* next_cmd = cmd.Set( | 1368 void* next_cmd = cmd.Set( |
1353 &cmd, | 1369 &cmd, |
1354 static_cast<GLenum>(11), | 1370 static_cast<GLenum>(11), |
1355 static_cast<GLenum>(12), | 1371 static_cast<GLenum>(12), |
1356 static_cast<uint32>(13), | 1372 static_cast<uint32>(13), |
1357 static_cast<uint32>(14)); | 1373 static_cast<uint32>(14)); |
1358 EXPECT_EQ(static_cast<uint32>(GetShaderPrecisionFormat::kCmdId), | 1374 EXPECT_EQ(static_cast<uint32>(GetShaderPrecisionFormat::kCmdId), |
1359 cmd.header.command); | 1375 cmd.header.command); |
1360 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 1376 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
1361 EXPECT_EQ(static_cast<char*>(next_cmd), | 1377 EXPECT_EQ(static_cast<char*>(next_cmd), |
1362 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 1378 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
1363 EXPECT_EQ(static_cast<GLenum>(11), cmd.shadertype); | 1379 EXPECT_EQ(static_cast<GLenum>(11), cmd.shadertype); |
1364 EXPECT_EQ(static_cast<GLenum>(12), cmd.precisiontype); | 1380 EXPECT_EQ(static_cast<GLenum>(12), cmd.precisiontype); |
1365 EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_id); | 1381 EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_id); |
1366 EXPECT_EQ(static_cast<uint32>(14), cmd.result_shm_offset); | 1382 EXPECT_EQ(static_cast<uint32>(14), cmd.result_shm_offset); |
1367 } | 1383 } |
1368 | 1384 |
1369 TEST(GLES2FormatTest, GetShaderSource) { | 1385 TEST(GLES2FormatTest, GetShaderSource) { |
1370 GetShaderSource cmd = { { 0 } }; | 1386 GetShaderSource cmd = { { 0 } }; |
1371 void* next_cmd = cmd.Set( | 1387 void* next_cmd = cmd.Set( |
1372 &cmd, | 1388 &cmd, |
1373 static_cast<GLuint>(11), | 1389 static_cast<GLuint>(11), |
1374 static_cast<uint32>(12)); | 1390 static_cast<GLsizei>(12), |
| 1391 static_cast<uint32>(13), |
| 1392 static_cast<uint32>(14), |
| 1393 static_cast<uint32>(15), |
| 1394 static_cast<uint32>(16)); |
1375 EXPECT_EQ(static_cast<uint32>(GetShaderSource::kCmdId), | 1395 EXPECT_EQ(static_cast<uint32>(GetShaderSource::kCmdId), |
1376 cmd.header.command); | 1396 cmd.header.command); |
1377 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 1397 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
1378 EXPECT_EQ(static_cast<char*>(next_cmd), | 1398 EXPECT_EQ(static_cast<char*>(next_cmd), |
1379 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 1399 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
1380 EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); | 1400 EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); |
1381 EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); | 1401 EXPECT_EQ(static_cast<GLsizei>(12), cmd.bufsize); |
| 1402 EXPECT_EQ(static_cast<uint32>(13), cmd.length_shm_id); |
| 1403 EXPECT_EQ(static_cast<uint32>(14), cmd.length_shm_offset); |
| 1404 EXPECT_EQ(static_cast<uint32>(15), cmd.source_shm_id); |
| 1405 EXPECT_EQ(static_cast<uint32>(16), cmd.source_shm_offset); |
1382 } | 1406 } |
1383 | 1407 |
1384 TEST(GLES2FormatTest, GetString) { | 1408 TEST(GLES2FormatTest, GetString) { |
1385 GetString cmd = { { 0 } }; | 1409 GetString cmd = { { 0 } }; |
1386 void* next_cmd = cmd.Set( | 1410 void* next_cmd = cmd.Set( |
1387 &cmd, | 1411 &cmd, |
1388 static_cast<GLenum>(11), | 1412 static_cast<GLenum>(11)); |
1389 static_cast<uint32>(12)); | |
1390 EXPECT_EQ(static_cast<uint32>(GetString::kCmdId), | 1413 EXPECT_EQ(static_cast<uint32>(GetString::kCmdId), |
1391 cmd.header.command); | 1414 cmd.header.command); |
1392 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 1415 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
1393 EXPECT_EQ(static_cast<char*>(next_cmd), | 1416 EXPECT_EQ(static_cast<char*>(next_cmd), |
1394 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 1417 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
1395 EXPECT_EQ(static_cast<GLenum>(11), cmd.name); | 1418 EXPECT_EQ(static_cast<GLenum>(11), cmd.name); |
1396 EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); | |
1397 } | 1419 } |
1398 | 1420 |
1399 TEST(GLES2FormatTest, GetTexParameterfv) { | 1421 TEST(GLES2FormatTest, GetTexParameterfv) { |
1400 GetTexParameterfv cmd = { { 0 } }; | 1422 GetTexParameterfv cmd = { { 0 } }; |
1401 void* next_cmd = cmd.Set( | 1423 void* next_cmd = cmd.Set( |
1402 &cmd, | 1424 &cmd, |
1403 static_cast<GLenum>(11), | 1425 static_cast<GLenum>(11), |
1404 static_cast<GLenum>(12), | 1426 static_cast<GLenum>(12), |
1405 static_cast<uint32>(13), | 1427 static_cast<uint32>(13), |
1406 static_cast<uint32>(14)); | 1428 static_cast<uint32>(14)); |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3167 &cmd); | 3189 &cmd); |
3168 EXPECT_EQ(static_cast<uint32>(SwapBuffers::kCmdId), | 3190 EXPECT_EQ(static_cast<uint32>(SwapBuffers::kCmdId), |
3169 cmd.header.command); | 3191 cmd.header.command); |
3170 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3192 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
3171 EXPECT_EQ(static_cast<char*>(next_cmd), | 3193 EXPECT_EQ(static_cast<char*>(next_cmd), |
3172 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); | 3194 reinterpret_cast<char*>(&cmd) + sizeof(cmd)); |
3173 } | 3195 } |
3174 | 3196 |
3175 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 3197 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
3176 | 3198 |
OLD | NEW |