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

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

Issue 1165553003: Fine tuning glGetInternalformativ. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(0); 1545 EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(0);
1546 SpecializedSetup<cmds::GetIntegerv, 0>(false); 1546 SpecializedSetup<cmds::GetIntegerv, 0>(false);
1547 cmds::GetIntegerv::Result* result = 1547 cmds::GetIntegerv::Result* result =
1548 static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); 1548 static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_);
1549 result->size = 0; 1549 result->size = 0;
1550 cmds::GetIntegerv cmd; 1550 cmds::GetIntegerv cmd;
1551 cmd.Init(GL_ACTIVE_TEXTURE, shared_memory_id_, kInvalidSharedMemoryOffset); 1551 cmd.Init(GL_ACTIVE_TEXTURE, shared_memory_id_, kInvalidSharedMemoryOffset);
1552 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1552 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1553 EXPECT_EQ(0u, result->size); 1553 EXPECT_EQ(0u, result->size);
1554 } 1554 }
1555 1555 // TODO(gman): GetInternalformativ
1556 TEST_P(GLES2DecoderTest1, GetInternalformativValidArgs) {
1557 EXPECT_CALL(*gl_, GetError())
1558 .WillOnce(Return(GL_NO_ERROR))
1559 .WillOnce(Return(GL_NO_ERROR))
1560 .RetiresOnSaturation();
1561 SpecializedSetup<cmds::GetInternalformativ, 0>(true);
1562 typedef cmds::GetInternalformativ::Result Result;
1563 Result* result = static_cast<Result*>(shared_memory_address_);
1564 EXPECT_CALL(
1565 *gl_, GetInternalformativ(GL_RENDERBUFFER, GL_RGBA4, GL_NUM_SAMPLE_COUNTS,
1566 4, result->GetData()));
1567 result->size = 0;
1568 cmds::GetInternalformativ cmd;
1569 cmd.Init(GL_RENDERBUFFER, GL_RGBA4, GL_NUM_SAMPLE_COUNTS, 4,
1570 shared_memory_id_, shared_memory_offset_);
1571 decoder_->set_unsafe_es3_apis_enabled(true);
1572 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1573 EXPECT_EQ(
1574 decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_NUM_SAMPLE_COUNTS),
1575 result->GetNumResults());
1576 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1577 decoder_->set_unsafe_es3_apis_enabled(false);
1578 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
1579 }
1580 1556
1581 TEST_P(GLES2DecoderTest1, GetProgramivValidArgs) { 1557 TEST_P(GLES2DecoderTest1, GetProgramivValidArgs) {
1582 SpecializedSetup<cmds::GetProgramiv, 0>(true); 1558 SpecializedSetup<cmds::GetProgramiv, 0>(true);
1583 typedef cmds::GetProgramiv::Result Result; 1559 typedef cmds::GetProgramiv::Result Result;
1584 Result* result = static_cast<Result*>(shared_memory_address_); 1560 Result* result = static_cast<Result*>(shared_memory_address_);
1585 result->size = 0; 1561 result->size = 0;
1586 cmds::GetProgramiv cmd; 1562 cmds::GetProgramiv cmd;
1587 cmd.Init(client_program_id_, GL_DELETE_STATUS, shared_memory_id_, 1563 cmd.Init(client_program_id_, GL_DELETE_STATUS, shared_memory_id_,
1588 shared_memory_offset_); 1564 shared_memory_offset_);
1589 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1565 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 } 1624 }
1649 1625
1650 TEST_P(GLES2DecoderTest1, GetProgramInfoLogInvalidArgs) { 1626 TEST_P(GLES2DecoderTest1, GetProgramInfoLogInvalidArgs) {
1651 const uint32_t kBucketId = 123; 1627 const uint32_t kBucketId = 123;
1652 cmds::GetProgramInfoLog cmd; 1628 cmds::GetProgramInfoLog cmd;
1653 cmd.Init(kInvalidClientId, kBucketId); 1629 cmd.Init(kInvalidClientId, kBucketId);
1654 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1630 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1655 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 1631 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1656 } 1632 }
1657 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ 1633 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698