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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 gl_->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | 592 gl_->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, |
593 GL_RENDERBUFFER, 4); | 593 GL_RENDERBUFFER, 4); |
594 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 594 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
595 } | 595 } |
596 | 596 |
597 TEST_F(GLES2ImplementationTest, FramebufferTexture2D) { | 597 TEST_F(GLES2ImplementationTest, FramebufferTexture2D) { |
598 struct Cmds { | 598 struct Cmds { |
599 cmds::FramebufferTexture2D cmd; | 599 cmds::FramebufferTexture2D cmd; |
600 }; | 600 }; |
601 Cmds expected; | 601 Cmds expected; |
602 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4); | 602 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4, 5); |
603 | 603 |
604 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, | 604 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, |
605 4, 0); | 605 4, 5); |
606 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 606 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
607 } | 607 } |
608 | 608 |
609 TEST_F(GLES2ImplementationTest, FramebufferTexture2DInvalidConstantArg4) { | |
610 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, | |
611 4, 1); | |
612 EXPECT_TRUE(NoCommandsWritten()); | |
613 EXPECT_EQ(GL_INVALID_VALUE, CheckError()); | |
614 } | |
615 | |
616 TEST_F(GLES2ImplementationTest, FramebufferTextureLayer) { | 609 TEST_F(GLES2ImplementationTest, FramebufferTextureLayer) { |
617 struct Cmds { | 610 struct Cmds { |
618 cmds::FramebufferTextureLayer cmd; | 611 cmds::FramebufferTextureLayer cmd; |
619 }; | 612 }; |
620 Cmds expected; | 613 Cmds expected; |
621 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); | 614 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); |
622 | 615 |
623 gl_->FramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); | 616 gl_->FramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 3, 4, 5); |
624 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 617 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
625 } | 618 } |
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2660 | 2653 |
2661 gl_->RenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 2, GL_RGBA4, 4, 5); | 2654 gl_->RenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 2, GL_RGBA4, 4, 5); |
2662 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2655 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
2663 } | 2656 } |
2664 | 2657 |
2665 TEST_F(GLES2ImplementationTest, FramebufferTexture2DMultisampleEXT) { | 2658 TEST_F(GLES2ImplementationTest, FramebufferTexture2DMultisampleEXT) { |
2666 struct Cmds { | 2659 struct Cmds { |
2667 cmds::FramebufferTexture2DMultisampleEXT cmd; | 2660 cmds::FramebufferTexture2DMultisampleEXT cmd; |
2668 }; | 2661 }; |
2669 Cmds expected; | 2662 Cmds expected; |
2670 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4, 6); | 2663 expected.cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 4, 5, |
| 2664 6); |
2671 | 2665 |
2672 gl_->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | 2666 gl_->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, |
2673 GL_TEXTURE_2D, 4, 0, 6); | 2667 GL_TEXTURE_2D, 4, 5, 6); |
2674 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2668 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
2675 } | 2669 } |
2676 | 2670 |
2677 TEST_F(GLES2ImplementationTest, | |
2678 FramebufferTexture2DMultisampleEXTInvalidConstantArg4) { | |
2679 gl_->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | |
2680 GL_TEXTURE_2D, 4, 1, 6); | |
2681 EXPECT_TRUE(NoCommandsWritten()); | |
2682 EXPECT_EQ(GL_INVALID_VALUE, CheckError()); | |
2683 } | |
2684 | |
2685 TEST_F(GLES2ImplementationTest, TexStorage2DEXT) { | 2671 TEST_F(GLES2ImplementationTest, TexStorage2DEXT) { |
2686 struct Cmds { | 2672 struct Cmds { |
2687 cmds::TexStorage2DEXT cmd; | 2673 cmds::TexStorage2DEXT cmd; |
2688 }; | 2674 }; |
2689 Cmds expected; | 2675 Cmds expected; |
2690 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); | 2676 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); |
2691 | 2677 |
2692 gl_->TexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); | 2678 gl_->TexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); |
2693 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2679 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
2694 } | 2680 } |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3257 struct Cmds { | 3243 struct Cmds { |
3258 cmds::StencilThenCoverStrokePathCHROMIUM cmd; | 3244 cmds::StencilThenCoverStrokePathCHROMIUM cmd; |
3259 }; | 3245 }; |
3260 Cmds expected; | 3246 Cmds expected; |
3261 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); | 3247 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
3262 | 3248 |
3263 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); | 3249 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
3264 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3250 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3265 } | 3251 } |
3266 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3252 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
OLD | NEW |