Handle account removal correctly on all platforms.
[chromium-blink-merge.git] / gpu / command_buffer / service / gles2_cmd_decoder_unittest_2.cc
blob1d8ac4076de6f4d06e0d54701ed63c718e4541cc
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;
18 using ::testing::_;
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;
29 namespace gpu {
30 namespace gles2 {
32 class GLES2DecoderTest2 : public GLES2DecoderTestBase {
33 public:
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;
56 cmds::Uniform1i cmd;
57 cmd.Init(1, 2);
58 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
59 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
60 GetGLError());
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,
71 GetGLError());
75 valid_uniform = accepts_apis & Program::kUniform2i;
76 cmds::Uniform2i cmd;
77 cmd.Init(1, 2, 3);
78 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
79 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
80 GetGLError());
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,
91 GetGLError());
95 valid_uniform = accepts_apis & Program::kUniform3i;
96 cmds::Uniform3i cmd;
97 cmd.Init(1, 2, 3, 4);
98 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
99 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
100 GetGLError());
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,
111 GetGLError());
115 valid_uniform = accepts_apis & Program::kUniform4i;
116 cmds::Uniform4i cmd;
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,
120 GetGLError());
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,
131 GetGLError());
134 ////////////////////
137 valid_uniform = accepts_apis & Program::kUniform1f;
138 cmds::Uniform1f cmd;
139 cmd.Init(1, 2);
140 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
141 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
142 GetGLError());
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,
153 GetGLError());
157 valid_uniform = accepts_apis & Program::kUniform2f;
158 cmds::Uniform2f cmd;
159 cmd.Init(1, 2, 3);
160 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
161 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
162 GetGLError());
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,
173 GetGLError());
177 valid_uniform = accepts_apis & Program::kUniform3f;
178 cmds::Uniform3f cmd;
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,
182 GetGLError());
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,
193 GetGLError());
197 valid_uniform = accepts_apis & Program::kUniform4f;
198 cmds::Uniform4f cmd;
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,
202 GetGLError());
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,
213 GetGLError());
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,
225 GetGLError());
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,
236 GetGLError());
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,
247 GetGLError());
252 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest2, ::testing::Bool());
254 template <>
255 void GLES2DecoderTestBase::SpecializedSetup<cmds::GenQueriesEXTImmediate, 0>(
256 bool valid) {
257 if (!valid) {
258 // Make the client_query_id_ so that trying to make it again
259 // will fail.
260 cmds::GenQueriesEXTImmediate& cmd =
261 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
262 cmd.Init(1, &client_query_id_);
263 EXPECT_EQ(error::kNoError,
264 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
268 template <>
269 void GLES2DecoderTestBase::SpecializedSetup<cmds::DeleteQueriesEXTImmediate, 0>(
270 bool valid) {
271 if (valid) {
272 // Make the client_query_id_ so that trying to delete it will succeed.
273 cmds::GenQueriesEXTImmediate& cmd =
274 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
275 cmd.Init(1, &client_query_id_);
276 EXPECT_EQ(error::kNoError,
277 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
281 template <>
282 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(
283 bool /* valid */) {
284 const GLuint kClientVertexShaderId = 5001;
285 const GLuint kServiceVertexShaderId = 6001;
286 const GLuint kClientFragmentShaderId = 5002;
287 const GLuint kServiceFragmentShaderId = 6002;
288 DoCreateShader(
289 GL_VERTEX_SHADER, kClientVertexShaderId, kServiceVertexShaderId);
290 DoCreateShader(
291 GL_FRAGMENT_SHADER, kClientFragmentShaderId, kServiceFragmentShaderId);
293 TestHelper::SetShaderStates(
294 gl_.get(), GetShader(kClientVertexShaderId), true);
295 TestHelper::SetShaderStates(
296 gl_.get(), GetShader(kClientFragmentShaderId), true);
298 InSequence dummy;
299 EXPECT_CALL(*gl_,
300 AttachShader(kServiceProgramId, kServiceVertexShaderId))
301 .Times(1)
302 .RetiresOnSaturation();
303 EXPECT_CALL(*gl_,
304 AttachShader(kServiceProgramId, kServiceFragmentShaderId))
305 .Times(1)
306 .RetiresOnSaturation();
307 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
308 .WillOnce(SetArgumentPointee<2>(1));
309 EXPECT_CALL(*gl_,
310 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
311 .WillOnce(SetArgumentPointee<2>(0))
312 .RetiresOnSaturation();
313 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _))
314 .WillOnce(SetArgumentPointee<2>(0));
315 EXPECT_CALL(
316 *gl_,
317 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _))
318 .WillOnce(SetArgumentPointee<2>(0));
319 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _))
320 .WillOnce(SetArgumentPointee<2>(0));
321 EXPECT_CALL(
322 *gl_,
323 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _))
324 .WillOnce(SetArgumentPointee<2>(0));
326 cmds::AttachShader attach_cmd;
327 attach_cmd.Init(client_program_id_, kClientVertexShaderId);
328 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
330 attach_cmd.Init(client_program_id_, kClientFragmentShaderId);
331 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
334 template <>
335 void GLES2DecoderTestBase::SpecializedSetup<cmds::UseProgram, 0>(
336 bool /* valid */) {
337 // Needs the same setup as LinkProgram.
338 SpecializedSetup<cmds::LinkProgram, 0>(false);
340 EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId))
341 .Times(1)
342 .RetiresOnSaturation();
344 cmds::LinkProgram link_cmd;
345 link_cmd.Init(client_program_id_);
346 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
349 template <>
350 void GLES2DecoderTestBase::SpecializedSetup<cmds::ValidateProgram, 0>(
351 bool /* valid */) {
352 // Needs the same setup as LinkProgram.
353 SpecializedSetup<cmds::LinkProgram, 0>(false);
355 EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId))
356 .Times(1)
357 .RetiresOnSaturation();
359 cmds::LinkProgram link_cmd;
360 link_cmd.Init(client_program_id_);
361 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
363 EXPECT_CALL(*gl_,
364 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
365 .WillOnce(SetArgumentPointee<2>(0))
366 .RetiresOnSaturation();
369 template <>
370 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1f, 0>(
371 bool /* valid */) {
372 SetupShaderForUniform(GL_FLOAT);
375 template <>
376 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1fvImmediate, 0>(
377 bool /* valid */) {
378 SetupShaderForUniform(GL_FLOAT);
381 template <>
382 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1ivImmediate, 0>(
383 bool /* valid */) {
384 SetupShaderForUniform(GL_INT);
387 template <>
388 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2f, 0>(
389 bool /* valid */) {
390 SetupShaderForUniform(GL_FLOAT_VEC2);
393 template <>
394 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2i, 0>(
395 bool /* valid */) {
396 SetupShaderForUniform(GL_INT_VEC2);
399 template <>
400 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2fvImmediate, 0>(
401 bool /* valid */) {
402 SetupShaderForUniform(GL_FLOAT_VEC2);
405 template <>
406 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2ivImmediate, 0>(
407 bool /* valid */) {
408 SetupShaderForUniform(GL_INT_VEC2);
411 template <>
412 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3f, 0>(
413 bool /* valid */) {
414 SetupShaderForUniform(GL_FLOAT_VEC3);
417 template <>
418 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3i, 0>(
419 bool /* valid */) {
420 SetupShaderForUniform(GL_INT_VEC3);
423 template <>
424 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3fvImmediate, 0>(
425 bool /* valid */) {
426 SetupShaderForUniform(GL_FLOAT_VEC3);
429 template <>
430 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3ivImmediate, 0>(
431 bool /* valid */) {
432 SetupShaderForUniform(GL_INT_VEC3);
435 template <>
436 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4f, 0>(
437 bool /* valid */) {
438 SetupShaderForUniform(GL_FLOAT_VEC4);
441 template <>
442 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4i, 0>(
443 bool /* valid */) {
444 SetupShaderForUniform(GL_INT_VEC4);
447 template <>
448 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4fvImmediate, 0>(
449 bool /* valid */) {
450 SetupShaderForUniform(GL_FLOAT_VEC4);
453 template <>
454 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4ivImmediate, 0>(
455 bool /* valid */) {
456 SetupShaderForUniform(GL_INT_VEC4);
459 template <>
460 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(
461 bool /* valid */) {
462 SetupShaderForUniform(GL_FLOAT_MAT2);
465 template <>
466 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix3fvImmediate, 0>(
467 bool /* valid */) {
468 SetupShaderForUniform(GL_FLOAT_MAT3);
471 template <>
472 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>(
473 bool /* valid */) {
474 SetupShaderForUniform(GL_FLOAT_MAT4);
477 template <>
478 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterf, 0>(
479 bool /* valid */) {
480 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
483 template <>
484 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameteri, 0>(
485 bool /* valid */) {
486 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
489 template <>
490 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterfvImmediate, 0>(
491 bool /* valid */) {
492 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
495 template <>
496 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterivImmediate, 0>(
497 bool /* valid */) {
498 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
501 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h"
503 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT) {
504 TestAcceptedUniform(GL_INT, Program::kUniform1i);
507 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC2) {
508 TestAcceptedUniform(GL_INT_VEC2, Program::kUniform2i);
511 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC3) {
512 TestAcceptedUniform(GL_INT_VEC3, Program::kUniform3i);
515 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC4) {
516 TestAcceptedUniform(GL_INT_VEC4, Program::kUniform4i);
519 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL) {
520 TestAcceptedUniform(GL_BOOL, Program::kUniform1i | Program::kUniform1f);
523 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC2) {
524 TestAcceptedUniform(GL_BOOL_VEC2, Program::kUniform2i | Program::kUniform2f);
527 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC3) {
528 TestAcceptedUniform(GL_BOOL_VEC3, Program::kUniform3i | Program::kUniform3f);
531 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC4) {
532 TestAcceptedUniform(GL_BOOL_VEC4, Program::kUniform4i | Program::kUniform4f);
535 TEST_P(GLES2DecoderTest2, AcceptsUniformTypeFLOAT) {
536 TestAcceptedUniform(GL_FLOAT, Program::kUniform1f);
539 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC2) {
540 TestAcceptedUniform(GL_FLOAT_VEC2, Program::kUniform2f);
543 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC3) {
544 TestAcceptedUniform(GL_FLOAT_VEC3, Program::kUniform3f);
547 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC4) {
548 TestAcceptedUniform(GL_FLOAT_VEC4, Program::kUniform4f);
551 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT2) {
552 TestAcceptedUniform(GL_FLOAT_MAT2, Program::kUniformMatrix2f);
555 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT3) {
556 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f);
559 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) {
560 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f);
563 } // namespace gles2
564 } // namespace gpu