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