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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 1136713003: Add ES3 commands GetVertexAttribI{u}iv to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 expected.cmd.Init(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, result1.id, 1115 expected.cmd.Init(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, result1.id,
1116 result1.offset); 1116 result1.offset);
1117 EXPECT_CALL(*command_buffer(), OnFlush()) 1117 EXPECT_CALL(*command_buffer(), OnFlush())
1118 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<ResultType>(1))) 1118 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<ResultType>(1)))
1119 .RetiresOnSaturation(); 1119 .RetiresOnSaturation();
1120 gl_->GetVertexAttribiv(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &result); 1120 gl_->GetVertexAttribiv(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &result);
1121 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1121 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1122 EXPECT_EQ(static_cast<ResultType>(1), result); 1122 EXPECT_EQ(static_cast<ResultType>(1), result);
1123 } 1123 }
1124 1124
1125 TEST_F(GLES2ImplementationTest, GetVertexAttribIiv) {
1126 struct Cmds {
1127 cmds::GetVertexAttribIiv cmd;
1128 };
1129 typedef cmds::GetVertexAttribIiv::Result::Type ResultType;
1130 ResultType result = 0;
1131 Cmds expected;
1132 ExpectedMemoryInfo result1 =
1133 GetExpectedResultMemory(sizeof(uint32_t) + sizeof(ResultType));
1134 expected.cmd.Init(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, result1.id,
1135 result1.offset);
1136 EXPECT_CALL(*command_buffer(), OnFlush())
1137 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<ResultType>(1)))
1138 .RetiresOnSaturation();
1139 gl_->GetVertexAttribIiv(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &result);
1140 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1141 EXPECT_EQ(static_cast<ResultType>(1), result);
1142 }
1143
1144 TEST_F(GLES2ImplementationTest, GetVertexAttribIuiv) {
1145 struct Cmds {
1146 cmds::GetVertexAttribIuiv cmd;
1147 };
1148 typedef cmds::GetVertexAttribIuiv::Result::Type ResultType;
1149 ResultType result = 0;
1150 Cmds expected;
1151 ExpectedMemoryInfo result1 =
1152 GetExpectedResultMemory(sizeof(uint32_t) + sizeof(ResultType));
1153 expected.cmd.Init(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, result1.id,
1154 result1.offset);
1155 EXPECT_CALL(*command_buffer(), OnFlush())
1156 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<ResultType>(1)))
1157 .RetiresOnSaturation();
1158 gl_->GetVertexAttribIuiv(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &result);
1159 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1160 EXPECT_EQ(static_cast<ResultType>(1), result);
1161 }
1162
1125 TEST_F(GLES2ImplementationTest, Hint) { 1163 TEST_F(GLES2ImplementationTest, Hint) {
1126 struct Cmds { 1164 struct Cmds {
1127 cmds::Hint cmd; 1165 cmds::Hint cmd;
1128 }; 1166 };
1129 Cmds expected; 1167 Cmds expected;
1130 expected.cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_FASTEST); 1168 expected.cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
1131 1169
1132 gl_->Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST); 1170 gl_->Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
1133 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1171 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1134 } 1172 }
(...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 struct Cmds { 3119 struct Cmds {
3082 cmds::MatrixLoadIdentityCHROMIUM cmd; 3120 cmds::MatrixLoadIdentityCHROMIUM cmd;
3083 }; 3121 };
3084 Cmds expected; 3122 Cmds expected;
3085 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); 3123 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM);
3086 3124
3087 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); 3125 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
3088 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 3126 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3089 } 3127 }
3090 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 3128 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698