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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 3607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3618 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); | 3618 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); |
3619 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 3619 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
3620 // Invalidating DEPTH_STENCIL attachment should make framebuffer uncleared. | 3620 // Invalidating DEPTH_STENCIL attachment should make framebuffer uncleared. |
3621 EXPECT_FALSE(framebuffer->IsCleared()); | 3621 EXPECT_FALSE(framebuffer->IsCleared()); |
3622 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT)); | 3622 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT)); |
3623 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT)); | 3623 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT)); |
3624 EXPECT_TRUE(framebuffer->HasUnclearedAttachment( | 3624 EXPECT_TRUE(framebuffer->HasUnclearedAttachment( |
3625 GL_DEPTH_STENCIL_ATTACHMENT)); | 3625 GL_DEPTH_STENCIL_ATTACHMENT)); |
3626 } | 3626 } |
3627 | 3627 |
| 3628 TEST_P(GLES3DecoderTest, BlitFramebufferFeedbackLoopDefaultFramebuffer) { |
| 3629 // Run BlitFramebufferCHROMIUM targetting the default framebuffer for both |
| 3630 // read and draw, should result in a feedback loop. |
| 3631 BlitFramebufferCHROMIUM cmd; |
| 3632 cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_COLOR_BUFFER_BIT, GL_LINEAR); |
| 3633 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 3634 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
| 3635 |
| 3636 cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_DEPTH_BUFFER_BIT, GL_LINEAR); |
| 3637 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 3638 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
| 3639 |
| 3640 cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_STENCIL_BUFFER_BIT, GL_LINEAR); |
| 3641 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 3642 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
| 3643 } |
| 3644 |
3628 // TODO(gman): PixelStorei | 3645 // TODO(gman): PixelStorei |
3629 | 3646 |
3630 // TODO(gman): SwapBuffers | 3647 // TODO(gman): SwapBuffers |
3631 | 3648 |
3632 } // namespace gles2 | 3649 } // namespace gles2 |
3633 } // namespace gpu | 3650 } // namespace gpu |
OLD | NEW |