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 "gpu/command_buffer/service/test_helper.h"
14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/gl/gl_mock.h"
17 using ::gfx::MockGLInterface
;
19 using ::testing::AnyNumber
;
20 using ::testing::DoAll
;
21 using ::testing::InSequence
;
22 using ::testing::MatcherCast
;
23 using ::testing::Pointee
;
24 using ::testing::Return
;
25 using ::testing::SetArrayArgument
;
26 using ::testing::SetArgumentPointee
;
27 using ::testing::StrEq
;
32 class GLES2DecoderTest2
: public GLES2DecoderTestBase
{
34 GLES2DecoderTest2() { }
36 void TestAcceptedUniform(GLenum uniform_type
, uint32 accepts_apis
) {
37 SetupShaderForUniform(uniform_type
);
38 bool valid_uniform
= false;
40 EXPECT_CALL(*gl_
, Uniform1i(1, _
)).Times(AnyNumber());
41 EXPECT_CALL(*gl_
, Uniform1iv(1, _
, _
)).Times(AnyNumber());
42 EXPECT_CALL(*gl_
, Uniform2iv(1, _
, _
)).Times(AnyNumber());
43 EXPECT_CALL(*gl_
, Uniform3iv(1, _
, _
)).Times(AnyNumber());
44 EXPECT_CALL(*gl_
, Uniform4iv(1, _
, _
)).Times(AnyNumber());
45 EXPECT_CALL(*gl_
, Uniform1f(1, _
)).Times(AnyNumber());
46 EXPECT_CALL(*gl_
, Uniform1fv(1, _
, _
)).Times(AnyNumber());
47 EXPECT_CALL(*gl_
, Uniform2fv(1, _
, _
)).Times(AnyNumber());
48 EXPECT_CALL(*gl_
, Uniform3fv(1, _
, _
)).Times(AnyNumber());
49 EXPECT_CALL(*gl_
, Uniform4fv(1, _
, _
)).Times(AnyNumber());
50 EXPECT_CALL(*gl_
, UniformMatrix2fv(1, _
, _
, _
)).Times(AnyNumber());
51 EXPECT_CALL(*gl_
, UniformMatrix3fv(1, _
, _
, _
)).Times(AnyNumber());
52 EXPECT_CALL(*gl_
, UniformMatrix4fv(1, _
, _
, _
)).Times(AnyNumber());
55 valid_uniform
= accepts_apis
& Program::kUniform1i
;
58 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
59 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
64 valid_uniform
= accepts_apis
& Program::kUniform1i
;
65 cmds::Uniform1ivImmediate
& cmd
=
66 *GetImmediateAs
<cmds::Uniform1ivImmediate
>();
67 GLint data
[2][1] = {{0}};
68 cmd
.Init(1, 2, &data
[0][0]);
69 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
70 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
75 valid_uniform
= accepts_apis
& Program::kUniform2i
;
78 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
79 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
84 valid_uniform
= accepts_apis
& Program::kUniform2i
;
85 cmds::Uniform2ivImmediate
& cmd
=
86 *GetImmediateAs
<cmds::Uniform2ivImmediate
>();
87 GLint data
[2][2] = {{0}};
88 cmd
.Init(1, 2, &data
[0][0]);
89 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
90 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
95 valid_uniform
= accepts_apis
& Program::kUniform3i
;
98 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
99 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
104 valid_uniform
= accepts_apis
& Program::kUniform3i
;
105 cmds::Uniform3ivImmediate
& cmd
=
106 *GetImmediateAs
<cmds::Uniform3ivImmediate
>();
107 GLint data
[2][3] = {{0}};
108 cmd
.Init(1, 2, &data
[0][0]);
109 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
110 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
115 valid_uniform
= accepts_apis
& Program::kUniform4i
;
117 cmd
.Init(1, 2, 3, 4, 5);
118 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
119 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
124 valid_uniform
= accepts_apis
& Program::kUniform4i
;
125 cmds::Uniform4ivImmediate
& cmd
=
126 *GetImmediateAs
<cmds::Uniform4ivImmediate
>();
127 GLint data
[2][4] = {{0}};
128 cmd
.Init(1, 2, &data
[0][0]);
129 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
130 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
137 valid_uniform
= accepts_apis
& Program::kUniform1f
;
140 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
141 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
146 valid_uniform
= accepts_apis
& Program::kUniform1f
;
147 cmds::Uniform1fvImmediate
& cmd
=
148 *GetImmediateAs
<cmds::Uniform1fvImmediate
>();
149 GLfloat data
[2][1] = {{0.0f
}};
150 cmd
.Init(1, 2, &data
[0][0]);
151 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
152 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
157 valid_uniform
= accepts_apis
& Program::kUniform2f
;
160 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
161 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
166 valid_uniform
= accepts_apis
& Program::kUniform2f
;
167 cmds::Uniform2fvImmediate
& cmd
=
168 *GetImmediateAs
<cmds::Uniform2fvImmediate
>();
169 GLfloat data
[2][2] = {{0.0f
}};
170 cmd
.Init(1, 2, &data
[0][0]);
171 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
172 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
177 valid_uniform
= accepts_apis
& Program::kUniform3f
;
179 cmd
.Init(1, 2, 3, 4);
180 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
181 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
186 valid_uniform
= accepts_apis
& Program::kUniform3f
;
187 cmds::Uniform3fvImmediate
& cmd
=
188 *GetImmediateAs
<cmds::Uniform3fvImmediate
>();
189 GLfloat data
[2][3] = {{0.0f
}};
190 cmd
.Init(1, 2, &data
[0][0]);
191 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
192 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
197 valid_uniform
= accepts_apis
& Program::kUniform4f
;
199 cmd
.Init(1, 2, 3, 4, 5);
200 EXPECT_EQ(error::kNoError
, ExecuteCmd(cmd
));
201 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
206 valid_uniform
= accepts_apis
& Program::kUniform4f
;
207 cmds::Uniform4fvImmediate
& cmd
=
208 *GetImmediateAs
<cmds::Uniform4fvImmediate
>();
209 GLfloat data
[2][4] = {{0.0f
}};
210 cmd
.Init(1, 2, &data
[0][0]);
211 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
212 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
217 valid_uniform
= accepts_apis
& Program::kUniformMatrix2f
;
218 cmds::UniformMatrix2fvImmediate
& cmd
=
219 *GetImmediateAs
<cmds::UniformMatrix2fvImmediate
>();
220 GLfloat data
[2][2 * 2] = {{0.0f
}};
222 cmd
.Init(1, 2, &data
[0][0]);
223 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
224 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
229 valid_uniform
= accepts_apis
& Program::kUniformMatrix3f
;
230 cmds::UniformMatrix3fvImmediate
& cmd
=
231 *GetImmediateAs
<cmds::UniformMatrix3fvImmediate
>();
232 GLfloat data
[2][3 * 3] = {{0.0f
}};
233 cmd
.Init(1, 2, &data
[0][0]);
234 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
235 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
240 valid_uniform
= accepts_apis
& Program::kUniformMatrix4f
;
241 cmds::UniformMatrix4fvImmediate
& cmd
=
242 *GetImmediateAs
<cmds::UniformMatrix4fvImmediate
>();
243 GLfloat data
[2][4 * 4] = {{0.0f
}};
244 cmd
.Init(1, 2, &data
[0][0]);
245 EXPECT_EQ(error::kNoError
, ExecuteImmediateCmd(cmd
, sizeof(data
)));
246 EXPECT_EQ(valid_uniform
? GL_NO_ERROR
: GL_INVALID_OPERATION
,
252 INSTANTIATE_TEST_CASE_P(Service
, GLES2DecoderTest2
, ::testing::Bool());
255 void GLES2DecoderTestBase::SpecializedSetup
<cmds::RenderbufferStorage
, 0>(
257 DoBindRenderbuffer(GL_RENDERBUFFER
, client_renderbuffer_id_
,
258 kServiceRenderbufferId
);
260 EnsureRenderbufferBound(false);
261 EXPECT_CALL(*gl_
, GetError())
262 .WillOnce(Return(GL_NO_ERROR
))
263 .RetiresOnSaturation();
265 RenderbufferStorageEXT(GL_RENDERBUFFER
, _
, 3, 4))
267 .RetiresOnSaturation();
268 EXPECT_CALL(*gl_
, GetError())
269 .WillOnce(Return(GL_NO_ERROR
))
270 .RetiresOnSaturation();
275 void GLES2DecoderTestBase::SpecializedSetup
<cmds::GenQueriesEXTImmediate
, 0>(
278 // Make the client_query_id_ so that trying to make it again
280 cmds::GenQueriesEXTImmediate
& cmd
=
281 *GetImmediateAs
<cmds::GenQueriesEXTImmediate
>();
282 cmd
.Init(1, &client_query_id_
);
283 EXPECT_EQ(error::kNoError
,
284 ExecuteImmediateCmd(cmd
, sizeof(client_query_id_
)));
289 void GLES2DecoderTestBase::SpecializedSetup
<cmds::DeleteQueriesEXTImmediate
, 0>(
292 // Make the client_query_id_ so that trying to delete it will succeed.
293 cmds::GenQueriesEXTImmediate
& cmd
=
294 *GetImmediateAs
<cmds::GenQueriesEXTImmediate
>();
295 cmd
.Init(1, &client_query_id_
);
296 EXPECT_EQ(error::kNoError
,
297 ExecuteImmediateCmd(cmd
, sizeof(client_query_id_
)));
302 void GLES2DecoderTestBase::SpecializedSetup
<cmds::LinkProgram
, 0>(
304 const GLuint kClientVertexShaderId
= 5001;
305 const GLuint kServiceVertexShaderId
= 6001;
306 const GLuint kClientFragmentShaderId
= 5002;
307 const GLuint kServiceFragmentShaderId
= 6002;
309 GL_VERTEX_SHADER
, kClientVertexShaderId
, kServiceVertexShaderId
);
311 GL_FRAGMENT_SHADER
, kClientFragmentShaderId
, kServiceFragmentShaderId
);
313 TestHelper::SetShaderStates(
314 gl_
.get(), GetShader(kClientVertexShaderId
), true);
315 TestHelper::SetShaderStates(
316 gl_
.get(), GetShader(kClientFragmentShaderId
), true);
320 AttachShader(kServiceProgramId
, kServiceVertexShaderId
))
322 .RetiresOnSaturation();
324 AttachShader(kServiceProgramId
, kServiceFragmentShaderId
))
326 .RetiresOnSaturation();
327 EXPECT_CALL(*gl_
, GetProgramiv(kServiceProgramId
, GL_LINK_STATUS
, _
))
328 .WillOnce(SetArgumentPointee
<2>(1));
330 GetProgramiv(kServiceProgramId
, GL_INFO_LOG_LENGTH
, _
))
331 .WillOnce(SetArgumentPointee
<2>(0))
332 .RetiresOnSaturation();
333 EXPECT_CALL(*gl_
, GetProgramiv(kServiceProgramId
, GL_ACTIVE_ATTRIBUTES
, _
))
334 .WillOnce(SetArgumentPointee
<2>(0));
337 GetProgramiv(kServiceProgramId
, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
, _
))
338 .WillOnce(SetArgumentPointee
<2>(0));
339 EXPECT_CALL(*gl_
, GetProgramiv(kServiceProgramId
, GL_ACTIVE_UNIFORMS
, _
))
340 .WillOnce(SetArgumentPointee
<2>(0));
343 GetProgramiv(kServiceProgramId
, GL_ACTIVE_UNIFORM_MAX_LENGTH
, _
))
344 .WillOnce(SetArgumentPointee
<2>(0));
346 cmds::AttachShader attach_cmd
;
347 attach_cmd
.Init(client_program_id_
, kClientVertexShaderId
);
348 EXPECT_EQ(error::kNoError
, ExecuteCmd(attach_cmd
));
350 attach_cmd
.Init(client_program_id_
, kClientFragmentShaderId
);
351 EXPECT_EQ(error::kNoError
, ExecuteCmd(attach_cmd
));
355 void GLES2DecoderTestBase::SpecializedSetup
<cmds::UseProgram
, 0>(
357 // Needs the same setup as LinkProgram.
358 SpecializedSetup
<cmds::LinkProgram
, 0>(false);
360 EXPECT_CALL(*gl_
, LinkProgram(kServiceProgramId
))
362 .RetiresOnSaturation();
364 cmds::LinkProgram link_cmd
;
365 link_cmd
.Init(client_program_id_
);
366 EXPECT_EQ(error::kNoError
, ExecuteCmd(link_cmd
));
370 void GLES2DecoderTestBase::SpecializedSetup
<cmds::ValidateProgram
, 0>(
372 // Needs the same setup as LinkProgram.
373 SpecializedSetup
<cmds::LinkProgram
, 0>(false);
375 EXPECT_CALL(*gl_
, LinkProgram(kServiceProgramId
))
377 .RetiresOnSaturation();
379 cmds::LinkProgram link_cmd
;
380 link_cmd
.Init(client_program_id_
);
381 EXPECT_EQ(error::kNoError
, ExecuteCmd(link_cmd
));
384 GetProgramiv(kServiceProgramId
, GL_INFO_LOG_LENGTH
, _
))
385 .WillOnce(SetArgumentPointee
<2>(0))
386 .RetiresOnSaturation();
390 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform1f
, 0>(
392 SetupShaderForUniform(GL_FLOAT
);
396 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform1fvImmediate
, 0>(
398 SetupShaderForUniform(GL_FLOAT
);
402 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform1ivImmediate
, 0>(
404 SetupShaderForUniform(GL_INT
);
408 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform2f
, 0>(
410 SetupShaderForUniform(GL_FLOAT_VEC2
);
414 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform2i
, 0>(
416 SetupShaderForUniform(GL_INT_VEC2
);
420 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform2fvImmediate
, 0>(
422 SetupShaderForUniform(GL_FLOAT_VEC2
);
426 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform2ivImmediate
, 0>(
428 SetupShaderForUniform(GL_INT_VEC2
);
432 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform3f
, 0>(
434 SetupShaderForUniform(GL_FLOAT_VEC3
);
438 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform3i
, 0>(
440 SetupShaderForUniform(GL_INT_VEC3
);
444 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform3fvImmediate
, 0>(
446 SetupShaderForUniform(GL_FLOAT_VEC3
);
450 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform3ivImmediate
, 0>(
452 SetupShaderForUniform(GL_INT_VEC3
);
456 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform4f
, 0>(
458 SetupShaderForUniform(GL_FLOAT_VEC4
);
462 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform4i
, 0>(
464 SetupShaderForUniform(GL_INT_VEC4
);
468 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform4fvImmediate
, 0>(
470 SetupShaderForUniform(GL_FLOAT_VEC4
);
474 void GLES2DecoderTestBase::SpecializedSetup
<cmds::Uniform4ivImmediate
, 0>(
476 SetupShaderForUniform(GL_INT_VEC4
);
480 void GLES2DecoderTestBase::SpecializedSetup
<cmds::UniformMatrix2fvImmediate
, 0>(
482 SetupShaderForUniform(GL_FLOAT_MAT2
);
486 void GLES2DecoderTestBase::SpecializedSetup
<cmds::UniformMatrix3fvImmediate
, 0>(
488 SetupShaderForUniform(GL_FLOAT_MAT3
);
492 void GLES2DecoderTestBase::SpecializedSetup
<cmds::UniformMatrix4fvImmediate
, 0>(
494 SetupShaderForUniform(GL_FLOAT_MAT4
);
498 void GLES2DecoderTestBase::SpecializedSetup
<cmds::TexParameterf
, 0>(
500 DoBindTexture(GL_TEXTURE_2D
, client_texture_id_
, kServiceTextureId
);
504 void GLES2DecoderTestBase::SpecializedSetup
<cmds::TexParameteri
, 0>(
506 DoBindTexture(GL_TEXTURE_2D
, client_texture_id_
, kServiceTextureId
);
510 void GLES2DecoderTestBase::SpecializedSetup
<cmds::TexParameterfvImmediate
, 0>(
512 DoBindTexture(GL_TEXTURE_2D
, client_texture_id_
, kServiceTextureId
);
516 void GLES2DecoderTestBase::SpecializedSetup
<cmds::TexParameterivImmediate
, 0>(
518 DoBindTexture(GL_TEXTURE_2D
, client_texture_id_
, kServiceTextureId
);
522 void GLES2DecoderTestBase::SpecializedSetup
<cmds::GetVertexAttribiv
, 0>(
524 DoBindBuffer(GL_ARRAY_BUFFER
, client_buffer_id_
, kServiceBufferId
);
525 DoVertexAttribPointer(1, 1, GL_FLOAT
, 0, 0);
527 EXPECT_CALL(*gl_
, GetError())
528 .WillOnce(Return(GL_NO_ERROR
))
529 .WillOnce(Return(GL_NO_ERROR
))
530 .RetiresOnSaturation();
535 void GLES2DecoderTestBase::SpecializedSetup
<cmds::GetVertexAttribfv
, 0>(
537 DoBindBuffer(GL_ARRAY_BUFFER
, client_buffer_id_
, kServiceBufferId
);
538 DoVertexAttribPointer(1, 1, GL_FLOAT
, 0, 0);
540 EXPECT_CALL(*gl_
, GetError())
541 .WillOnce(Return(GL_NO_ERROR
))
542 .WillOnce(Return(GL_NO_ERROR
))
543 .RetiresOnSaturation();
548 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h"
550 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_INT
) {
551 TestAcceptedUniform(GL_INT
, Program::kUniform1i
);
554 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_INT_VEC2
) {
555 TestAcceptedUniform(GL_INT_VEC2
, Program::kUniform2i
);
558 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_INT_VEC3
) {
559 TestAcceptedUniform(GL_INT_VEC3
, Program::kUniform3i
);
562 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_INT_VEC4
) {
563 TestAcceptedUniform(GL_INT_VEC4
, Program::kUniform4i
);
566 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_BOOL
) {
567 TestAcceptedUniform(GL_BOOL
, Program::kUniform1i
| Program::kUniform1f
);
570 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_BOOL_VEC2
) {
571 TestAcceptedUniform(GL_BOOL_VEC2
, Program::kUniform2i
| Program::kUniform2f
);
574 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_BOOL_VEC3
) {
575 TestAcceptedUniform(GL_BOOL_VEC3
, Program::kUniform3i
| Program::kUniform3f
);
578 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_BOOL_VEC4
) {
579 TestAcceptedUniform(GL_BOOL_VEC4
, Program::kUniform4i
| Program::kUniform4f
);
582 TEST_P(GLES2DecoderTest2
, AcceptsUniformTypeFLOAT
) {
583 TestAcceptedUniform(GL_FLOAT
, Program::kUniform1f
);
586 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_FLOAT_VEC2
) {
587 TestAcceptedUniform(GL_FLOAT_VEC2
, Program::kUniform2f
);
590 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_FLOAT_VEC3
) {
591 TestAcceptedUniform(GL_FLOAT_VEC3
, Program::kUniform3f
);
594 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_FLOAT_VEC4
) {
595 TestAcceptedUniform(GL_FLOAT_VEC4
, Program::kUniform4f
);
598 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_FLOAT_MAT2
) {
599 TestAcceptedUniform(GL_FLOAT_MAT2
, Program::kUniformMatrix2f
);
602 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_FLOAT_MAT3
) {
603 TestAcceptedUniform(GL_FLOAT_MAT3
, Program::kUniformMatrix3f
);
606 TEST_P(GLES2DecoderTest2
, AcceptsUniform_GL_FLOAT_MAT4
) {
607 TestAcceptedUniform(GL_FLOAT_MAT4
, Program::kUniformMatrix4f
);