Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
11 // It is included by gles2_cmd_decoder_unittest_2.cc 11 // It is included by gles2_cmd_decoder_unittest_2.cc
12 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
13 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ 13 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
14 14
15 // TODO(gman): GetUniformBlockIndex
16
17 // TODO(gman): GetUniformfv
18
15 // TODO(gman): GetUniformiv 19 // TODO(gman): GetUniformiv
16 20
17 // TODO(gman): GetUniformLocation 21 // TODO(gman): GetUniformLocation
18 22
19 TEST_P(GLES2DecoderTest2, GetVertexAttribfvValidArgs) { 23 TEST_P(GLES2DecoderTest2, GetVertexAttribfvValidArgs) {
20 SpecializedSetup<cmds::GetVertexAttribfv, 0>(true); 24 SpecializedSetup<cmds::GetVertexAttribfv, 0>(true);
21 typedef cmds::GetVertexAttribfv::Result Result; 25 typedef cmds::GetVertexAttribfv::Result Result;
22 Result* result = static_cast<Result*>(shared_memory_address_); 26 Result* result = static_cast<Result*>(shared_memory_address_);
23 result->size = 0; 27 result->size = 0;
24 cmds::GetVertexAttribfv cmd; 28 cmds::GetVertexAttribfv cmd;
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 EXPECT_CALL(*gl_, VertexAttribI4i(1, 2, 3, 4, 5)); 1494 EXPECT_CALL(*gl_, VertexAttribI4i(1, 2, 3, 4, 5));
1491 SpecializedSetup<cmds::VertexAttribI4i, 0>(true); 1495 SpecializedSetup<cmds::VertexAttribI4i, 0>(true);
1492 cmds::VertexAttribI4i cmd; 1496 cmds::VertexAttribI4i cmd;
1493 cmd.Init(1, 2, 3, 4, 5); 1497 cmd.Init(1, 2, 3, 4, 5);
1494 decoder_->set_unsafe_es3_apis_enabled(true); 1498 decoder_->set_unsafe_es3_apis_enabled(true);
1495 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1499 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1496 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 1500 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1497 decoder_->set_unsafe_es3_apis_enabled(false); 1501 decoder_->set_unsafe_es3_apis_enabled(false);
1498 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); 1502 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
1499 } 1503 }
1500
1501 TEST_P(GLES2DecoderTest2, VertexAttribI4ivImmediateValidArgs) {
1502 cmds::VertexAttribI4ivImmediate& cmd =
1503 *GetImmediateAs<cmds::VertexAttribI4ivImmediate>();
1504 SpecializedSetup<cmds::VertexAttribI4ivImmediate, 0>(true);
1505 GLint temp[4] = {
1506 0,
1507 };
1508 cmd.Init(1, &temp[0]);
1509 EXPECT_CALL(*gl_, VertexAttribI4iv(1, reinterpret_cast<GLint*>(
1510 ImmediateDataAddress(&cmd))));
1511 decoder_->set_unsafe_es3_apis_enabled(true);
1512 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
1513 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1514 decoder_->set_unsafe_es3_apis_enabled(false);
1515 EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
1516 }
1517
1518 TEST_P(GLES2DecoderTest2, VertexAttribI4uiValidArgs) {
1519 EXPECT_CALL(*gl_, VertexAttribI4ui(1, 2, 3, 4, 5));
1520 SpecializedSetup<cmds::VertexAttribI4ui, 0>(true);
1521 cmds::VertexAttribI4ui cmd;
1522 cmd.Init(1, 2, 3, 4, 5);
1523 decoder_->set_unsafe_es3_apis_enabled(true);
1524 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1525 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1526 decoder_->set_unsafe_es3_apis_enabled(false);
1527 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
1528 }
1529 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ 1504 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698