Don't add an aura tooltip to bubble close buttons on Windows.
[chromium-blink-merge.git] / gpu / command_buffer / service / gles2_cmd_decoder_unittest_2.cc
blobcfd1c1a8cf6c712097a5f24a04769010f3c11e3e
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::RenderbufferStorage, 0>(
256 bool valid) {
257 DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_,
258 kServiceRenderbufferId);
259 if (valid) {
260 EnsureRenderbufferBound(false);
261 EXPECT_CALL(*gl_, GetError())
262 .WillOnce(Return(GL_NO_ERROR))
263 .RetiresOnSaturation();
264 EXPECT_CALL(*gl_,
265 RenderbufferStorageEXT(GL_RENDERBUFFER, _, 3, 4))
266 .Times(1)
267 .RetiresOnSaturation();
268 EXPECT_CALL(*gl_, GetError())
269 .WillOnce(Return(GL_NO_ERROR))
270 .RetiresOnSaturation();
274 template <>
275 void GLES2DecoderTestBase::SpecializedSetup<cmds::GenQueriesEXTImmediate, 0>(
276 bool valid) {
277 if (!valid) {
278 // Make the client_query_id_ so that trying to make it again
279 // will fail.
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_)));
288 template <>
289 void GLES2DecoderTestBase::SpecializedSetup<cmds::DeleteQueriesEXTImmediate, 0>(
290 bool valid) {
291 if (valid) {
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_)));
301 template <>
302 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(
303 bool /* valid */) {
304 const GLuint kClientVertexShaderId = 5001;
305 const GLuint kServiceVertexShaderId = 6001;
306 const GLuint kClientFragmentShaderId = 5002;
307 const GLuint kServiceFragmentShaderId = 6002;
308 DoCreateShader(
309 GL_VERTEX_SHADER, kClientVertexShaderId, kServiceVertexShaderId);
310 DoCreateShader(
311 GL_FRAGMENT_SHADER, kClientFragmentShaderId, kServiceFragmentShaderId);
313 TestHelper::SetShaderStates(
314 gl_.get(), GetShader(kClientVertexShaderId), true);
315 TestHelper::SetShaderStates(
316 gl_.get(), GetShader(kClientFragmentShaderId), true);
318 InSequence dummy;
319 EXPECT_CALL(*gl_,
320 AttachShader(kServiceProgramId, kServiceVertexShaderId))
321 .Times(1)
322 .RetiresOnSaturation();
323 EXPECT_CALL(*gl_,
324 AttachShader(kServiceProgramId, kServiceFragmentShaderId))
325 .Times(1)
326 .RetiresOnSaturation();
327 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
328 .WillOnce(SetArgumentPointee<2>(1));
329 EXPECT_CALL(*gl_,
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));
335 EXPECT_CALL(
336 *gl_,
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));
341 EXPECT_CALL(
342 *gl_,
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));
354 template <>
355 void GLES2DecoderTestBase::SpecializedSetup<cmds::UseProgram, 0>(
356 bool /* valid */) {
357 // Needs the same setup as LinkProgram.
358 SpecializedSetup<cmds::LinkProgram, 0>(false);
360 EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId))
361 .Times(1)
362 .RetiresOnSaturation();
364 cmds::LinkProgram link_cmd;
365 link_cmd.Init(client_program_id_);
366 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
369 template <>
370 void GLES2DecoderTestBase::SpecializedSetup<cmds::ValidateProgram, 0>(
371 bool /* valid */) {
372 // Needs the same setup as LinkProgram.
373 SpecializedSetup<cmds::LinkProgram, 0>(false);
375 EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId))
376 .Times(1)
377 .RetiresOnSaturation();
379 cmds::LinkProgram link_cmd;
380 link_cmd.Init(client_program_id_);
381 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
383 EXPECT_CALL(*gl_,
384 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
385 .WillOnce(SetArgumentPointee<2>(0))
386 .RetiresOnSaturation();
389 template <>
390 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1f, 0>(
391 bool /* valid */) {
392 SetupShaderForUniform(GL_FLOAT);
395 template <>
396 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1fvImmediate, 0>(
397 bool /* valid */) {
398 SetupShaderForUniform(GL_FLOAT);
401 template <>
402 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform1ivImmediate, 0>(
403 bool /* valid */) {
404 SetupShaderForUniform(GL_INT);
407 template <>
408 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2f, 0>(
409 bool /* valid */) {
410 SetupShaderForUniform(GL_FLOAT_VEC2);
413 template <>
414 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2i, 0>(
415 bool /* valid */) {
416 SetupShaderForUniform(GL_INT_VEC2);
419 template <>
420 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2fvImmediate, 0>(
421 bool /* valid */) {
422 SetupShaderForUniform(GL_FLOAT_VEC2);
425 template <>
426 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform2ivImmediate, 0>(
427 bool /* valid */) {
428 SetupShaderForUniform(GL_INT_VEC2);
431 template <>
432 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3f, 0>(
433 bool /* valid */) {
434 SetupShaderForUniform(GL_FLOAT_VEC3);
437 template <>
438 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3i, 0>(
439 bool /* valid */) {
440 SetupShaderForUniform(GL_INT_VEC3);
443 template <>
444 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3fvImmediate, 0>(
445 bool /* valid */) {
446 SetupShaderForUniform(GL_FLOAT_VEC3);
449 template <>
450 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform3ivImmediate, 0>(
451 bool /* valid */) {
452 SetupShaderForUniform(GL_INT_VEC3);
455 template <>
456 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4f, 0>(
457 bool /* valid */) {
458 SetupShaderForUniform(GL_FLOAT_VEC4);
461 template <>
462 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4i, 0>(
463 bool /* valid */) {
464 SetupShaderForUniform(GL_INT_VEC4);
467 template <>
468 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4fvImmediate, 0>(
469 bool /* valid */) {
470 SetupShaderForUniform(GL_FLOAT_VEC4);
473 template <>
474 void GLES2DecoderTestBase::SpecializedSetup<cmds::Uniform4ivImmediate, 0>(
475 bool /* valid */) {
476 SetupShaderForUniform(GL_INT_VEC4);
479 template <>
480 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(
481 bool /* valid */) {
482 SetupShaderForUniform(GL_FLOAT_MAT2);
485 template <>
486 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix3fvImmediate, 0>(
487 bool /* valid */) {
488 SetupShaderForUniform(GL_FLOAT_MAT3);
491 template <>
492 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>(
493 bool /* valid */) {
494 SetupShaderForUniform(GL_FLOAT_MAT4);
497 template <>
498 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterf, 0>(
499 bool /* valid */) {
500 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
503 template <>
504 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameteri, 0>(
505 bool /* valid */) {
506 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
509 template <>
510 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterfvImmediate, 0>(
511 bool /* valid */) {
512 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
515 template <>
516 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterivImmediate, 0>(
517 bool /* valid */) {
518 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
521 template <>
522 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribiv, 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();
534 template <>
535 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribfv, 0>(
536 bool valid) {
537 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
538 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0);
539 if (valid) {
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);
610 } // namespace gles2
611 } // namespace gpu