Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / gpu / command_buffer / service / gles2_cmd_decoder_unittest_2.cc
blob221aa332a488993bc3a2a40030563a4a49b1aef7
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
7 #include "gpu/command_buffer/common/gles2_cmd_format.h"
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
10 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
11 #include "gpu/command_buffer/service/context_group.h"
12 #include "gpu/command_buffer/service/program_manager.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/gl/gl_mock.h"
16 using ::gfx::MockGLInterface;
17 using ::testing::_;
18 using ::testing::AnyNumber;
19 using ::testing::DoAll;
20 using ::testing::InSequence;
21 using ::testing::MatcherCast;
22 using ::testing::Pointee;
23 using ::testing::Return;
24 using ::testing::SetArrayArgument;
25 using ::testing::SetArgumentPointee;
26 using ::testing::StrEq;
28 namespace gpu {
29 namespace gles2 {
31 class GLES2DecoderTest2 : public GLES2DecoderTestBase {
32 public:
33 GLES2DecoderTest2() { }
35 void TestAcceptedUniform(GLenum uniform_type, uint32 accepts_apis) {
36 SetupShaderForUniform(uniform_type);
37 bool valid_uniform = false;
39 EXPECT_CALL(*gl_, Uniform1i(1, _)).Times(AnyNumber());
40 EXPECT_CALL(*gl_, Uniform1iv(1, _, _)).Times(AnyNumber());
41 EXPECT_CALL(*gl_, Uniform2iv(1, _, _)).Times(AnyNumber());
42 EXPECT_CALL(*gl_, Uniform3iv(1, _, _)).Times(AnyNumber());
43 EXPECT_CALL(*gl_, Uniform4iv(1, _, _)).Times(AnyNumber());
44 EXPECT_CALL(*gl_, Uniform1f(1, _)).Times(AnyNumber());
45 EXPECT_CALL(*gl_, Uniform1fv(1, _, _)).Times(AnyNumber());
46 EXPECT_CALL(*gl_, Uniform2fv(1, _, _)).Times(AnyNumber());
47 EXPECT_CALL(*gl_, Uniform3fv(1, _, _)).Times(AnyNumber());
48 EXPECT_CALL(*gl_, Uniform4fv(1, _, _)).Times(AnyNumber());
49 EXPECT_CALL(*gl_, UniformMatrix2fv(1, _, _, _)).Times(AnyNumber());
50 EXPECT_CALL(*gl_, UniformMatrix3fv(1, _, _, _)).Times(AnyNumber());
51 EXPECT_CALL(*gl_, UniformMatrix4fv(1, _, _, _)).Times(AnyNumber());
54 valid_uniform = accepts_apis & Program::kUniform1i;
55 cmds::Uniform1i cmd;
56 cmd.Init(1, 2);
57 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
58 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
59 GetGLError());
63 valid_uniform = accepts_apis & Program::kUniform1i;
64 cmds::Uniform1ivImmediate& cmd =
65 *GetImmediateAs<cmds::Uniform1ivImmediate>();
66 GLint data[2][1] = {{0}};
67 cmd.Init(1, 2, &data[0][0]);
68 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
69 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
70 GetGLError());
74 valid_uniform = accepts_apis & Program::kUniform2i;
75 cmds::Uniform2i cmd;
76 cmd.Init(1, 2, 3);
77 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
78 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
79 GetGLError());
83 valid_uniform = accepts_apis & Program::kUniform2i;
84 cmds::Uniform2ivImmediate& cmd =
85 *GetImmediateAs<cmds::Uniform2ivImmediate>();
86 GLint data[2][2] = {{0}};
87 cmd.Init(1, 2, &data[0][0]);
88 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
89 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
90 GetGLError());
94 valid_uniform = accepts_apis & Program::kUniform3i;
95 cmds::Uniform3i cmd;
96 cmd.Init(1, 2, 3, 4);
97 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
98 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
99 GetGLError());
103 valid_uniform = accepts_apis & Program::kUniform3i;
104 cmds::Uniform3ivImmediate& cmd =
105 *GetImmediateAs<cmds::Uniform3ivImmediate>();
106 GLint data[2][3] = {{0}};
107 cmd.Init(1, 2, &data[0][0]);
108 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
109 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
110 GetGLError());
114 valid_uniform = accepts_apis & Program::kUniform4i;
115 cmds::Uniform4i cmd;
116 cmd.Init(1, 2, 3, 4, 5);
117 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
118 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
119 GetGLError());
123 valid_uniform = accepts_apis & Program::kUniform4i;
124 cmds::Uniform4ivImmediate& cmd =
125 *GetImmediateAs<cmds::Uniform4ivImmediate>();
126 GLint data[2][4] = {{0}};
127 cmd.Init(1, 2, &data[0][0]);
128 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
129 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
130 GetGLError());
133 ////////////////////
136 valid_uniform = accepts_apis & Program::kUniform1f;
137 cmds::Uniform1f cmd;
138 cmd.Init(1, 2);
139 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
140 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
141 GetGLError());
145 valid_uniform = accepts_apis & Program::kUniform1f;
146 cmds::Uniform1fvImmediate& cmd =
147 *GetImmediateAs<cmds::Uniform1fvImmediate>();
148 GLfloat data[2][1] = {{0.0f}};
149 cmd.Init(1, 2, &data[0][0]);
150 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
151 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
152 GetGLError());
156 valid_uniform = accepts_apis & Program::kUniform2f;
157 cmds::Uniform2f cmd;
158 cmd.Init(1, 2, 3);
159 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
160 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
161 GetGLError());
165 valid_uniform = accepts_apis & Program::kUniform2f;
166 cmds::Uniform2fvImmediate& cmd =
167 *GetImmediateAs<cmds::Uniform2fvImmediate>();
168 GLfloat data[2][2] = {{0.0f}};
169 cmd.Init(1, 2, &data[0][0]);
170 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
171 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
172 GetGLError());
176 valid_uniform = accepts_apis & Program::kUniform3f;
177 cmds::Uniform3f cmd;
178 cmd.Init(1, 2, 3, 4);
179 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
180 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
181 GetGLError());
185 valid_uniform = accepts_apis & Program::kUniform3f;
186 cmds::Uniform3fvImmediate& cmd =
187 *GetImmediateAs<cmds::Uniform3fvImmediate>();
188 GLfloat data[2][3] = {{0.0f}};
189 cmd.Init(1, 2, &data[0][0]);
190 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
191 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
192 GetGLError());
196 valid_uniform = accepts_apis & Program::kUniform4f;
197 cmds::Uniform4f cmd;
198 cmd.Init(1, 2, 3, 4, 5);
199 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
200 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
201 GetGLError());
205 valid_uniform = accepts_apis & Program::kUniform4f;
206 cmds::Uniform4fvImmediate& cmd =
207 *GetImmediateAs<cmds::Uniform4fvImmediate>();
208 GLfloat data[2][4] = {{0.0f}};
209 cmd.Init(1, 2, &data[0][0]);
210 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
211 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
212 GetGLError());
216 valid_uniform = accepts_apis & Program::kUniformMatrix2f;
217 cmds::UniformMatrix2fvImmediate& cmd =
218 *GetImmediateAs<cmds::UniformMatrix2fvImmediate>();
219 GLfloat data[2][2 * 2] = {{0.0f}};
221 cmd.Init(1, 2, &data[0][0]);
222 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
223 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
224 GetGLError());
228 valid_uniform = accepts_apis & Program::kUniformMatrix3f;
229 cmds::UniformMatrix3fvImmediate& cmd =
230 *GetImmediateAs<cmds::UniformMatrix3fvImmediate>();
231 GLfloat data[2][3 * 3] = {{0.0f}};
232 cmd.Init(1, 2, &data[0][0]);
233 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
234 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
235 GetGLError());
239 valid_uniform = accepts_apis & Program::kUniformMatrix4f;
240 cmds::UniformMatrix4fvImmediate& cmd =
241 *GetImmediateAs<cmds::UniformMatrix4fvImmediate>();
242 GLfloat data[2][4 * 4] = {{0.0f}};
243 cmd.Init(1, 2, &data[0][0]);
244 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
245 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
246 GetGLError());
251 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest2, ::testing::Bool());
253 template <>
254 void GLES2DecoderTestBase::SpecializedSetup<cmds::GenQueriesEXTImmediate, 0>(
255 bool valid) {
256 if (!valid) {
257 // Make the client_query_id_ so that trying to make it again
258 // will fail.
259 cmds::GenQueriesEXTImmediate& cmd =
260 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
261 cmd.Init(1, &client_query_id_);
262 EXPECT_EQ(error::kNoError,
263 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
267 template <>
268 void GLES2DecoderTestBase::SpecializedSetup<cmds::DeleteQueriesEXTImmediate, 0>(
269 bool valid) {
270 if (valid) {
271 // Make the client_query_id_ so that trying to delete it will succeed.
272 cmds::GenQueriesEXTImmediate& cmd =
273 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
274 cmd.Init(1, &client_query_id_);
275 EXPECT_EQ(error::kNoError,
276 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
280 template <>
281 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(
282 bool /* valid */) {
283 const GLuint kClientVertexShaderId = 5001;
284 const GLuint kServiceVertexShaderId = 6001;
285 const GLuint kClientFragmentShaderId = 5002;
286 const GLuint kServiceFragmentShaderId = 6002;
287 DoCreateShader(
288 GL_VERTEX_SHADER, kClientVertexShaderId, kServiceVertexShaderId);
289 DoCreateShader(
290 GL_FRAGMENT_SHADER, kClientFragmentShaderId, kServiceFragmentShaderId);
292 GetShader(kClientVertexShaderId)->SetStatus(true, "", NULL);
293 GetShader(kClientFragmentShaderId)->SetStatus(true, "", NULL);
295 InSequence dummy;
296 EXPECT_CALL(*gl_,
297 AttachShader(kServiceProgramId, kServiceVertexShaderId))
298 .Times(1)
299 .RetiresOnSaturation();
300 EXPECT_CALL(*gl_,
301 AttachShader(kServiceProgramId, kServiceFragmentShaderId))
302 .Times(1)
303 .RetiresOnSaturation();
304 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
305 .WillOnce(SetArgumentPointee<2>(1));
306 EXPECT_CALL(*gl_,
307 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
308 .WillOnce(SetArgumentPointee<2>(0))
309 .RetiresOnSaturation();
310 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _))
311 .WillOnce(SetArgumentPointee<2>(0));
312 EXPECT_CALL(
313 *gl_,
314 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _))
315 .WillOnce(SetArgumentPointee<2>(0));
316 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _))
317 .WillOnce(SetArgumentPointee<2>(0));
318 EXPECT_CALL(
319 *gl_,
320 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _))
321 .WillOnce(SetArgumentPointee<2>(0));
323 cmds::AttachShader attach_cmd;
324 attach_cmd.Init(client_program_id_, kClientVertexShaderId);
325 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
327 attach_cmd.Init(client_program_id_, kClientFragmentShaderId);
328 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
331 template <>
332 void GLES2DecoderTestBase::SpecializedSetup<cmds::UseProgram, 0>(
333 bool /* valid */) {
334 // Needs the same setup as LinkProgram.
335 SpecializedSetup<cmds::LinkProgram, 0>(false);
337 EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId))
338 .Times(1)
339 .RetiresOnSaturation();
341 cmds::LinkProgram link_cmd;
342 link_cmd.Init(client_program_id_);
343 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
346 template <>
347 void GLES2DecoderTestBase::SpecializedSetup<cmds::ValidateProgram, 0>(
348 bool /* valid */) {
349 // Needs the same setup as LinkProgram.
350 SpecializedSetup<cmds::LinkProgram, 0>(false);
352 EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId))
353 .Times(1)
354 .RetiresOnSaturation();
356 cmds::LinkProgram link_cmd;
357 link_cmd.Init(client_program_id_);
358 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
360 EXPECT_CALL(*gl_,
361 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
362 .WillOnce(SetArgumentPointee<2>(0))
363 .RetiresOnSaturation();
366 template <>
367 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1f, 0>(
368 bool /* valid */) {
369 SetupShaderForUniform(GL_FLOAT);
372 template <>
373 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1fvImmediate, 0>(
374 bool /* valid */) {
375 SetupShaderForUniform(GL_FLOAT);
378 template <>
379 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1ivImmediate, 0>(
380 bool /* valid */) {
381 SetupShaderForUniform(GL_INT);
384 template <>
385 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2f, 0>(
386 bool /* valid */) {
387 SetupShaderForUniform(GL_FLOAT_VEC2);
390 template <>
391 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2i, 0>(
392 bool /* valid */) {
393 SetupShaderForUniform(GL_INT_VEC2);
396 template <>
397 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2fvImmediate, 0>(
398 bool /* valid */) {
399 SetupShaderForUniform(GL_FLOAT_VEC2);
402 template <>
403 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2ivImmediate, 0>(
404 bool /* valid */) {
405 SetupShaderForUniform(GL_INT_VEC2);
408 template <>
409 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3f, 0>(
410 bool /* valid */) {
411 SetupShaderForUniform(GL_FLOAT_VEC3);
414 template <>
415 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3i, 0>(
416 bool /* valid */) {
417 SetupShaderForUniform(GL_INT_VEC3);
420 template <>
421 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3fvImmediate, 0>(
422 bool /* valid */) {
423 SetupShaderForUniform(GL_FLOAT_VEC3);
426 template <>
427 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3ivImmediate, 0>(
428 bool /* valid */) {
429 SetupShaderForUniform(GL_INT_VEC3);
432 template <>
433 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4f, 0>(
434 bool /* valid */) {
435 SetupShaderForUniform(GL_FLOAT_VEC4);
438 template <>
439 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4i, 0>(
440 bool /* valid */) {
441 SetupShaderForUniform(GL_INT_VEC4);
444 template <>
445 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4fvImmediate, 0>(
446 bool /* valid */) {
447 SetupShaderForUniform(GL_FLOAT_VEC4);
450 template <>
451 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4ivImmediate, 0>(
452 bool /* valid */) {
453 SetupShaderForUniform(GL_INT_VEC4);
456 template <>
457 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(
458 bool /* valid */) {
459 SetupShaderForUniform(GL_FLOAT_MAT2);
462 template <>
463 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix3fvImmediate, 0>(
464 bool /* valid */) {
465 SetupShaderForUniform(GL_FLOAT_MAT3);
468 template <>
469 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>(
470 bool /* valid */) {
471 SetupShaderForUniform(GL_FLOAT_MAT4);
474 template <>
475 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterf, 0>(
476 bool /* valid */) {
477 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
480 template <>
481 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameteri, 0>(
482 bool /* valid */) {
483 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
486 template <>
487 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterfvImmediate, 0>(
488 bool /* valid */) {
489 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
492 template <>
493 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterivImmediate, 0>(
494 bool /* valid */) {
495 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
498 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h"
500 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT) {
501 TestAcceptedUniform(GL_INT, Program::kUniform1i);
504 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC2) {
505 TestAcceptedUniform(GL_INT_VEC2, Program::kUniform2i);
508 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC3) {
509 TestAcceptedUniform(GL_INT_VEC3, Program::kUniform3i);
512 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC4) {
513 TestAcceptedUniform(GL_INT_VEC4, Program::kUniform4i);
516 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL) {
517 TestAcceptedUniform(GL_BOOL, Program::kUniform1i | Program::kUniform1f);
520 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC2) {
521 TestAcceptedUniform(GL_BOOL_VEC2, Program::kUniform2i | Program::kUniform2f);
524 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC3) {
525 TestAcceptedUniform(GL_BOOL_VEC3, Program::kUniform3i | Program::kUniform3f);
528 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC4) {
529 TestAcceptedUniform(GL_BOOL_VEC4, Program::kUniform4i | Program::kUniform4f);
532 TEST_P(GLES2DecoderTest2, AcceptsUniformTypeFLOAT) {
533 TestAcceptedUniform(GL_FLOAT, Program::kUniform1f);
536 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC2) {
537 TestAcceptedUniform(GL_FLOAT_VEC2, Program::kUniform2f);
540 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC3) {
541 TestAcceptedUniform(GL_FLOAT_VEC3, Program::kUniform3f);
544 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC4) {
545 TestAcceptedUniform(GL_FLOAT_VEC4, Program::kUniform4f);
548 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT2) {
549 TestAcceptedUniform(GL_FLOAT_MAT2, Program::kUniformMatrix2f);
552 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT3) {
553 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f);
556 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) {
557 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f);
560 } // namespace gles2
561 } // namespace gpu