Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h

Issue 1309333003: Get ReadPixels to work with INT and UNSIGNED_INT format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 341 }
342 342
343 TEST_P(GLES2DecoderTest1, ClearValidArgs) { 343 TEST_P(GLES2DecoderTest1, ClearValidArgs) {
344 EXPECT_CALL(*gl_, Clear(1)); 344 EXPECT_CALL(*gl_, Clear(1));
345 SpecializedSetup<cmds::Clear, 0>(true); 345 SpecializedSetup<cmds::Clear, 0>(true);
346 cmds::Clear cmd; 346 cmds::Clear cmd;
347 cmd.Init(1); 347 cmd.Init(1);
348 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 348 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
349 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 349 EXPECT_EQ(GL_NO_ERROR, GetGLError());
350 } 350 }
351 351 // TODO(gman): ClearBufferfi
352 TEST_P(GLES2DecoderTest1, ClearBufferfiValidArgs) { 352 // TODO(gman): ClearBufferfvImmediate
353 EXPECT_CALL(*gl_, ClearBufferfi(GL_COLOR, 2, 3, 4)); 353 // TODO(gman): ClearBufferivImmediate
354 SpecializedSetup<cmds::ClearBufferfi, 0>(true); 354 // TODO(gman): ClearBufferuivImmediate
355 cmds::ClearBufferfi cmd;
356 cmd.Init(GL_COLOR, 2, 3, 4);
357 decoder_->set_unsafe_es3_apis_enabled(true);
358 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
359 EXPECT_EQ(GL_NO_ERROR, GetGLError());
360 decoder_->set_unsafe_es3_apis_enabled(false);
361 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
362 }
363
364 TEST_P(GLES2DecoderTest1, ClearBufferfvImmediateValidArgs) {
365 cmds::ClearBufferfvImmediate& cmd =
366 *GetImmediateAs<cmds::ClearBufferfvImmediate>();
367 SpecializedSetup<cmds::ClearBufferfvImmediate, 0>(true);
368 GLfloat temp[4] = {
369 0,
370 };
371 cmd.Init(GL_COLOR, 2, &temp[0]);
372 EXPECT_CALL(*gl_,
373 ClearBufferfv(GL_COLOR, 2, reinterpret_cast<GLfloat*>(
374 ImmediateDataAddress(&cmd))));
375 decoder_->set_unsafe_es3_apis_enabled(true);
376 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
377 EXPECT_EQ(GL_NO_ERROR, GetGLError());
378 decoder_->set_unsafe_es3_apis_enabled(false);
379 EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
380 }
381
382 TEST_P(GLES2DecoderTest1, ClearBufferivImmediateValidArgs) {
383 cmds::ClearBufferivImmediate& cmd =
384 *GetImmediateAs<cmds::ClearBufferivImmediate>();
385 SpecializedSetup<cmds::ClearBufferivImmediate, 0>(true);
386 GLint temp[4] = {
387 0,
388 };
389 cmd.Init(GL_COLOR, 2, &temp[0]);
390 EXPECT_CALL(*gl_, ClearBufferiv(
391 GL_COLOR, 2,
392 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
393 decoder_->set_unsafe_es3_apis_enabled(true);
394 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
395 EXPECT_EQ(GL_NO_ERROR, GetGLError());
396 decoder_->set_unsafe_es3_apis_enabled(false);
397 EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
398 }
399
400 TEST_P(GLES2DecoderTest1, ClearBufferuivImmediateValidArgs) {
401 cmds::ClearBufferuivImmediate& cmd =
402 *GetImmediateAs<cmds::ClearBufferuivImmediate>();
403 SpecializedSetup<cmds::ClearBufferuivImmediate, 0>(true);
404 GLuint temp[4] = {
405 0,
406 };
407 cmd.Init(GL_COLOR, 2, &temp[0]);
408 EXPECT_CALL(*gl_, ClearBufferuiv(
409 GL_COLOR, 2,
410 reinterpret_cast<GLuint*>(ImmediateDataAddress(&cmd))));
411 decoder_->set_unsafe_es3_apis_enabled(true);
412 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
413 EXPECT_EQ(GL_NO_ERROR, GetGLError());
414 decoder_->set_unsafe_es3_apis_enabled(false);
415 EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
416 }
417 355
418 TEST_P(GLES2DecoderTest1, ClearColorValidArgs) { 356 TEST_P(GLES2DecoderTest1, ClearColorValidArgs) {
419 EXPECT_CALL(*gl_, ClearColor(1, 2, 3, 4)); 357 EXPECT_CALL(*gl_, ClearColor(1, 2, 3, 4));
420 SpecializedSetup<cmds::ClearColor, 0>(true); 358 SpecializedSetup<cmds::ClearColor, 0>(true);
421 cmds::ClearColor cmd; 359 cmds::ClearColor cmd;
422 cmd.Init(1, 2, 3, 4); 360 cmd.Init(1, 2, 3, 4);
423 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 361 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
424 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 362 EXPECT_EQ(GL_NO_ERROR, GetGLError());
425 } 363 }
426 364
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 cmds::GetProgramiv::Result* result = 1556 cmds::GetProgramiv::Result* result =
1619 static_cast<cmds::GetProgramiv::Result*>(shared_memory_address_); 1557 static_cast<cmds::GetProgramiv::Result*>(shared_memory_address_);
1620 result->size = 0; 1558 result->size = 0;
1621 cmds::GetProgramiv cmd; 1559 cmds::GetProgramiv cmd;
1622 cmd.Init(client_program_id_, GL_DELETE_STATUS, shared_memory_id_, 1560 cmd.Init(client_program_id_, GL_DELETE_STATUS, shared_memory_id_,
1623 kInvalidSharedMemoryOffset); 1561 kInvalidSharedMemoryOffset);
1624 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1562 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1625 EXPECT_EQ(0u, result->size); 1563 EXPECT_EQ(0u, result->size);
1626 } 1564 }
1627 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ 1565 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698