Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / gpu / command_buffer / service / gles2_cmd_decoder_unittest_2.cc
blob2b471b9722e17b18d13d0882ba8d9d0e5d872220
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<
256 cmds::GetRenderbufferParameteriv, 0>(
257 bool /* valid */) {
258 DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_,
259 kServiceRenderbufferId);
262 template <>
263 void GLES2DecoderTestBase::SpecializedSetup<cmds::RenderbufferStorage, 0>(
264 bool valid) {
265 DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_,
266 kServiceRenderbufferId);
267 if (valid) {
268 EnsureRenderbufferBound(false);
269 EXPECT_CALL(*gl_, GetError())
270 .WillOnce(Return(GL_NO_ERROR))
271 .RetiresOnSaturation();
272 EXPECT_CALL(*gl_,
273 RenderbufferStorageEXT(GL_RENDERBUFFER, _, 3, 4))
274 .Times(1)
275 .RetiresOnSaturation();
276 EXPECT_CALL(*gl_, GetError())
277 .WillOnce(Return(GL_NO_ERROR))
278 .RetiresOnSaturation();
282 template <>
283 void GLES2DecoderTestBase::SpecializedSetup<cmds::GenQueriesEXTImmediate, 0>(
284 bool valid) {
285 if (!valid) {
286 // Make the client_query_id_ so that trying to make it again
287 // will fail.
288 cmds::GenQueriesEXTImmediate& cmd =
289 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
290 cmd.Init(1, &client_query_id_);
291 EXPECT_EQ(error::kNoError,
292 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
296 template <>
297 void GLES2DecoderTestBase::SpecializedSetup<cmds::DeleteQueriesEXTImmediate, 0>(
298 bool valid) {
299 if (valid) {
300 // Make the client_query_id_ so that trying to delete it will succeed.
301 cmds::GenQueriesEXTImmediate& cmd =
302 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
303 cmd.Init(1, &client_query_id_);
304 EXPECT_EQ(error::kNoError,
305 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
309 template <>
310 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(
311 bool /* valid */) {
312 const GLuint kClientVertexShaderId = 5001;
313 const GLuint kServiceVertexShaderId = 6001;
314 const GLuint kClientFragmentShaderId = 5002;
315 const GLuint kServiceFragmentShaderId = 6002;
316 DoCreateShader(
317 GL_VERTEX_SHADER, kClientVertexShaderId, kServiceVertexShaderId);
318 DoCreateShader(
319 GL_FRAGMENT_SHADER, kClientFragmentShaderId, kServiceFragmentShaderId);
321 TestHelper::SetShaderStates(
322 gl_.get(), GetShader(kClientVertexShaderId), true);
323 TestHelper::SetShaderStates(
324 gl_.get(), GetShader(kClientFragmentShaderId), true);
326 InSequence dummy;
327 EXPECT_CALL(*gl_,
328 AttachShader(kServiceProgramId, kServiceVertexShaderId))
329 .Times(1)
330 .RetiresOnSaturation();
331 EXPECT_CALL(*gl_,
332 AttachShader(kServiceProgramId, kServiceFragmentShaderId))
333 .Times(1)
334 .RetiresOnSaturation();
335 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
336 .WillOnce(SetArgumentPointee<2>(1));
337 EXPECT_CALL(*gl_,
338 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
339 .WillOnce(SetArgumentPointee<2>(0))
340 .RetiresOnSaturation();
341 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _))
342 .WillOnce(SetArgumentPointee<2>(0));
343 EXPECT_CALL(
344 *gl_,
345 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _))
346 .WillOnce(SetArgumentPointee<2>(0));
347 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _))
348 .WillOnce(SetArgumentPointee<2>(0));
349 EXPECT_CALL(
350 *gl_,
351 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _))
352 .WillOnce(SetArgumentPointee<2>(0));
354 cmds::AttachShader attach_cmd;
355 attach_cmd.Init(client_program_id_, kClientVertexShaderId);
356 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
358 attach_cmd.Init(client_program_id_, kClientFragmentShaderId);
359 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
362 template <>
363 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1f, 0>(
364 bool /* valid */) {
365 SetupShaderForUniform(GL_FLOAT);
368 template <>
369 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1fvImmediate, 0>(
370 bool /* valid */) {
371 SetupShaderForUniform(GL_FLOAT);
374 template <>
375 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1ivImmediate, 0>(
376 bool /* valid */) {
377 SetupShaderForUniform(GL_INT);
380 template <>
381 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2f, 0>(
382 bool /* valid */) {
383 SetupShaderForUniform(GL_FLOAT_VEC2);
386 template <>
387 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2i, 0>(
388 bool /* valid */) {
389 SetupShaderForUniform(GL_INT_VEC2);
392 template <>
393 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2fvImmediate, 0>(
394 bool /* valid */) {
395 SetupShaderForUniform(GL_FLOAT_VEC2);
398 template <>
399 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2ivImmediate, 0>(
400 bool /* valid */) {
401 SetupShaderForUniform(GL_INT_VEC2);
404 template <>
405 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3f, 0>(
406 bool /* valid */) {
407 SetupShaderForUniform(GL_FLOAT_VEC3);
410 template <>
411 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3i, 0>(
412 bool /* valid */) {
413 SetupShaderForUniform(GL_INT_VEC3);
416 template <>
417 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3fvImmediate, 0>(
418 bool /* valid */) {
419 SetupShaderForUniform(GL_FLOAT_VEC3);
422 template <>
423 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3ivImmediate, 0>(
424 bool /* valid */) {
425 SetupShaderForUniform(GL_INT_VEC3);
428 template <>
429 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4f, 0>(
430 bool /* valid */) {
431 SetupShaderForUniform(GL_FLOAT_VEC4);
434 template <>
435 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4i, 0>(
436 bool /* valid */) {
437 SetupShaderForUniform(GL_INT_VEC4);
440 template <>
441 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4fvImmediate, 0>(
442 bool /* valid */) {
443 SetupShaderForUniform(GL_FLOAT_VEC4);
446 template <>
447 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4ivImmediate, 0>(
448 bool /* valid */) {
449 SetupShaderForUniform(GL_INT_VEC4);
452 template <>
453 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(
454 bool /* valid */) {
455 SetupShaderForUniform(GL_FLOAT_MAT2);
458 template <>
459 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterf, 0>(
460 bool /* valid */) {
461 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
464 template <>
465 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameteri, 0>(
466 bool /* valid */) {
467 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
470 template <>
471 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterfvImmediate, 0>(
472 bool /* valid */) {
473 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
476 template <>
477 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterivImmediate, 0>(
478 bool /* valid */) {
479 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
482 template <>
483 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribiv, 0>(
484 bool valid) {
485 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
486 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0);
487 if (valid) {
488 EXPECT_CALL(*gl_, GetError())
489 .WillOnce(Return(GL_NO_ERROR))
490 .WillOnce(Return(GL_NO_ERROR))
491 .RetiresOnSaturation();
495 template <>
496 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribfv, 0>(
497 bool valid) {
498 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
499 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0);
500 if (valid) {
501 EXPECT_CALL(*gl_, GetError())
502 .WillOnce(Return(GL_NO_ERROR))
503 .WillOnce(Return(GL_NO_ERROR))
504 .RetiresOnSaturation();
508 template <>
509 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribIiv, 0>(
510 bool valid) {
511 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
512 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0);
513 if (valid) {
514 EXPECT_CALL(*gl_, GetError())
515 .WillOnce(Return(GL_NO_ERROR))
516 .WillOnce(Return(GL_NO_ERROR))
517 .RetiresOnSaturation();
521 template <>
522 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribIuiv, 0>(
523 bool valid) {
524 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
525 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0);
526 if (valid) {
527 EXPECT_CALL(*gl_, GetError())
528 .WillOnce(Return(GL_NO_ERROR))
529 .WillOnce(Return(GL_NO_ERROR))
530 .RetiresOnSaturation();
535 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h"
537 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT) {
538 TestAcceptedUniform(GL_INT, Program::kUniform1i);
541 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC2) {
542 TestAcceptedUniform(GL_INT_VEC2, Program::kUniform2i);
545 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC3) {
546 TestAcceptedUniform(GL_INT_VEC3, Program::kUniform3i);
549 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_INT_VEC4) {
550 TestAcceptedUniform(GL_INT_VEC4, Program::kUniform4i);
553 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL) {
554 TestAcceptedUniform(GL_BOOL, Program::kUniform1i | Program::kUniform1f);
557 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC2) {
558 TestAcceptedUniform(GL_BOOL_VEC2, Program::kUniform2i | Program::kUniform2f);
561 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC3) {
562 TestAcceptedUniform(GL_BOOL_VEC3, Program::kUniform3i | Program::kUniform3f);
565 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_BOOL_VEC4) {
566 TestAcceptedUniform(GL_BOOL_VEC4, Program::kUniform4i | Program::kUniform4f);
569 TEST_P(GLES2DecoderTest2, AcceptsUniformTypeFLOAT) {
570 TestAcceptedUniform(GL_FLOAT, Program::kUniform1f);
573 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC2) {
574 TestAcceptedUniform(GL_FLOAT_VEC2, Program::kUniform2f);
577 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC3) {
578 TestAcceptedUniform(GL_FLOAT_VEC3, Program::kUniform3f);
581 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_VEC4) {
582 TestAcceptedUniform(GL_FLOAT_VEC4, Program::kUniform4f);
585 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT2) {
586 TestAcceptedUniform(GL_FLOAT_MAT2, Program::kUniformMatrix2f);
589 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT3) {
590 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f);
593 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) {
594 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f);
597 } // namespace gles2
598 } // namespace gpu