| OLD | NEW |
| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 gl_->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | 585 gl_->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, |
| 586 GL_RENDERBUFFER, 4); | 586 GL_RENDERBUFFER, 4); |
| 587 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 587 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 588 } | 588 } |
| 589 | 589 |
| 590 TEST_F(GLES2ImplementationTest, FramebufferTexture2D) { | 590 TEST_F(GLES2ImplementationTest, FramebufferTexture2D) { |
| 591 struct Cmds { | 591 struct Cmds { |
| 592 cmds::FramebufferTexture2D cmd; | 592 cmds::FramebufferTexture2D cmd; |
| 593 }; | 593 }; |
| 594 Cmds expected; | 594 Cmds expected; |
| 595 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4); | 595 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4, 0); |
| 596 | 596 |
| 597 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, | 597 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, |
| 598 4, 0); | 598 4, 0); |
| 599 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 599 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 600 } | 600 } |
| 601 | 601 |
| 602 TEST_F(GLES2ImplementationTest, FramebufferTexture2DInvalidConstantArg4) { | |
| 603 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, | |
| 604 4, 1); | |
| 605 EXPECT_TRUE(NoCommandsWritten()); | |
| 606 EXPECT_EQ(GL_INVALID_VALUE, CheckError()); | |
| 607 } | |
| 608 | |
| 609 TEST_F(GLES2ImplementationTest, FramebufferTextureLayer) { | 602 TEST_F(GLES2ImplementationTest, FramebufferTextureLayer) { |
| 610 struct Cmds { | 603 struct Cmds { |
| 611 cmds::FramebufferTextureLayer cmd; | 604 cmds::FramebufferTextureLayer cmd; |
| 612 }; | 605 }; |
| 613 Cmds expected; | 606 Cmds expected; |
| 614 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); | 607 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); |
| 615 | 608 |
| 616 gl_->FramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); | 609 gl_->FramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); |
| 617 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 610 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 618 } | 611 } |
| (...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2652 | 2645 |
| 2653 gl_->RenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 2, GL_RGBA4, 4, 5); | 2646 gl_->RenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 2, GL_RGBA4, 4, 5); |
| 2654 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2647 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 2655 } | 2648 } |
| 2656 | 2649 |
| 2657 TEST_F(GLES2ImplementationTest, FramebufferTexture2DMultisampleEXT) { | 2650 TEST_F(GLES2ImplementationTest, FramebufferTexture2DMultisampleEXT) { |
| 2658 struct Cmds { | 2651 struct Cmds { |
| 2659 cmds::FramebufferTexture2DMultisampleEXT cmd; | 2652 cmds::FramebufferTexture2DMultisampleEXT cmd; |
| 2660 }; | 2653 }; |
| 2661 Cmds expected; | 2654 Cmds expected; |
| 2662 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4, 6); | 2655 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4, 0, |
| 2656 6); |
| 2663 | 2657 |
| 2664 gl_->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | 2658 gl_->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, |
| 2665 GL_TEXTURE_2D, 4, 0, 6); | 2659 GL_TEXTURE_2D, 4, 0, 6); |
| 2666 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2660 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 2667 } | 2661 } |
| 2668 | 2662 |
| 2669 TEST_F(GLES2ImplementationTest, | |
| 2670 FramebufferTexture2DMultisampleEXTInvalidConstantArg4) { | |
| 2671 gl_->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | |
| 2672 GL_TEXTURE_2D, 4, 1, 6); | |
| 2673 EXPECT_TRUE(NoCommandsWritten()); | |
| 2674 EXPECT_EQ(GL_INVALID_VALUE, CheckError()); | |
| 2675 } | |
| 2676 | |
| 2677 TEST_F(GLES2ImplementationTest, TexStorage2DEXT) { | 2663 TEST_F(GLES2ImplementationTest, TexStorage2DEXT) { |
| 2678 struct Cmds { | 2664 struct Cmds { |
| 2679 cmds::TexStorage2DEXT cmd; | 2665 cmds::TexStorage2DEXT cmd; |
| 2680 }; | 2666 }; |
| 2681 Cmds expected; | 2667 Cmds expected; |
| 2682 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); | 2668 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); |
| 2683 | 2669 |
| 2684 gl_->TexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); | 2670 gl_->TexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); |
| 2685 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2671 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 2686 } | 2672 } |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3234 struct Cmds { | 3220 struct Cmds { |
| 3235 cmds::StencilThenCoverStrokePathCHROMIUM cmd; | 3221 cmds::StencilThenCoverStrokePathCHROMIUM cmd; |
| 3236 }; | 3222 }; |
| 3237 Cmds expected; | 3223 Cmds expected; |
| 3238 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); | 3224 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3239 | 3225 |
| 3240 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); | 3226 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3241 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3227 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3242 } | 3228 } |
| 3243 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3229 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
| OLD | NEW |